
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (44)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (5144)
-
APPLY Strong to Buffer rule. Quit Switching Bit rates MPEG DASH
14 juillet 2015, par VinayI am using mpeg dash for adaptive bit rate streaming of video from my server.
I have used ffmpeg and MP4Box to generate 4 different quality video files from my source .mp4
The .mpd file generated has the below code
<?xml version="1.0"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500000S" type="static" mediapresentationduration="PT0H3M1.42S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011">
<programinformation moreinformationurl="http://gpac.sourceforge.net">
</programinformation>
<period duration="PT0H3M1.42S">
<adaptationset segmentalignment="true" maxwidth="1920" maxheight="1080" maxframerate="24" par="16:9" lang="und" subsegmentstartswithsap="1">
<representation mimetype="video/mp4" codecs="avc1.64000d" width="320" height="240" framerate="24" sar="1:1" startwithsap="1" bandwidth="375715">
<baseurl>400_dashinit.mp4</baseurl>
<segmentbase indexrangeexact="true" indexrange="904-1403">
<initialization range="0-903"></initialization>
</segmentbase>
</representation>
<representation mimetype="video/mp4" codecs="avc1.640015" width="420" height="270" framerate="24" sar="1:1" startwithsap="1" bandwidth="644824">
<baseurl>700_dashinit.mp4</baseurl>
<segmentbase indexrangeexact="true" indexrange="905-1404">
<initialization range="0-904"></initialization>
</segmentbase>
</representation>
<representation mimetype="video/mp4" codecs="avc1.64001f" width="1024" height="576" framerate="24" sar="1:1" startwithsap="1" bandwidth="1349484">
<baseurl>1500_dashinit.mp4</baseurl>
<segmentbase indexrangeexact="true" indexrange="905-1404">
<initialization range="0-904"></initialization>
</segmentbase>
</representation>
<representation mimetype="video/mp4" codecs="avc1.64001f" width="1280" height="720" framerate="24" sar="1:1" startwithsap="1" bandwidth="2264379">
<baseurl>2500_dashinit.mp4</baseurl>
<segmentbase indexrangeexact="true" indexrange="905-1404">
<initialization range="0-904"></initialization>
</segmentbase>
</representation>
<representation mimetype="video/mp4" codecs="avc1.640028" width="1920" height="1080" framerate="24" sar="1:1" startwithsap="1" bandwidth="3633049">
<baseurl>4000_dashinit.mp4</baseurl>
<segmentbase indexrangeexact="true" indexrange="906-1405">
<initialization range="0-905"></initialization>
</segmentbase>
</representation>
</adaptationset>
</period>
</mpd>I am using video.js along with dash.js to playback the mpeg dash content on client side. The issue is that the video doesn’t playback perfectly when i simulate network conditions from chrome dev tools.
It works at times and it doesn’t at others. For ex the stream starts with bit rate of 400kbps and then detects enough bandwidth available so it switches to 2500kbps. Then when i bring down my bandwidth to 400kbps again then the video freezes at some point of time.
At times the video freezes after few initial seconds of playback when it tries to switch the stream. I think there might be some command line parameter that i am missing while generating my video files via ffmpeg or generating .mpd file via MP4Box.
below are the commands i use for ffmpeg and MP4Box
ffmpeg -y -i inputfile -c:a libfdk_aac -ac 2 -ab 128k -c:v libx264 -r 24 – g 24 -b:v 1500k -maxrate 1500k -bufsize 1000k -vf "scale=-1:720" outputfile.mp4
MP4Box -dash [DURATION] -rap -frag-rap -profile [PROFILE] -out [path/to/outpout.file] [path/to/input1.file] [path/to/input2.file] [path/to/input3.file]Also while i am generating .mpd files via MP4Box i am getting below warning in console
[DASH]: Files have non-proportional track layouts (320x240 vs 420x270) but sample size and aspect ratio match, assuming precision issue
[DASH]: Files have non-proportional track layouts (320x240 vs 1024x576) but sample size and aspect ratio match, assuming precision issue
[DASH]: Files have non-proportional track layouts (320x240 vs 1280x720) but sample size and aspect ratio match, assuming precision issue
[DASH]: Files have non-proportional track layouts (320x240 vs 1920x1080) but sample size and aspect ratio match, assuming precision issueWhenever the video stops playing the chrome console has these logs
Number of times the buffer has run dry: 25
Apply STRONG to buffer rule.
Quit switching bit rates.I don’t have any clue as to why the buffers run dry and it stops switching the bit rates.
Anything that is predominantly wrong in the process ?
-
FFmpeg muxing to avi
2 septembre 2015, par UnciasI have program, that succefully shows h264 stream using SDL : I’m getting h264 frame, decode it using ffmpeg and draw using SDL.
Also I can write frames to file (using fwrite) and play this file through ffplay.But I want to mux data to the avi and face some problems in av_write_frame.
Here is my code :
...
/*Initializing format context - outFormatContext is the member of my class*/
AVOutputFormat *outFormat;
outFormat = av_guess_format(NULL,"out.avi",NULL);
outFormat->video_codec = AV_CODEC_ID_H264;
outFormat->audio_codec = AV_CODEC_ID_NONE;
avformat_alloc_output_context2(&outFormatContext, outFormat, NULL, "out.avi");
AVCodec *outCodec;
AVStream *outStream = add_stream(outFormatContext, &outCodec, outFormatContext->oformat->video_codec);
avcodec_open2(outStream->codec, outCodec, NULL);
av_dump_format(outFormatContext, 0, "out.avi", 1);
if (avio_open(&outFormatContext->pb, "out.avi", AVIO_FLAG_WRITE) < 0)
throw Exception("Couldn't open file");
if (avformat_write_header(outFormatContext, NULL) < 0)
throw Exception("Couldn't write to file");
//I don't have exceptions here - so there is 6KB header in out.avi.
...
static AVStream *add_stream(AVFormatContext *oc, AVCodec **codec,
enum AVCodecID codec_id)
{
AVCodecContext *c;
AVStream *st;
/* find the encoder */
*codec = avcodec_find_encoder(codec_id);
if (!(*codec))
throw("Could not find encoder");
st = avformat_new_stream(oc, *codec);
if (!st)
throw ("Could not allocate stream");
st->id = oc->nb_streams-1;
c = st->codec;
c->bit_rate = 400000;
/* Resolution must be a multiple of two. */
c->width = 1920;
c->height = 1080;
c->pix_fmt = PIX_FMT_YUV420P;
c->flags = 0;
c->time_base.num = 1;
c->time_base.den = 25;
c->gop_size = 12; /* emit one intra frame every twelve frames at most */
return st;
}
...
/* Part of decoding loop. There is AVPacket packet - h264 packet;
int ret = av_write_frame(outFormatContext, &packet); //it return -22 code - Invadlid argument;
if (avcodec_decode_video2(pCodecCtx, pFrame, &frameDecoded, &packet) < 0)
return;
if (frameDecoded)
{
//SDL stuff
}Also i tried to use avcodec_encode_video2 (encode pFrame back to the H264) next to the SDL stuff but encoding is not working - i’ve got empty packets :( It is the second problem.
Using av_interleaved_write_frame causes acces violation.
Code of the muxing part i copied from ffmpeg muxing example (https://www.ffmpeg.org/doxygen/2.1/doc_2examples_2muxing_8c-example.html)
-
adaptives links for mpeg dash on wowza server not working, status error 404 Not Found
12 août 2015, par jobinadaptives links for mpeg dash on wowza server not working with me, the following are the steps that I used to publish video on wowza :
- I install and configure Wowza server, and I tested it and it is working fine.
-
Transcode this video using ffmepg (I bring these command from wowza documentation) :
set inputFile="C :\video\sintel.mp4"
set outputFile="C :\video\sintel"ffmpeg -y -i %inputFile% -s 320x180 -y -strict experimental -acodec aac -ab 64k -ac 2 -ar 48000 -vcodec libx264 -vprofile baseline -level 30 -g 48 -b 200000 -threads 64 %outputFile%_320p.mp4
ffmpeg -y -i %inputFile% -s 640x360 -y -strict experimental -acodec aac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -vprofile baseline -level 30 -g 48 -b 520000 -threads 64 %outputFile%_640p.mp4
ffmpeg -y -i %inputFile% -s 320x180 -y -strict experimental -acodec aac -ab 64k -ac 2 -ar 48000 -vcodec libx264 -vprofile main -g 48 -b 270000 -threads 64 %outputFile%_400p.mp4
ffmpeg -y -i %inputFile% -s 420x270 -y -strict experimental -acodec aac -ab 64k -ac 2 -ar 48000 -vcodec libx264 -vprofile main -g 48 -b 570000 -threads 64 %outputFile%_700p.mp4
ffmpeg -y -i %inputFile% -s 720x406 -y -strict experimental -acodec aac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -vprofile main -g 48 -b 1000000 -threads 64 %outputFile%_1100p.mp4
ffmpeg -y -i %inputFile% -s 1024x576 -y -strict experimental -acodec aac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -vprofile main -g 48 -b 1200000 -threads 64 %outputFile%_1300p.mp4
ffmpeg -y -i %inputFile% -s 1080x608 -y -strict experimental -acodec aac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -vprofile main -g 48 -b 1400000 -threads 64 %outputFile%_1500p.mp4 -
I test the files and all of them workig fine then I moved these files to wowza content folder and create the smil file as following :
<?xml version="1.0" encoding="UTF-8"?>
<smil title="sintel">
<switch>
<video width="320" height="180" src="sintel_320p.mp4" systemlanguage="eng">
</video>
<video width="640" height="360" src="sintel_640p.mp4" systemlanguage="eng">
</video>
<video width="320" height="180" src="sintel_400p.mp4" systemlanguage="eng">
</video>
<video width="420" height="270" src="sintel_700p.mp4" systemlanguage="eng">
</video>
<video width="720" height="406" src="sintel_1100p.mp4" systemlanguage="eng">
</video>
<video width="1024" height="576" src="sintel_1300p.mp4" systemlanguage="eng">
</video>
<video width="1080" height="608" src="sintel_1500p.mp4" systemlanguage="eng">
</video>
</switch>
</smil>- I use the mpd file (http://191.237.26.137:1935/vod/smil:sintel.smil/manifest.mpd) with http://www.jwplayer.com/innovation/roadmap/mpeg-dash/
Result : the video work for first few seconds the stop