Recherche avancée

Médias (91)

Autres articles (29)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

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

    31 janvier 2010, par

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

Sur d’autres sites (2768)

  • FFMPEG generates an empty master playlist

    23 octobre 2019, par Сергей Барахтенко

    I use the following FFMPEG command to generate playlists and a master-playlist for later insertion into a player with HLS support :

    ffmpeg/ffmpeg.exe -i input/test.mp4
    -preset fast  
    -g 150
    -sc_threshold 0
    -threads 4
    -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0
    -filter:v:0 scale=h=240:w=-2  -minrate:v:0 75k  -maxrate:v:0 218k  -bufsize:v:0 300k -b:v:0 150k  
    -filter:v:1 scale=h=360:w=-2  -minrate:v:1 138k -maxrate:v:1 400k -bufsize:v:1 552k -b:v:1 276k
    -filter:v:2 scale=h=480:w=-2 -minrate:v:2 375k -maxrate:v:2 1088k -bufsize:v:2 1500k -b:v:2 750k
    -filter:v:3 scale=h=720:w=-2  -minrate:v:3 512k -maxrate:v:3 1485k -bufsize:v:3 2048k -b:v:3 1024k
    -var_stream_map "v:0,a:0 v:1,a:1 v:2,a:2 v:3,a:3"
    -master_pl_name master.m3u8
    -f hls -hls_time 6 -segment_time 6 -hls_list_size 0 -segment_format mpegts
    -hls_playlist_type vod -hls_segment_filename "output/conversion/K8eYn1X1/res-%v/segment-%d.ts"  output/conversion/K8eYn1X1/res-%v/playlist.m3u8

    Based on information from various sources, this command line should do the following :

    1. take a video stream from the input file,

    2. apply filters with different settings four times,

    3. combine it into one stream,

    4. cut into TS-fragments for 6 seconds,

    5. write information about each resolution to the playlist.m3u8,

    6. create a master-playlist and write information about upcoming playlists in it

    Everything works correctly, BUT : fragments are created, playlists are created, but the master file is empty

    If you play with the command line, more precisely, leave only one filter, then everything works fine : and fragments are cut and playlists are created and a master-playlist is also created

    Also, I noticed that if I watched the folder in which all the files are stored, I noticed one thing : when using the command given above, a 7kb file is created, and then in the same second, it seems to be cleared . Why is this happening, I do not understand

    Upon completion of processing in the log, the last line :

    [hls @ 000001ff73b87200] Opening 'output/conversion/K8eYn1X1/master.m3u8' for writing

    Maybe I’m doing something wrong ? Maybe the commands are in the wrong order ? Tell me, who knows ?

    Thanks

  • FFMPEG : Generate mastered m3u8 playlist

    22 octobre 2019, par Сергей Барахтенко

    Tell the command line for FFMPEG to generate a playlist of the following format :

    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=380000,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.77.30",CLOSED-CAPTIONS=NONE
    https://myurl/media/manifest/[input_file_name]-360.m3u8
    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1510000,RESOLUTION=1920x1080,CODECS="mp4a.40.2,avc1.77.30",CLOSED-CAPTIONS=NONE
    https://myurl/media/manifest/[input_file_name]-1080.m3u8
    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=890000,RESOLUTION=1280x720,CODECS="mp4a.40.2,avc1.77.30",CLOSED-CAPTIONS=NONE
    https://myurl/media/manifest/[input_file_name]-720.m3u8
    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=250000,RESOLUTION=320x180,CODECS="mp4a.40.2,avc1.77.30",CLOSED-CAPTIONS=NONE
    https://myurl/media/manifest/[input_file_name]-180.m3u8

    As you can see from the example, the file contains links to other m3u8 playlists, which are downloaded depending on the network bandwidth (BANDWIDTH parameter)

    An example of an internal m3u8 playlist (playlist [input_file_name]-360.m3u8)

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-PLAYLIST-TYPE:VOD
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-TARGETDURATION:4
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-1.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-2.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-3.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-4.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-5.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-6.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-7.ts
    #EXTINF:4.000,
    https://myurl/media/conversion/[input_file_name]-360.mp4-8.ts
    ...
    #EXT-X-ENDLIST

    As you can see from it, the source file was divided into 8 TS segments

  • In ffmpeg : Can't get peak bitrate values within 10% error tolerance for HLS playlist files

    5 octobre 2019, par ALS20394

    I’m using ffmpeg to produce several HLS variant playlists from an .mp4 file. When I check master.m3u8 file with mediastreamvalidator I get :

    Error : Measured peak bitrate compared to master playlist declared value exceeds error tolerance

    I understand that the error percentage needs to be less than 10%, and figured it out on 1 variant but not the three others. I’ve spent quite a bit of time adjusting the -maxrate and the -buffsize but the error percentage change is minimal. Beginning to wonder if I’m misunderstanding something ?

    This is the latest of what I enter :

    ffmpeg -i FHVid.mp4 \
    -b:v:0 5000k -maxrate 5250k -bufsize 5500k -profile:v main -c:v h264 -crf 20 -sc_threshold 0 -g 48 \
    -b:v:1 2800k -maxrate 2940k -bufsize 3100k -profile:v main -c:v h264 -crf 20 -sc_threshold 0 -g 48 \
    -b:v:2 1400k -maxrate 1540k -bufsize 1700k -profile:v main -c:v h264 -crf 20 -sc_threshold 0 -g 48 \
    -b:v:3 800k -maxrate 840k -bufsize 1050k -profile:v main -c:v h264 -crf 20 -sc_threshold 0 -g 48 \
    -b:a:0 192k \
    -b:a:1 128k \
    -b:a:2 128k \
    -b:a:3 96k \
    -c:a aac -ar 48000 -keyint_min 48 -map 0:v -map 0:a -map 0:v -map 0:a -map 0:v -map 0:a -map 0:v -map 0:a \
    -f hls -var_stream_map "v:0,a:0  v:1,a:1 v:2,a:2 v:3,a:3" \
    -master_pl_name FHVidmaster.m3u8 -hls_time 4 -hls_playlist_type vod \
    -hls_segment_filename 'file_%v_%03d.ts' out_%v.m3u8

    but I’ve also tried max rates that seem to be more standard

    -b:v:0 5000k -maxrate 5500k -bufsize 6500k
    -b:v:1 2800k -maxrate 3080k -bufsize 3200k
    -b:v:2 1400k -maxrate 1540k -bufsize 1900k
    -b:v:3 800k -maxrate 880k -bufsize 1050k

    The latest error message :

    Error: Measured peak bitrate compared to master playlist declared value exceeds error tolerance
    --> Detail:  Measured: 1111.54 kb/s, Master playlist: 1680.80 kb/s, Error: 33.87%
    --> Source:  /Users/Bun/Documents/CODING/CosmicPerspectiveAssets/01-FalconHeavy/HLS/FHVidmaster.m3u8
    --> Compare: out_2.m3u8

    --> Detail:  Measured: 1178.21 kb/s, Master playlist: 5711.20 kb/s, Error: 79.37%
    --> Source:  /Users/Bun/Documents/CODING/CosmicPerspectiveAssets/01-FalconHeavy/HLS/FHVidmaster.m3u8
    --> Compare: out_0.m3u8

    --> Detail:  Measured: 1109.03 kb/s, Master playlist: 3220.80 kb/s, Error: 65.57%
    --> Source:  /Users/Bun/Documents/CODING/CosmicPerspectiveAssets/01-FalconHeavy/HLS/FHVidmaster.m3u8
    --> Compare: out_1.m3u8

    Any help would be greatly appreciated on the -maxrate and -buffsize for variant playlists 0, 1, and 2. No adjustment I make seems to make any difference.