
Recherche avancée
Autres articles (111)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (10596)
-
dash.js not playing mpd file generated by MP4Box
9 mars 2016, par user3291299I have transcoded and stripped the audio of an mp4 file as follows :
$ ffmpeg -codec:a libvo_aacenc -ar 44100 -ac 1 -codec:v libx264 -profile:v baseline -level 13 -b:v 2000k dir/out.mp4 -i dir/original.mp4
$ ffmpeg -i dir/out.mp4 -an dir/out_an.mp4
I’ve used the following MP4Box command to generate a mpd :
$ MP4Box -dash 30000 -dash-profile on-demand -segment-name out-seg -out dir/out_dash dir/out.mp4
This results in the following mpd file :
<?xml version="1.0"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500000S" type="static" mediapresentationduration="PT0H2M11.77S" profiles="urn:mpeg:dash:profile:full:2011">
<programinformation moreinformationurl="http://gpac.sourceforge.net">
</programinformation>
<period duration="PT0H2M11.77S">
<adaptationset segmentalignment="true" maxwidth="640" maxheight="360" maxframerate="30000/1001" par="16:9">
<contentcomponent contenttype="video" lang="und"></contentcomponent>
<contentcomponent contenttype="audio" lang="und"></contentcomponent>
<representation mimetype="video/mp4" codecs="avc1.42c00d,mp4a.40.02" width="640" height="360" framerate="30000/1001" sar="1:1" audiosamplingrate="44100" startwithsap="0" bandwidth="2097272">
<audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
<segmentlist timescale="1000" duration="30046">
<initialization sourceurl="out-seginit.mp4"></initialization>
<segmenturl media="out-seg1.m4s"></segmenturl>
<segmenturl media="out-seg2.m4s"></segmenturl>
<segmenturl media="out-seg3.m4s"></segmenturl>
<segmenturl media="out-seg4.m4s"></segmenturl>
<segmenturl media="out-seg5.m4s"></segmenturl>
</segmentlist>
</representation>
</adaptationset>
</period>
</mpd> -
How to set segment duration of a DASH stream using ffmpeg ?
25 juillet 2024, par ipartolaI am trying to convert a video to a live DASH stream using ffmpeg. The command looks like this :


ffmpeg -i input.mp4 -preset veryfast \
-c:v libx264 -pix_fmt yuv420p -map 0:v:0 \
-s:0 1280x720 -b:v:0 2M -maxrate:0 2.5M -bufsize:0 4M \
-use_template 1 -use_timeline 1 -seg_duration 1 -f dash foo/stream.mpd



I would like to have the segment duration be 1 second long. However the above command seems to produce chunk files about 8 seconds long instead. However if I change the command to the following (adding
-g 5
) :

ffmpeg -i input.mp4 -preset veryfast \
-c:v libx264 -pix_fmt yuv420p -map 0:v:0 \
-s:0 1280x720 -b:v:0 2M -maxrate:0 2.5M -bufsize:0 4M \
-g 5 \
-use_template 1 -use_timeline 1 -seg_duration 1 -f dash foo/stream.mpd



I get chunk files that are much closer to 1 second long. Obviously this isn't ideal since that will produce a keyframe every 5 frames. So :


a) I don't understand the relationship between seg_duration and keyframe interval. Why is ffmpeg not automatically just putting a keyframe at the beginning of each chunk ?


b) How do I get the chunk/segment length I want ?


-
FFplay only plays MPEG-DASH when in the same directory
26 mars 2020, par M. ParkerI’ve created a series of video segments using dashenc.c from ffmpeg’s libav on my windows machine. The mpd file is templated, so it’s fairly simple and it passes validation. The video plays, but only if I put ffplay in the same folder as all the files and use :
ffplay -i manifest.mpd
If I try to play from some other directory, or even the same directory using :
ffplay -i c:\tmp\manifest.mpd
or
ffplay -i c:/tmp/manifest.mpd
The attempt fails, producing this error :
[dash @ 0000016ce0d69900] Failed to open an initialization section in playlist 0
[dash @ 0000016ce0d69900] Error when loading first fragment, playlist 0
C:/tmp/manifest.mpd: Invalid argumentThe mpd file :
<?xml version="1.0" encoding="utf-8"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" minimumupdateperiod="PT500S" suggestedpresentationdelay="PT4S" availabilitystarttime="2020-03-23T14:54:16Z" publishtime="2020-03-23T14:54:25Z" timeshiftbufferdepth="PT4811H53M52.3S" minbuffertime="PT9.6S">
<programinformation>
</programinformation>
<period start="PT0.0S">
<adaptationset contenttype="video" segmentalignment="true" bitstreamswitching="true">
<representation mimetype="video/mp4" codecs="avc1.42001e" bandwidth="5953124" width="720" height="480">
<segmenttemplate timescale="1000000" duration="5000000" availabilitytimeoffset="4.967" initialization="init-stream$RepresentationID$.m4s" media="media-stream$RepresentationID$-$Number%06d$.m4s" startnumber="1">
</segmenttemplate>
</representation>
</adaptationset>
</period>
</mpd>Adding in a BaseUrl element didn’t help ; my guess is I’m formatting it wrong. Any ideas what I might do to fix this ?