Recherche avancée

Médias (91)

Autres articles (49)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (7521)

  • Revision 36454 : uniformiser les inputs du formulaire de login

    19 mars 2010, par brunobergot@… — Log

    uniformiser les inputs du formulaire de login

  • FFMPEG/DASH-LL creates audio and video chunks at different rates ; player is confused (404 errors)

    26 mai 2021, par Danny

    I'm trying to create a MPEG-DASH "live" stream from a static file to test various low latency modes. The DASH muxer in FFmpeg creates two AdaptationSets, one for video chunks and one for audio chunks.

    


    However, the audio and video chunk files are not created at the same rate (should they be ?). ie, here stream0 are the video chunks and stream1 are the audio chunks. After a few seconds of running, the webroot directory contains :

    


    chunk-stream0-00001.m4s  chunk-stream1-00001.m4s  
chunk-stream0-00002.m4s  chunk-stream1-00002.m4s  
chunk-stream0-00003.m4s  chunk-stream1-00003.m4s  
chunk-stream0-00004.m4s  chunk-stream1-00004.m4s  
                         chunk-stream1-00005.m4s  
                         chunk-stream1-00006.m4s  
                         chunk-stream1-00007.m4s  
                         chunk-stream1-00008.m4s  
                         chunk-stream1-00009.m4s  
