
Recherche avancée
Autres articles (7)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (3768)
-
Using ffmpeg with Flash Media Server and HDS
20 avril 2012, par JonathanI want to use ffmpeg to encode and publish a live stream to Flash Media Server. In order to support iOS devices, I need to implement HTTP Live Streaming as well. The video needs to be in H.264 format and the audio should be AAC. I don't have much experience working with ffmpeg, and I'm having a hard time getting this to work. This is the command that I've tried (and some variations as well) :
ffmpeg.exe -threads 15 -f dshow -i video="USB2.0 UVC WebCam":audio="Microphone (Realtek High Defini" \
-map_channel 0.1.1 -r 24 -acodec libvo_aacenc -ar 22050 -ab 128k -vcodec libx264 \
-s vga -vb 100k -f flv "rtmp:///livepkgr/livestream1?adbe-live-event=liveevent" \
-r 24 -acodec libvo_aacenc -ar 22050 -ab 128k -vcodec libx264 -s qvga -vb 200k \
-f flv "rtmp:///livepkgr/livestream2?adbe-live-event=liveevent" \
-r 24 -acodec libvo_aacenc -ar 22050 -ab 128k -vcodec libx264 -s vga -vb 350k
-f flv "rtmp:///livepkgr/livestream3?adbe-live-event=liveevent"When I run this, it appears to connect to FMS, but then I get a lot of error messages about dropped frames - I'm not sure if ANY frames get encoded successfully. My CPU usage is very high as well. I get a 404 error from FMS when I enter the URL of the *.m3u8 file for one of the individual streams (the main livestream.m3u8 file is accessible though). I have also tried outputting to a file instead of FMS, with no success. All I get is some very garbled sound and no video.
Any suggestions for what options/commands I should use to get this working ? Is anyone using ffmpeg with FMS to do HTTP Dynamic Streaming / HLS with MP4 video ? I've been struggling to get HDS/HLS working for some time now, and any help would be much appreciated ! It shouldn't make a difference, but I'm using FMS on Amazon EC2 with their AMI image.
Thanks !
-
Transcoding & displaying user-uploaded videos for cross-browser/platform compatibility
5 avril 2012, par Jonathan AmendI want to display user-uploaded videos in high quality on different browsers/platforms. I think I have a pretty good start, but there are a few issues. I have at my disposal ffmpeg 0.10 (called from PHP) and jwPlayer 5.8 (licensed).
Ideally I would like to support :
- Browsers with Flash 9+
- Modern Firefox/Chrome/Safari without Flash
- iOS 4.1+
- Android 2.2+
My current transcoding commands are :
$commands = array(
'flv' => "/usr/bin/ffmpeg -y -i {$sourceFile} -b 500k -ar 22050 -ab 64 {$tmpFileName}.flv 2>&1",
'webm' => "/usr/bin/ffmpeg -i {$sourceFile} -acodec libvorbis -ac 2 -ab 96k -ar 44100 -b 500k {$tmpFileName}.webm 2>&1",
'mp4' => "/usr/bin/ffmpeg -i {$sourceFile} -acodec libfaac -ab 96k -vcodec libx264 -level 21 -refs 2 -vf 'scale=trunc(ih*a/2)*2:trunc(iw/a/2)*2' -b 500k -bt 1000k -threads 0 -f mp4 {$tmpFileName}.pre.mp4 2>&1",
'jpg' => "/usr/bin/ffmpeg -y -i {$sourceFile} -ss 5 -vcodec mjpeg -vframes 1 -an -f rawvideo {$tmpFileName}.jpg 2>&1"
);
$fastStartCommand = "/usr/bin/qt-faststart {$tmpFileName}.pre.mp4 {$tmpFileName}.mp4");My current display code is this :
<video controls="controls" width="{$width}" height="{$height}" poster="{$fileJPG}" style="width: {$width}px; height: {$height}px;">
<source src="{$fileMP4}" type="video/mp4" data-ext="mp4"></source>
<source src="{$fileWEBM}" type="video/webm" data-ext="webm"></source>
<a href="http://stackoverflow.com/feeds/tag/{$fileMP4}" title="Play Video">
<img border="0" src="http://stackoverflow.com/feeds/tag/{$fileJPG}" width='0' height='0' alt="Play Video" />
</a>
</video>
<code class="echappe-js"><script type="text/javascript"><br />
swfobject.embedSWF(<br />
&#39;/flash/jwPlayer.swf&#39;,<br />
&#39;video&#39;,<br />
{$width},<br />
{$height},<br />
&#39;9.0.0&#39;,<br />
&#39;&#39;,<br />
{<br />
file: &#39;{$fileFLV}&#39;,<br />
width: {$width},<br />
height: {$height},<br />
provider: &#39;video&#39;,<br />
stretching: &#39;uniform&#39;,<br />
smoothing: &#39;true&#39;,<br />
dock: &#39;true&#39;<br />
},<br />
{<br />
menu: &#39;false&#39;,<br />
allowfullscreen: &#39;true&#39;,<br />
allowscriptaccess: &#39;always&#39;,<br />
allownetworking: &#39;always&#39;,<br />
wmode: &#39;transparent&#39;<br />
}<br />
);<br />
</script>The idea is to prefer the Flash player (we have many custom skins that we would like to keep using), then fall back to HTML 5 video, and if that fails, show the JPEG with a link to the mp4 file (that seems to work as a last-ditch effort for iOS 2/3 and old browsers so they can at least play the video by launching QuickTime).
The main issues that I'm not sure how to solve right now are :
- How can I show a higher quality video in Flash ? I tried using the mp4 video instead of the flv but it doesn't work and I only get sound, no video. I think Flash is supposed to support h.264 these days, but how ? And do I have to use a different transcoding method for older and newer versions of Flash ?
- How can I transcode the video with better quality ? Right now I am using the same bitrate for all resolutions. Any chance there is a way for ffmpeg to adjust the bitrate automatically ? Or can I detect and match the resolution of the uploaded video to a list of resolution -> bitrates somehow ?
-
unexpected end of file error in ffmpeg libavutils/common.h while compiling
23 mars 2014, par Mayank AgarwalI am compiling following simple code in ffmpeg.
#include "stdafx.h"
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
void main()
{
av_register_all();
}all the ffmpeg headers i have included in project properties.
but i am getting the following error on compiling.Error 1 error C1004 : unexpected end-of-file found dev\include\libavutil\common.h 87 1
Regards
Mayank