Recherche avancée

Médias (91)

Autres articles (67)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

Sur d’autres sites (10307)

  • How to loop an image properly for a live stream with FFMPEG

    28 avril 2021, par Xternet

    I'm using the below code to live stream to Instagram, now I want to loop an image so it'll go on forever as long as the process is running, it'll keep streaming. But when I watch the live stream, I keep seeing pauses in the live video. How do I fix it ?

    


    ffmpeg -loop 1 -rtbufsize 256M -re -i "image.png" -acodec libmp3lame -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 720x1280 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace -t 60 -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv "RTMPstreamURL"


    


  • How do I get VLC to play back two separate input streams (Video and Audio) like MPV-Player with mpv —ytdl-format=FormatCode1+FormatCode2 URL

    29 avril 2021, par Gubbel

    so, I finally found out how to play a 1080p with 60fps smoothly on a Raspberry Py 4b or rather on a Raspberry Py 400.

    


    With the following OS installed :
Raspberry Pi OS with desktop and recommended software

    


    But I need to get from Youtube the avc1 (H.264) video stream and not the av01 (AV1) video stream.

    


    And sadly it only plays smooth, if I use the VLC-Media-Player to play back a completely downloaded file.

    


    The MPV alternative with e.g. :

    


    mpv --ytdl-format=299+140 https://www.youtube.com/watch?v=LXb3EKWsInQ


    


    lags sadly.

    


    So I thought of a method to use a similar option with VLC.

    


    My attempt :

    


    #!/bin/bash

echo 'Enter: videoFormatCode audioFormatCode URL'

read video audio link

videoLink=$(youtube-dl -g -f $video $link)

audioLink=$(youtube-dl -g -f $audio $link)




ffmpeg -i "$videoLink" -i "$audioLink" -f matroska - | vlc -


    


    So, first I will find out the format codes with :

    


    youtube-dl -F https://www.youtube.com/watch?v=LXb3EKWsInQ


    


    which gives me :

    


    format code  extension  resolution note
