
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (64)
-
Publier sur MédiaSpip
13 juin 2013Puis-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 -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP 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 (...)
Sur d’autres sites (9156)
-
FFMPEG : Error writing trailer of v%v/index.m3u8 : Cannot allocate memory
7 avril 2023, par user3309447I wanted to convert one video track and 2 audio tracks to HLS by combining them.
That means, the HLS conversion has to be multi-bitrate and multi-language both.


What do I want to achieve ?
I have to prepare an HLS stream for 3 resolutions, namely, 720px, 480px and 360px.
Also, there will be 2 audio tracks in the resultant stream, one English and another Hindi.
I am running the below command and getting the error as described below.
Can anybody help me out ?


Command :


ffmpeg-5.0.1-amd64-static/ffmpeg -i raw/vid_only.mp4 -i raw/english.mp3 -i raw/hindi.mp3 \
-c:a:0 aac \
-c:a:1 aac \
-filter_complex \
"[0:v]split=3[v1][v2][v3]; \
[v1]scale=w=1280:h=720[v1out]; [v2]scale=w=854:h=480[v2out]; [v3]scale=w=640:h=360[v3out]" \
-map [v1out] -c:v:0 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:0 5M -maxrate:v:0 5M -minrate:v:0 5M -bufsize:v:0 10M -preset slow -g 48 -sc_threshold 0 -keyint_min 48 \
-map [v2out] -c:v:1 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:1 3M -maxrate:v:1 3M -minrate:v:1 3M -bufsize:v:1 3M -preset slow -g 48 -sc_threshold 0 -keyint_min 48 \
-map [v3out] -c:v:2 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:2 1M -maxrate:v:2 1M -minrate:v:2 1M -bufsize:v:2 1M -preset slow -g 48 -sc_threshold 0 -keyint_min 48 \
-map 1:a -c:a:0 aac -b:a:0 96k -ac 2 \
-map 1:a -c:a:1 aac -b:a:1 96k -ac 2 \
-map 1:a -c:a:2 aac -b:a:2 48k -ac 2 \
-map 2:a -c:a:0 aac -b:a:0 96k -ac 2 \
-map 2:a -c:a:1 aac -b:a:1 96k -ac 2 \
-map 2:a -c:a:2 aac -b:a:2 48k -ac 2 \
-var_stream_map "a:0,agroup:audio,default:yes a:1,agroup:audio v:0,agroup:audio" \
-var_stream_map "v:0,name:720p v:1,name:480p v:2,name:360p" v%v/index.m3u8 \
-master_pl_name master.m3u8 \
-f hls \
-hls_time 6 \
-hls_list_size 0 \
-hls_playlist_type vod \
-hls_flags independent_segments \
-hls_segment_type mpegts \
-hls_segment_filename v%v/data%02d.ts \
-max_muxing_queue_size 80072 \
-muxing_queue_data_threshold 30036



Output :


[hls @ 0x59c3340] Unable to find mapping variant stream00:00.00 bitrate=N/A speed= 0x 
av_interleaved_write_frame(): Cannot allocate memory
[hls @ 0x59c3340] Unable to find mapping variant stream
av_interleaved_write_frame(): Cannot allocate memory
[hls @ 0x59c3340] Unable to find mapping variant stream
av_interleaved_write_frame(): Cannot allocate memory
[hls @ 0x59c3340] Unable to find mapping variant stream
av_interleaved_write_frame(): Cannot allocate memory
[hls @ 0x59c3340] Unable to find mapping variant stream
av_interleaved_write_frame(): Cannot allocate memory
[hls @ 0x59c3340] Unable to find mapping variant stream
av_interleaved_write_frame(): Cannot allocate memory
[hls @ 0x59c3340] Unable to find mapping variant stream
[hls @ 0x59c3340] Opening 'v720p/index0.ts' for writing
[hls @ 0x59c3340] Opening 'v720p/index.m3u8.tmp' for writing
[hls @ 0x59c3340] Opening 'v480p/index0.ts' for writing
[hls @ 0x59c3340] Opening 'v480p/index.m3u8.tmp' for writing
[hls @ 0x59c3340] Opening 'v360p/index0.ts' for writing
[hls @ 0x59c3340] Opening 'v360p/index.m3u8.tmp' for writing
Error writing trailer of v%v/index.m3u8: Cannot allocate memory



