Advanced search

Medias (91)

Other articles (33)

  • La sauvegarde automatique de canaux SPIP

    1 April 2010, by

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • HTML5 audio and video support

    13 April 2011, by

    MediaSPIP 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 (...)

  • De l’upload à la vidéo finale [version standalone]

    31 January 2010, by

    Le 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 (...)

On other websites (5564)

  • Why Video and Audio Don't Match?

    19 August 2021, by Ohpy

    there is an ffmpeg code.

    


    fmpeg -i "1.mp4" -vf "zoompan=z='if(lte(mod(time,4.99),2.03),4,0)':d=1:x=iw/2-(iw/zoom/2):y=ih/2-(ih/zoom/2):fps=23.98" -af "firequalizer=gain_entry='entry(0,-23);entry(250,-1100.5);entry(1000,0);entry(4000,1);entry(16000,16)'" -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -threads 0 -preset superfast 1OUT.mp4


    


    This code zooms in and out of the image in the video. It also changes the sound frequency.

    


    When the process of the video is finished, the image in the video and the sound do not match.

    


    For example, the sound that should be at the 10th second of the video is at the 15th second. How can I prevent this?

    


    Can you help me?

    


  • APPLY Strong to Buffer rule. Quit Switching Bit rates MPEG DASH

    14 July 2015, by Vinay

    I 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 issue

    Whenever 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 DASH encoding: always getting bitrate as 200k for vp9 codec

    29 November 2019, by Saurabh

    I am using following command, earlier put here: to generate DASH files:

    ffmpeg -y -nostdin -loglevel error -i "$1" \
           -map 0:v:0  -map 0:v:0 -map 0:v:0  -map 0:v:0  -map 0:v:0  -map 0:v:0 -map 0:a\?:0  \
           -maxrate:v:0 350k -bufsize:v:0 700k -c:v:0 libx264 -filter:v:0 "scale=320:-2"  \
           -maxrate:v:1 1000k -bufsize:v:1 2000k -c:v:1 libx264 -filter:v:1 "scale=640:-2"  \
           -maxrate:v:2 3000k -bufsize:v:2 6000k -c:v:2 libx264 -filter:v:2 "scale=1280:-2" \
           -maxrate:v:3 300k -minrate:v:3 100k -bufsize:v:3 600k -c:v:3 libvpx-vp9 -filter:v:3 "scale=320:-2"  \
           -maxrate:v:4 1088k -minrate:v:4 200k -bufsize:v:4 2176k -c:v:4 libvpx-vp9 -filter:v:4 "scale=640:-2"  \
           -maxrate:v:5 1500k -minrate:v:5 300k -bufsize:v:5 3000k -c:v:5 libvpx-vp9 -filter:v:5 "scale=1280:-2"  \
           -use_timeline 1  -use_template 1 -adaptation_sets "id=0,streams=0,1,2 id=1,streams=3,4,5 id=2,streams=a" \
           -threads 8 -crf 3 -seg_duration 5 -hls_init_time 1 -hls_time 5 -hls_playlist true -f dash "$2"

    The issue is, in the output, I always get bandwidth as 200k for vp9 codec(see output below), while for same video bandwidth for h264 codec varies as par resolution and quite less, I expected vp9 to be even less as it compresses more. I have tested using multiple different options like: -b:v, -deadline, -cpu-used -crf, etc, but not working expected with different values of these, What am I missing?

    Sample output mpd file:

    &lt;?xml version="1.0" encoding="utf-8"?>
    <mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT25.4S" minbuffertime="PT15.0S">
       <programinformation>
       </programinformation>
       <period start="PT0.0S">
           <adaptationset contenttype="video" segmentalignment="true" bitstreamswitching="true" lang="und">
               <representation mimetype="video/mp4" codecs="avc1.64000c" bandwidth="104972" width="320" height="180" framerate="24000/1001">
                   <segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
                       <segmenttimeline>
                           <s t="0" d="130130"></s>
                           <s d="250250"></s>
                           <s d="176176"></s>
                           <s d="54054"></s>
                       </segmenttimeline>
                   </segmenttemplate>
               </representation>
               <representation mimetype="video/mp4" codecs="avc1.64001e" bandwidth="227233" width="640" height="360" framerate="24000/1001">
                   <segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
                       <segmenttimeline>
                           <s t="0" d="130130"></s>
                           <s d="250250"></s>
                           <s d="180180"></s>
                           <s d="50050"></s>
                       </segmenttimeline>
                   </segmenttemplate>
               </representation>
               <representation mimetype="video/mp4" codecs="avc1.64001f" bandwidth="616878" width="1280" height="720" framerate="24000/1001">
                   <segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
                       <segmenttimeline>
                           <s t="0" d="130130"></s>
                           <s d="250250"></s>
                           <s d="180180"></s>
                           <s d="50050"></s>
                       </segmenttimeline>
                   </segmenttemplate>
               </representation>
           </adaptationset>
           <adaptationset contenttype="video" segmentalignment="true" bitstreamswitching="true" lang="und">
               <representation mimetype="video/mp4" codecs="vp09.00.11.08" bandwidth="200000" width="320" height="180" framerate="24000/1001">
                   <segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
                       <segmenttimeline>
                           <s t="0" d="128128" r="3"></s>
                           <s d="98098"></s>
                       </segmenttimeline>
                   </segmenttemplate>
               </representation>
               <representation mimetype="video/mp4" codecs="vp09.00.21.08" bandwidth="200000" width="640" height="360" framerate="24000/1001">
                   <segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
                       <segmenttimeline>
                           <s t="0" d="128128" r="3"></s>
                           <s d="98098"></s>
                       </segmenttimeline>
                   </segmenttemplate>
               </representation>
               <representation mimetype="video/mp4" codecs="vp09.00.31.08" bandwidth="200000" width="1280" height="720" framerate="24000/1001">
                   <segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
                       <segmenttimeline>
                           <s t="0" d="128128" r="3"></s>
                           <s d="98098"></s>
                       </segmenttimeline>
                   </segmenttemplate>
               </representation>
           </adaptationset>
           <adaptationset contenttype="audio" segmentalignment="true" bitstreamswitching="true" lang="eng">
               <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="128000" audiosamplingrate="44100">
                   <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
                   <segmenttemplate timescale="44100" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
                       <segmenttimeline>
                           <s t="0" d="235520" r="3"></s>
                           <s d="180224"></s>
                       </segmenttimeline>
                   </segmenttemplate>
               </representation>
           </adaptationset>
       </period>
    </mpd>

    I am using this video, but it is coming same for all 30 sec video I have tried.