Recherche avancée

Médias (91)

Autres articles (45)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette 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.

  • 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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (5836)

  • How to make a MPEG-DASH MPD which starts the playback in the middle of the first segment ?

    18 septembre 2018, par ravin.wang

    Here are the reproduce steps :

    1. Normalize an H.264 video stream

      ffmpeg -i 2.h264 -c:v libx264 -intra -r 25 -vf scale=640x360,setdar=16:9 2@25fps@intra@640x360.h264

      (*) After that, I got an H.264 stream where all pictures are H.264 IDR frames, and fps is 25, resolution is 640x360, aspect-ratio is 16:9.

    2. Generate an MP4 file

      MP4Box -add 2@25fps@intra@640x360.h264:timescale=1000 -fps 25 2@25fps@intra@640x360.mp4

    3. Make dash MP4 fragmented content, including init mp4, .m4s files and one .mpd file

      MP4Box -dash 5000 -frag 5000 -dash-scale 1000 -frag-rap -segment-name ’seg_second$Number$’ -segment-timeline -profile live 2@25fps@intra@640x360.mp4

    4. Copy and publish all these files to a folder under one HTTPD server
    5. I want to play from 4s of the first segment, and don’t display any frames before 4s, so I changed the .MPD file to modify the fields "SegmentTemplate@presentationTimeOffset", "SegmentTimeline:S@d/t", like as :

      <?xml version="1.0"?>
      <mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500S" type="static" mediapresentationduration="PT0H0M26.000S" maxsegmentduration="PT0H0M5.000S" profiles="urn:mpeg:dash:profile:isoff-live:2011">
      <period duration="PT0H0M26.000S">
      <adaptationset segmentalignment="true" maxwidth="640" maxheight="360" maxframerate="25" par="16:9" lang="und">
       <segmenttemplate presentationtimeoffset="4000" media="seg_second$Number$.m4s" timescale="1000" startnumber="1" initialization="seg_secondinit.mp4">
         <segmenttimeline>
             <s d="1000" t="4000"></s>
             <s d="5000" r="4"></s>
         </segmenttimeline>
        </segmenttemplate>
      <representation mimetype="video/mp4" codecs="avc3.64101E" width="640" height="360" framerate="25" sar="1:1" startwithsap="1" bandwidth="2261831">
      </representation>
      </adaptationset>
      </period>
      </mpd>


    6. Play the MPD url from VLC player, or Edge browser, it always starts the the first frame of the first segment, the frames between 0s 4s are also displayed unexpectedly.

    What’s wrong with my steps ? Or any other options for it ?

  • How to use argument with dash in name in ffmpeg-python ?

    8 mai 2023, par orderlyfashion

    Following is a simple ffmpeg command line for encoding an input video into a AV1 output with CRF 30 :

    &#xA;

    ffmpeg -i input.mkv -c:v libsvtav1 -crf 30 output.mkv&#xA;

    &#xA;

    Converting that command line into the syntax of ffmpeg-python is pretty straight-forward :

    &#xA;

    (&#xA;    ffmpeg&#xA;    .input(&#x27;input.mkv&#x27;)&#xA;    .output(&#x27;output.mkv&#x27;, vcodec=&#x27;libsvtav1&#x27;, crf=30)&#xA;    .run()&#xA;)&#xA;

    &#xA;

    However, what happens if we want to specify the fast-decode option ? In ffmpeg that would mean extending our command line to include -svtav1-params fast-decode=1, i.e. :

    &#xA;

    ffmpeg -i input.mkv -c:v libsvtav1 -crf 30 -svtav1-params fast-decode=1 output.mkv&#xA;

    &#xA;

    How do we specify the same thing in ffmpeg-python ? Adding svtav1-params=&#x27;fast-decode=1&#x27; into the output arguments results in invalid Python code since variables are not allowed to have dash in the name :

    &#xA;

    (&#xA;    ffmpeg&#xA;    .input(&#x27;input.mkv&#x27;)&#xA;    .output(&#x27;output.mkv&#x27;, vcodec=&#x27;libsvtav1&#x27;, crf=30, svtav1-params=&#x27;fast-decode=1&#x27;)&#xA;    .run()&#xA;)&#xA;# Error: Expected parameter name&#xA;

    &#xA;

    Replacing the dash with an underscore in the name makes ffmpeg-python read it literally which doesn't translate into a valid ffmpeg command line.

    &#xA;

    How is it possible to specify fast-decode and other svtav1-params specific arguments in ffmpeg-python ?

    &#xA;

  • FFMPEG Mpeg-DASH what attributes options and flags do we need to make H264 playable .mpd universally playable

    22 mars 2021, par Jintor

    I want to encode from any source to a universally playable .mpd with h264 codec.

    &#xA;

    Here my command

    &#xA;

    /usr/bin/ffmpeg -re -i 1.webm -c:v libx264 -preset ultrafast &#xA;-tune zerolatency -c:a aac -ac 2 -strict -2 -crf 18 -profile:v baseline &#xA;-maxrate 1000k -pix_fmt yuv420p -flags -global_header -streaming 1 &#xA;-use_template 1 -use_timeline 0 -seg_duration 2 -remove_at_exit 1 &#xA;-f dash index.mpd&#xA;

    &#xA;

    but with dash.js the log says

    &#xA;

    dash.js videoCodec (video/mp4;codecs="avc1") is not supported.&#xA;

    &#xA;

    **EXTRA NOTE : When using -c:v libx264 and output in HLS .m3u8 —> it's working in all browsers

    &#xA;

    HTML with dash.js

    &#xA;

    <code class="echappe-js">&lt;script src=&quot;http://cdn.dashjs.org/latest/dash.all.min.js&quot;&gt;&lt;/script&gt;&#xA;    

    &#xA; &lt;script&gt;&amp;#xA;    (function(){&amp;#xA;        var url = &quot;https://www.---domain--path-to.mpd&quot;;&amp;#xA;        var player = dashjs.MediaPlayer().create();&amp;#xA;        player.initialize(document.querySelector(&quot;#videoPlayer&quot;), url, true);&amp;#xA;player.updateSettings({&amp;#xA;            streaming: {&amp;#xA;                 lowLatencyEnabled: true, &amp;#xA;                 liveDelay: 4,&amp;#xA;                 liveCatchup: {&amp;#xA;                    minDrift: 0.02,&amp;#xA;                    maxDrift: 0,&amp;#xA;                    playbackRate: 0.5,&amp;#xA;                    latencyThreshold: 60    &amp;#xA;                  }&amp;#xA;            }&amp;#xA;        });&amp;#xA;    })();     &amp;#xA;    video = document.getElementById(&quot;videoPlayer&quot;);&amp;#xA;    video.addEventListener(&quot;loadedmetadata&quot;, function(){ video.muted = true; video.play(); }, false);&amp;#xA;    &lt;/script&gt;&#xA;

    &#xA;

    I do have "-c:v libx264" but why dash.js sees avc1... I know that h264 have avc1, but how to fix this. Is it fixing the ffmpeg command or changing the player.initialize in the javascript

    &#xA;