master.mpd  
init-stream0.m4s  
init-stream1.m4s  


    


    The stream doesn't load (or play) on either dash.js or shaka-player and there are lots of 404 (Not Found) errors for the video chunks. The player is requesting chunks from both stream0 and stream1 in sequence, ie, stream0-001 + stream1-001, then stream0-002 + stream1-002 and so on.

    


    But since stream0 only goes from 001 to 004, there are lots of 404 errors as it tries to load stream0-005 through 009.

    


    The gap gets wider after letting FFmpeg run for a while. eg, stream0 is 62 to 75 but stream1 is 174 to 187. Reloading the player page at this point fails with dash.all.debug.js:15615 [2055][FragmentController] No video bytes to push or stream is inactive. and shows 404 errors stream0 chunk 188 (which doesn't exist yet !)

    


    enter image description here

    


    The FFmpeg command was adopted from DASH streaming from the top-down :

    


    ffmpeg -re -i /mnt/swdevel/TestStreams/H264/ThreeHourMovie.mp4 \
-c:v libx264 -x264-params keyint=120:scenecut=0 -b:v 1M -c:a copy \
-f dash -dash_segment_type mp4 \
 -seg_duration 2 \
 -target_latency 3 \
 -frag_type duration \
 -frag_duration 0.2 \
 -window_size 10 \
 -extra_window_size 3 \
 -streaming 1 \
 -ldash 1 \
 -use_template 1 \
 -use_timeline 0 \
 -write_prft 1 \
 -fflags +nobuffer+flush_packets \
 -format_options "movflags=+cmaf" \
 -utc_timing_url "/pelican/testPlayers/time.php" \
 master.mpd


    


    And the dash.js player code is very simple :

    


    const srcUrl = "../ottWebRoot/playerTest/master.mpd"; 

var player = dashjs.MediaPlayer().create();

let autoPlay = false;
player.initialize(document.querySelector("#videoTagId"), srcUrl, autoPlay);

player.updateSettings(
{
    streaming :
    {
        lowLatencyEnabled : true,
        liveDelay : 2,
        jumpGaps : true,
        jumpLargeGaps : true,
        smallGapLimit : 1.5,
    }
});


    


    To provide the UTCTiming element in the manifest, the small time.php URL returns a UTC time from the web server :

    


    <?php
    print gmdate("Y-m-d\TH:i:s\Z");
?>


    


    (It also shows 404 errors for the latest stream1/audio chunk, that's likely a different problem)

    


    I'm not sure what to try next. Any and suggestions greatly appreciated.

    


    EDIT I

    


    The suggestion by @Anonymous Coward to change the key interval improved things a lot. The chunks for stream0 and stream1 are in lock-step and have identical sequence numbers.

    


    However, there are still many 404 errors, both on initial page load (without pressing play) and during playback.

    


    I ran watch -n 1 ls -lt code> and compared side-by-side to the errors in the browser console.  It&#x27;s hard to compare but it <em>looks</em> like the browser is trying to fetch files "on the play edge" which haven&#x27;t yet been created by FFmpeg.  See the pic below.

    &#xA;

    How do I instruct the browser to wait just a bit more before fetching the edge chunks ?

    &#xA;

    enter image description here

    &#xA;

    EDIT II

    &#xA;

    Using shaka-player instead of dash.js plays properly without 404 errors. Configured as :

    &#xA;

        player.configure(&#xA;    {&#xA;        streaming: &#xA;        {&#xA;            lowLatencyMode: true,&#xA;            inaccurateManifestTolerance: 0,&#xA;            rebufferingGoal: 0.1,&#xA;        }&#xA;        &#xA;    });&#xA;

    &#xA;

    Client

    &#xA;

      &#xA;
    • MacOS 10.12
    • &#xA;

    • dash.js latest 3.2.2
    • &#xA;

    • Chrome 79, Safari 12, FireFox v ?
    • &#xA;

    &#xA;

    Server

    &#xA;

      &#xA;
    • Apache 2.4.37
    • &#xA;

    • PHP 7.2.4 (for time function only)
    • &#xA;

    • Centos 8
    • &#xA;

    &#xA;

    (For reference, here is the mpd file generated by FFmpeg)

    &#xA;

    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" minimumupdateperiod="PT500S" availabilitystarttime="2021-05-24T14:50:00.263Z" publishtime="2021-05-24T15:22:45.335Z" timeshiftbufferdepth="PT50.0S" maxsegmentduration="PT2.0S" minbuffertime="PT5.0S">&#xA;    <programinformation>&#xA;    </programinformation>&#xA;    <servicedescription>&#xA;        <latency target="3000" referenceid="0"></latency>&#xA;    </servicedescription>&#xA;    <period start="PT0.0S">&#xA;        <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="24/1" maxwidth="1280" maxheight="682" par="15:8" lang="und">&#xA;            <resync dt="200000" type="0"></resync>&#xA;            <representation mimetype="video/mp4" codecs="avc1.64081f" bandwidth="1000000" width="1280" height="682" sar="1023:1024">&#xA;                <producerreferencetime inband="true" type="captured" wallclocktime="2021-05-24T14:50:00.263Z" presentationtime="0">&#xA;                    <utctiming schemeiduri="urn:mpeg:dash:utc:http-xsdate:2014" value="/pelican/testPlayers/time.php"></utctiming>&#xA;                </producerreferencetime>&#xA;                <resync dt="5000000" type="1"></resync>&#xA;                <segmenttemplate timescale="1000000" duration="2000000" availabilitytimeoffset="1.800" availabilitytimecomplete="false" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">&#xA;                </segmenttemplate>&#xA;            </representation>&#xA;        </adaptationset>&#xA;        <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true" lang="und">&#xA;            <resync dt="200000" type="0"></resync>&#xA;            <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="116317" audiosamplingrate="48000">&#xA;                <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>&#xA;                <producerreferencetime inband="true" type="captured" wallclocktime="2021-05-24T14:50:00.306Z" presentationtime="0">&#xA;                    <utctiming schemeiduri="urn:mpeg:dash:utc:http-xsdate:2014" value="/pelican/testPlayers/time.php"></utctiming>&#xA;                </producerreferencetime>&#xA;                <resync dt="21333" type="1"></resync>&#xA;                <segmenttemplate timescale="1000000" duration="2000000" availabilitytimeoffset="1.800" availabilitytimecomplete="false" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">&#xA;                </segmenttemplate>&#xA;            </representation>&#xA;        </adaptationset>&#xA;    </period>&#xA;    <utctiming schemeiduri="urn:mpeg:dash:utc:http-xsdate:2014" value="/pelican/testPlayers/time.php"></utctiming>&#xA;</mpd>&#xA;

    &#xA;

  • Merge commit ’458446acfa1441d283dacf9e6e545beb083b8bb0’

    15 novembre 2013, par Michael Niedermayer
    Merge commit ’458446acfa1441d283dacf9e6e545beb083b8bb0’
    

    * commit ’458446acfa1441d283dacf9e6e545beb083b8bb0’ :
    lavc : Edge emulation with dst/src linesize

    Conflicts :
    libavcodec/cavs.c
    libavcodec/h264.c
    libavcodec/hevc.c
    libavcodec/mpegvideo_enc.c
    libavcodec/mpegvideo_motion.c
    libavcodec/rv34.c
    libavcodec/svq3.c
    libavcodec/vc1dec.c
    libavcodec/videodsp.h
    libavcodec/videodsp_template.c
    libavcodec/vp3.c
    libavcodec/vp8.c
    libavcodec/wmv2.c
    libavcodec/x86/videodsp.asm
    libavcodec/x86/videodsp_init.c

    Changes to the asm are not merged, they are left for volunteers or
    in their absence for later.
    The changes this merge introduces are reordering of the function
    arguments

    See : face578d56c2d1375e40d5e2a28acc122132bc55
    Merged-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/cavs.c
    • [DH] libavcodec/diracdec.c
    • [DH] libavcodec/h264.c
    • [DH] libavcodec/hevc.c
    • [DH] libavcodec/mpegvideo.c
    • [DH] libavcodec/mpegvideo_enc.c
    • [DH] libavcodec/mpegvideo_motion.c
    • [DH] libavcodec/rv34.c
    • [DH] libavcodec/snow.c
    • [DH] libavcodec/svq3.c
    • [DH] libavcodec/vc1dec.c
    • [DH] libavcodec/videodsp.h
    • [DH] libavcodec/videodsp_template.c
    • [DH] libavcodec/vp3.c
    • [DH] libavcodec/vp56.c
    • [DH] libavcodec/vp8.c
    • [DH] libavcodec/vp9.c
    • [DH] libavcodec/wmv2.c
    • [DH] libavcodec/x86/dsputil_mmx.c
    • [DH] libavcodec/x86/videodsp_init.c