-
Could not find ref with POC ffmpeg H265
7 juin 2021, par user1307697I'm trying to develop a video streaming with H265. Unfortunately, in decoding phase, I have these errors :


[hevc @ 0x5563d05b4940] Could not find ref with POC


and the resulting frames are corrupted.


I cannot understand the meaning of this type of error. How can I fix it ?


-
Generating DASH manifest with ffmpeg works in Docker exec shell but not in os.exec golang
22 février 2023, par InquisitorI am trying to generate a DASH manifest with ffmpeg using this command


/usr/bin/ffmpeg -f webm_dash_manifest -i ./480.webm -f webm_dash_manifest -i ./audio.webm -c copy -map 0:0 -map 1:0 -y -f webm_dash_manifest -adaptation_sets "id=0,streams=0 id=1,streams=1" ./manifest.mpd -loglevel repeat+level+verbose



I run this in go, in a docker container as shown :


func runFFmpeg(arguments []string) {
 arguments = append(arguments, "-loglevel", "repeat+level+verbose")
 cmd := exec.Command("ffmpeg", arguments...)

 fmt.Printf("cmd: %v\n", cmd)

 var out bytes.Buffer
 var stderr bytes.Buffer
 cmd.Stdout = &out
 cmd.Stderr = &stderr
 err := cmd.Run()

 if err != nil {
 log.Println(err)
 log.Println(stderr.String())
 }
}
runFFmpeg([]string{"-f", "webm_dash_manifest", "-i", "./480.webm", "-f", "webm_dash_manifest", "-i", "./audio.webm", "-c", "copy", "-map", "0:0", "-map", "1:0", "-y", "-f", "webm_dash_manifest", "-adaptation_sets", "\"id=0,streams=0 id=1,streams=1\"", "./manifest.mpd"})



But I get this output :


