Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (3)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

  • HTML5 audio and video support

    13 avril 2011, par

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

Sur d’autres sites (3589)

  • ffmpeg : md5 of m3u8 playlists generated from same input video with different segment durations (after applying video filter) don't match

    15 juillet 2020, par Saurabh P Bhandari

    Here are a few commands I am using to convert and transize a video in mp4 format to a m3u8 playlist.

    


    For a given input video (mp4 format), generate multiple video only segments with segment duration 30s

    


    ffmpeg -loglevel error -i input.mp4 -dn -sn -an -c:v copy -bsf:v h264_mp4toannexb -copyts -start_at_zero -f segment -segment_time 30 30%03d.mp4 -dn -sn -vn -c:a copy audio.aac


    


    Apply video filter (in this case scaling) on each segment and convert it to a m3u8 format

    


    ls 30*.mp4 | parallel 'ffmpeg -loglevel error -i {} -vf scale=-2:144 -hls_list_size 0 {}.m3u8'


    


    Store the list of m3u8 files generated in list.txt in this format file 'segment-name.m3u8'

    


    for f in 30*.m3u8; do echo "file '$f'" >> list.txt; done


    


    Using concat demuxer, combine all segment files (which are in m3u8 format) and the audio to get one final m3u8 playlist pointing to segments with duration of 10s.

    


    ffmpeg -loglevel error -f concat -i list.txt -i audio.aac -c copy -hls_list_size 0 -hls_time 10 output_30.m3u8


    



    


    I can change the segment duration in the first step from 30s to 60s, and compare the md5 of the final m3u8 playlist generated in both the cases using this command

    


    ffmpeg -loglevel error -i <input m3u8="m3u8" playlist="playlist" /> -f md5 - &#xA;

    &#xA;

    The md5 of the output files differ i.e video streams of output_30.m3u8 and output_60.m3u8 are not the same.

    &#xA;

    Can anyone elaborate on this ?

    &#xA;

    (I expected the md5 to be the same)

    &#xA;

  • subprocess called from multiprocess not finishing

    24 juin 2020, par Pavel Komarov

    I've got a set of videos from which I'm trying to pull random frames. There are a lot of videos, so I want to work in parallel, and ffmpeg can splice out the frames for me, so here's the important part of the code :

    &#xA;

    import os&#xA;from tqdm import tqdm&#xA;from joblib import Parallel, delayed&#xA;from multiprocessing import current_process&#xA;from subprocess import Popen&#xA;&#xA;vids_dir = &#x27;just a string&#x27;&#xA;out_dir = &#x27;another string&#x27;&#xA;&#xA;def process_each(f):&#xA;    temp = &#x27;temp&#x27; &#x2B; str(current_process()._identity[0])&#xA;    os.mkdir(temp)&#xA;&#xA;    proc = Popen([&#x27;ffmpeg -i &#x27; &#x2B; vids_dir &#x2B; &#x27;/&#x27; &#x2B; f &#x2B; &#x27; &#x27; &#x2B; temp &#x2B; &#x27;/&#x27; &#x2B; f[:-4] &#x2B; &#x27;_%03d.jpg &amp;> /dev/null&#x27;], shell=True) # convert to frames&#xA;    proc.wait()&#xA;&#xA;    # do stuff&#xA;&#xA;    os.system(&#x27;rm -rf &#x27; &#x2B; temp) # clean up&#xA;&#xA;&#xA;Parallel(n_jobs=10)(delayed(process_each)(f) for f in tqdm(os.listdir(vids_dir)))&#xA;

    &#xA;

    I can print out the command being passed to Popen and execute it in a shell, and it works. I can open a python3 session and call the command from Popen or subprocess.call or even os.system, and it works. I can even set n_jobs=1 in my Parallel, and it works.

    &#xA;

    But the moment I actually parallelize this, I find ffmpeg doesn't flush its full results to the temporary folders ; it only gets the first one or few frames.

    &#xA;

    What on earth could be going on ? subprocess and multiprocessing should be able to mix this way.

    &#xA;

  • Transcode HLS segments individually with FFMPEG

    9 juillet 2020, par Mathix420

    I'm trying to transcode a video in HLS, by first splitting the video in segments without encoding changes and then transcode all segments individually. I'm trying to achieve this so I can transcode a video in multiple EC2 instances in parallel to be more time efficient.

    &#xA;

    I am using this scipt right now

    &#xA;

    # Split input file in multiple segments&#xA;&#xA;ffmpeg -hide_banner -y -i $input -c copy -map 0 -an -segment_time 4 -reset_timestamps 1 -f segment output%03d.webm&#xA;&#xA;# Transcode each segments in multiple resolutions&#xA;&#xA;find . -name &#x27;output*.webm&#x27; -exec ffmpeg -hide_banner -y -i {} \&#xA;  -vf "scale=-2:360" -c:v libx264 -profile:v main -crf 20 -sc_threshold 0 -b:v 800k -maxrate 856k -bufsize 1200k {}.360p.ts \&#xA;  -vf "scale=-2:480" -c:v libx264 -profile:v main -crf 20 -sc_threshold 0 -b:v 1400k -maxrate 1498k -bufsize 2100k {}.480p.ts \&#xA;  -vf "scale=-2:720" -c:v libx264 -profile:v main -crf 20 -sc_threshold 0 -b:v 2800k -maxrate 2996k -bufsize 4200k {}.720p.ts \&#xA;  -vf "scale=-2:1080" -c:v libx264 -profile:v main -crf 20 -sc_threshold 0 -b:v 5000k -maxrate 5350k -bufsize 7500k {}.1080p.ts \;&#xA;

    &#xA;

    But then when I tried to get all segments durations to make an m3u8 playlist (with the command below)

    &#xA;

    # List segments duration&#xA;&#xA;find . -name &#x27;output*.webm.360p.ts&#x27; \&#xA;  -exec echo -n {} \; \&#xA;  -exec ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 {} \;&#xA;

    &#xA;

    I got this result

    &#xA;

    output000.webm.360p.ts 5.120000&#xA;output001.webm.360p.ts 5.120000&#xA;output002.webm.360p.ts 4.400000&#xA;output003.webm.360p.ts 5.480000&#xA;output004.webm.360p.ts 0.360000&#xA;output005.webm.360p.ts 5.120000&#xA;output006.webm.360p.ts 4.960000&#xA;output007.webm.360p.ts 0.001000&#xA;

    &#xA;

    I can't figure out why my output004 is only 0.360000 seconds long.

    &#xA;

    When I tried to play it with VLC it just shows one or two frames then main decoder error: buffer deadlock prevented.

    &#xA;

    Thanks for trying to help me !

    &#xA;