249          webm       audio only tiny   50k , webm_dash container, opus @ 50k (48000Hz), 1.88MiB
250          webm       audio only tiny   67k , webm_dash container, opus @ 67k (48000Hz), 2.51MiB
140          m4a        audio only tiny  129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 4.84MiB
251          webm       audio only tiny  132k , webm_dash container, opus @132k (48000Hz), 4.96MiB
394          mp4        256x144    144p HDR   63k , mp4_dash container, av01.0.00M.10.0.110.09.16.09.0@  63k, 30fps, video only, 2.39MiB
160          mp4        256x144    144p   70k , mp4_dash container, avc1.4d400c@  70k, 30fps, video only, 2.64MiB
278          webm       256x144    144p   82k , webm_dash container, vp9@  82k, 30fps, video only, 3.07MiB
694          mp4        256x144    144p60 HDR  179k , mp4_dash container, av01.0.00M.10.0.110.09.16.09.0@ 179k, 60fps, video only, 6.73MiB
330          webm       256x144    144p60 HDR  212k , webm_dash container, vp9.2@ 212k, 60fps, video only, 7.96MiB
395          mp4        426x240    240p HDR  111k , mp4_dash container, av01.0.00M.10.0.110.09.16.09.0@ 111k, 30fps, video only, 4.16MiB
133          mp4        426x240    240p  156k , mp4_dash container, avc1.4d4015@ 156k, 30fps, video only, 5.86MiB
242          webm       426x240    240p  160k , webm_dash container, vp9@ 160k, 30fps, video only, 6.00MiB
695          mp4        426x240    240p60 HDR  409k , mp4_dash container, av01.0.01M.10.0.110.09.16.09.0@ 409k, 60fps, video only, 15.32MiB
331          webm       426x240    240p60 HDR  444k , webm_dash container, vp9.2@ 444k, 60fps, video only, 16.63MiB
396          mp4        640x360    360p HDR  220k , mp4_dash container, av01.0.01M.10.0.110.09.16.09.0@ 220k, 30fps, video only, 8.23MiB
134          mp4        640x360    360p  337k , mp4_dash container, avc1.4d401e@ 337k, 30fps, video only, 12.64MiB
243          webm       640x360    360p  343k , webm_dash container, vp9@ 343k, 30fps, video only, 12.84MiB
696          mp4        640x360    360p60 HDR  862k , mp4_dash container, av01.0.04M.10.0.110.09.16.09.0@ 862k, 60fps, video only, 32.28MiB
332          webm       640x360    360p60 HDR  954k , webm_dash container, vp9.2@ 954k, 60fps, video only, 35.70MiB
397          mp4        854x480    480p HDR  406k , mp4_dash container, av01.0.04M.10.0.110.09.16.09.0@ 406k, 30fps, video only, 15.19MiB
135          mp4        854x480    480p  563k , mp4_dash container, avc1.4d401f@ 563k, 30fps, video only, 21.08MiB
244          webm       854x480    480p  619k , webm_dash container, vp9@ 619k, 30fps, video only, 23.18MiB
697          mp4        854x480    480p60 HDR 1652k , mp4_dash container, av01.0.05M.10.0.110.09.16.09.0@1652k, 60fps, video only, 61.81MiB
333          webm       854x480    480p60 HDR 1848k , webm_dash container, vp9.2@1848k, 60fps, video only, 69.13MiB
398          mp4        1280x720   720p60 HDR 1151k , mp4_dash container, av01.0.08M.10.0.110.09.16.09.0@1151k, 60fps, video only, 43.09MiB
247          webm       1280x720   720p 1220k , webm_dash container, vp9@1220k, 30fps, video only, 45.67MiB
136          mp4        1280x720   720p 1540k , mp4_dash container, avc1.4d401f@1540k, 30fps, video only, 57.61MiB
302          webm       1280x720   720p60 1964k , webm_dash container, vp9@1964k, 60fps, video only, 73.48MiB
298          mp4        1280x720   720p60 2475k , mp4_dash container, avc1.4d4020@2475k, 60fps, video only, 92.60MiB
698          mp4        1280x720   720p60 HDR 3829k , mp4_dash container, av01.0.08M.10.0.110.09.16.09.0@3829k, 60fps, video only, 143.25MiB
334          webm       1280x720   720p60 HDR 4337k , webm_dash container, vp9.2@4337k, 60fps, video only, 162.26MiB
399          mp4        1920x1080  1080p60 HDR 2151k , mp4_dash container, av01.0.09M.10.0.110.09.16.09.0@2151k, 60fps, video only, 80.49MiB
303          webm       1920x1080  1080p60 3475k , webm_dash container, vp9@3475k, 60fps, video only, 130.01MiB
299          mp4        1920x1080  1080p60 4376k , mp4_dash container, avc1.64002a@4376k, 60fps, video only, 163.70MiB
699          mp4        1920x1080  1080p60 HDR 6358k , mp4_dash container, av01.0.09M.10.0.110.09.16.09.0@6358k, 60fps, video only, 237.83MiB
335          webm       1920x1080  1080p60 HDR 6738k , webm_dash container, vp9.2@6738k, 60fps, video only, 252.04MiB
400          mp4        2560x1440  1440p60 HDR 5529k , mp4_dash container, av01.0.12M.10.0.110.09.16.09.0@5529k, 60fps, video only, 206.83MiB
308          webm       2560x1440  1440p60 10376k , webm_dash container, vp9@10376k, 60fps, video only, 388.14MiB
700          mp4        2560x1440  1440p60 HDR 15170k , mp4_dash container, av01.0.12M.10.0.110.09.16.09.0@15170k, 60fps, video only, 567.45MiB
336          webm       2560x1440  1440p60 HDR 16231k , webm_dash container, vp9.2@16231k, 60fps, video only, 607.14MiB
401          mp4        3840x2160  2160p60 HDR 11707k , mp4_dash container, av01.0.13M.10.0.110.09.16.09.0@11707k, 60fps, video only, 437.93MiB
315          webm       3840x2160  2160p60 25573k , webm_dash container, vp9@25573k, 60fps, video only, 956.58MiB
701          mp4        3840x2160  2160p60 HDR 28033k , mp4_dash container, av01.0.13M.10.0.110.09.16.09.0@28033k, 60fps, video only, 1.02GiB
337          webm       3840x2160  2160p60 HDR 28869k , webm_dash container, vp9.2@28869k, 60fps, video only, 1.05GiB
18           mp4        640x360    360p  642k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 24.03MiB
22           mp4        1280x720   720p 1669k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best)


    


    Then I search for a 1080p60 stream with avc1, which leads to format code 299 in this list and then choose a fitting audio stream, like format code 140.

    


    Through the script youtube-dl catches the links for the respective format code, which get joined with ffmpeg as a matroska file and the send to VLC.

    


    But this method lags ; in my opinion because it seems not to cache the stream, like MPV does. And there is not seeking option ; when I try to seek it pops back to the beginning.

    


    I tried it with adding -bufsize 6750k to the ffmpeg line, but that did not help either.
I also added the VLC option --sout-mux-caching 30000 where I thought VLC would get a bigger cache to buffer the stream, but that did not help, too.

    


    So, how could I play back this as a smooth stream in VLC ?

    


    Also, my solution might not the best to start with, so please don't take this as a reference, it was just an attempt by my side with my sparse knowledge how I would handle the situation.

    


    If there are better alternatives, you can of course post them, too. ;)

    



    


    I also want to add, that the script, which I posted above, works well, when I use the 134 format code with a far lesser resolution, so somewhere seems to be a bottleneck.

    



    


    Attachment 1 :

    


    Output with format codes 299+140 :

    


    Output

    


    Attachment 2 :

    


    Output with format codes 134+140 :

    


    Output

    



    


    Should the pastebin not work, here is an alternative link to the outputs.

    



    


    I terminated the program after several seconds with Ctrl-C, so the output won't be that big, thought it could help to find an answer on this.

    



    


    Just for reference :
After pressing Ctrl-C this line appeared :

    


    QObject::~QObject: Timers cannot be stopped from another thread


    


  • 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;