cmd: /usr/bin/ffmpeg -f webm_dash_manifest -i ./480.webm -f webm_dash_manifest -i ./audio.webm -c copy -map 0:0 -map 1:0 -y -copy_unknown -f webm_dash_manifest -adaptation_sets "id=0,streams=0 id=1,streams=1" ./manifest.mpd -loglevel repeat+level+verbose
 2023/02/22 04:45:17 exit status 1
 2023/02/22 04:45:17 [info] ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
 [info] built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r3) 20220924
 [info] configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1
 [info] libavutil 57. 28.100 / 57. 28.100
 [info] libavcodec 59. 37.100 / 59. 37.100
 [info] libavformat 59. 27.100 / 59. 27.100
 [info] libavdevice 59. 7.100 / 59. 7.100
 [info] libavfilter 8. 44.100 / 8. 44.100
 [info] libswscale 6. 7.100 / 6. 7.100
 [info] libswresample 4. 7.100 / 4. 7.100
 [info] libpostproc 56. 6.100 / 56. 6.100
 [webm_dash_manifest @ 0x7fcec2836100] [warning] Could not find codec parameters for stream 0 (Video: vp9, 1 reference frame, none(tv, progressive, left), 640x480): unspecified pixel format
 Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
 [info] Input #0, webm_dash_manifest, from './480.webm':
 [info] Metadata:
 [info] title : Big Buck Bunny, Sunflower version
 [info] GENRE : Animation
 [info] MAJOR_BRAND : isom
 [info] MINOR_VERSION : 1
 [info] COMPATIBLE_BRANDS: isomavc1
 [info] COMPOSER : Sacha Goedegebure
 [info] ARTIST : Blender Foundation 2008, Janus Bager Kristensen 2013
 [info] COMMENT : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
 [info] ENCODER : Lavf59.27.100
 [info] Duration: 00:10:34.60, bitrate: 352 kb/s
 [info] Stream #0:0: Video: vp9, 1 reference frame, none(tv, progressive, left), 640x480, SAR 853:640 DAR 853:480, 30 fps, 30 tbr, 1k tbn (default)
 [info] Metadata:
 [info] HANDLER_NAME : GPAC ISO Video Handler
 [info] VENDOR_ID : [0][0][0][0]
 [info] ENCODER : Lavc59.37.100 libvpx-vp9
 [info] DURATION : 00:10:34.600000000
 [info] webm_dash_manifest_duration: 634600
 [info] webm_dash_manifest_initialization_range: 889
 [info] webm_dash_manifest_file_name: 480.webm
 [info] webm_dash_manifest_track_number: 1
 [info] webm_dash_manifest_cues_start: 27924928
 [info] webm_dash_manifest_cues_end: 27927508
 [info] webm_dash_manifest_bandwidth: 738287
 [info] webm_dash_manifest_cluster_keyframe: 1
 [info] webm_dash_manifest_cue_timestamps: 67,5067,10067,15067,20067,25067,30067,35067,40067,45067,50067,55067,60067,65067,70067,75067,80067,85067,90067,95067,100067,105067,110067,115067,120067,125067,130067,135067,140067,145067,150067,155067,160067,165067,170067,175067,180067,185067,190067,195067
 [info] Input #1, webm_dash_manifest, from './audio.webm':
 [info] Metadata:
 [info] title : Big Buck Bunny, Sunflower version
 [info] GENRE : Animation
 [info] MAJOR_BRAND : isom
 [info] MINOR_VERSION : 1
 [info] COMPATIBLE_BRANDS: isomavc1
 [info] COMPOSER : Sacha Goedegebure
 [info] ARTIST : Blender Foundation 2008, Janus Bager Kristensen 2013
 [info] COMMENT : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
 [info] ENCODER : Lavf59.27.100
 [info] Duration: 00:05:35.91, bitrate: 120 kb/s
 [info] Stream #1:0: Audio: vorbis, 48000 Hz, 5.1, fltp (default)
 [info] Metadata:
 [info] HANDLER_NAME : GPAC ISO Audio Handler
 [info] VENDOR_ID : [0][0][0][0]
 [info] ENCODER : Lavc59.37.100 libvorbis
 [info] DURATION : 00:05:35.907000000
 [info] webm_dash_manifest_duration: 335907
 [info] webm_dash_manifest_initialization_range: 7411
 [info] webm_dash_manifest_file_name: audio.webm
 [info] webm_dash_manifest_track_number: 1
 [info] webm_dash_manifest_cues_start: 5047497
 [info] webm_dash_manifest_cues_end: 5048846
 [info] webm_dash_manifest_bandwidth: 126994
 [info] webm_dash_manifest_cluster_keyframe: 1
 [info] webm_dash_manifest_cue_timestamps: 0,4986,9980,14962,19959,24956,29946,34930,39916,44911,49908,54892,59874,64868,69858,74858,79855,84847,89834,94834,99826,104826,109826,114818,119812,124799,129780,134770,139756,144743,149727,154719,159714,164706,169698,174687,179668,184667,189658,194650,19
 HERE'S THE ERROR --> [error] Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted
 [error] Error initializing output stream 0:1 -- 
 [info] Stream mapping:
 [info] Stream #0:0 -> #0:0 (copy)
 [info] Stream #1:0 -> #0:1 (copy)
 [error] 
 [AVIOContext @ 0x7fcebe23a840] [verbose] Statistics: 0 bytes written, 0 seeks, 0 writeouts
 [AVIOContext @ 0x7fcebe23a980] [verbose] Statistics: 5940786 bytes read, 133 seeks
 [AVIOContext @ 0x7fcebe23acc0] [verbose] Statistics: 2260628 bytes read, 72 seeks



It works perfectly however if I run it within docker exec (exec into the container and run the command in bash). Also, note in the last output that the command is well formed when I print it out from go. File permissions are also not the problem since the command to create the video variants works with os.exec i.e


runFFmpeg([]string{"-i", originalFilePath, "-c:v", "libvpx-vp9", "-keyint_min", "150", "-g", "150", "-tile-columns", "4", "-frame-parallel", "1", "-f", "webm", "-dash", "1", "-an", "-vf", fmt.Sprintf("scale=%s:%s", width, height), "-b:v", bitRate, "-dash", "1", "-y", destinationFilePath})