
Recherche avancée
Autres articles (60)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette 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.
Sur d’autres sites (8993)
-
How to get rid of errors "jitter buffer full" in ffmpeg ?
31 janvier 2021, par jidckiiHow to get rid of errors
jitter buffer full
?

I use ffmpeg from one of the latest snapshots.

ffmpeg version N-90078-gf611fef Copyright (c) 2000-2018 the FFmpeg developers



The problem is that from the camera on rtsp there is such a stream :

http://ibb.co/fmckCc

It is not possible to fix this from the camera side.


I accept it like this :



ffmpeg \
-strict experimental \
-fflags + genpts \
-fflags + latm \
-seek2any 1 \
-avoid_negative_ts + make_zero \
-max_delay 5000000 \
-rtsp_transport udp \
-i rtsp: // admin: @ 192.168.87.21: 554/0? .sdp \
-map 0 \
-r 15 \
-c: v copy \
-an \
-f mpegts udp: //239.0.0.1: 1234? ttl = 1? pkt_size = 1316




I later start to get errors from time to time



[rtsp @ 0x154d180] jitter buffer full
[rtsp @ 0x154d180] RTP: missed 1 packets
[rtsp @ 0x154d180] jitter buffer full
[rtsp @ 0x154d180] RTP: missed 1 packets
[rtsp @ 0x154d180] jitter buffer full
[rtsp @ 0x154d180] RTP: missed 2 packets
[rtsp @ 0x154d180] jitter buffer full
[rtsp @ 0x154d180] RTP: missed 4 packets




because of this the picture crumbles.



I increased the udp buffer in the linux kernel settings :



net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.udp_mem = 8388608 12582912 16777216
net.ipv4.tcp_rmem = 4096 87380 8388608
net.ipv4.tcp_wmem = 4096 65536 8388608




It did not solve my problem.

Tell me, how can you deal with such errors ?

-
A pragmatic strategy to merge multiple video files
19 juin 2021, par sauravI currently am working on recording a multiparty video conference which supports up to 6 participants. I am recording the conference using a media server and storing audio/video streams individually for every participant.


Next, I need to merge those individual recordings into a single video file and upload it to a cloud storage like aws s3. For this I am considering 2 options, either Gstreamer or FFMPEG. I am leaning towards FFMPEG as I have used FFMPEG previously. I currently am playing with FFMPEG things like the hstack and vstack filters etc.


Here is the FFMPEG command I recently used to join 2 webm videos of 2 mins 40sec and 1min 40sec to create a mp4 video file for upload. Both the videos are 1280x720 in this case but I have included the scale part because in real life scenario different participants joining with different cameras produces video files of different resolution which is a problem for the hstack/vstack filter. Therefore, to make the video resolutions of all participant consistent, I have included the scale property.


ffmpeg -i 1.webm -i 2.webm -filter_complex "[0:v]scale=1280:720,setsar=1[l];[1:v]scale=1280:720,setsar=1[r];[l][r]hstack;[0][1]amix" output-1280x720.mp4



Currently I am facing 2 issues with this command.


- 

-
The output mp4 file is very big, in this case 140Mb (approx) for a less than 3 minutes video.


-
How do I add delay to any video before starting to merge ?

Currently the videos are going out of sync if all the participants don't join at the same time which is highly unlikely to happen in a real world scenario.







Any pointer in the right direction will be highly appreciated.


Here is a log sample from FFmpeg (or see the full log link) :


ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
 configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, matroska,webm, from '3.webm':
 Metadata:
 title : FFmpeg
 ENCODER : Lavf58.29.100
 Duration: 00:01:39.63, start: 0.000000, bitrate: 707 kb/s
 Stream #0:0: Video: vp8, yuv420p(tv, bt470bg/unknown/unknown, progressive), 1280x720, SAR 1:1 DAR 16:9, 1k tbr, 1k tbn, 1k tbc (default)
 Metadata:
 DURATION : 00:01:39.618000000
 Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp (default)
 Metadata:
 DURATION : 00:01:39.629000000
Input #1, matroska,webm, from '4.webm':
 Metadata:
 title : FFmpeg
 ENCODER : Lavf58.29.100
 Duration: 00:02:39.07, start: 0.000000, bitrate: 708 kb/s
 Stream #1:0: Video: vp8, yuv420p(tv, bt470bg/unknown/unknown, progressive), 1280x720, SAR 1:1 DAR 16:9, 1k tbr, 1k tbn, 1k tbc (default)
 Metadata:
 DURATION : 00:02:39.050000000
 Stream #1:1: Audio: opus, 48000 Hz, stereo, fltp (default)
 Metadata:
 DURATION : 00:02:39.068000000
Stream mapping:
 Stream #0:0 (vp8) -> scale
 Stream #0:1 (opus) -> amix:input0
 Stream #1:0 (vp8) -> scale
 Stream #1:1 (opus) -> amix:input1
 hstack -> Stream #0:0 (libx264)
 amix -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[libx264 @ 0x562b4842a500] using SAR=1/1
[libx264 @ 0x562b4842a500] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x562b4842a500] profile High, level 6.1
[libx264 @ 0x562b4842a500] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output-new.mp4':
 Metadata:
 title : FFmpeg
 encoder : Lavf58.29.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 2560x720 [SAR 1:1 DAR 32:9], q=-1--1, 1k fps, 16k tbn, 1k tbc (default)
 Metadata:
 encoder : Lavc58.54.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 encoder : Lavc58.54.100 aac

frame= 129 fps=0.0 q=33.0 size= 0kB time=00:00:00.23 bitrate= 1.6kbits/s dup=123 drop=0 speed=0.44x 
frame= 257 fps=228 q=33.0 size= 0kB time=00:00:00.51 bitrate= 0.8kbits/s dup=243 drop=0 speed=0.455x 
frame= 379 fps=224 q=33.0 size= 256kB time=00:00:00.73 bitrate=2855.1kbits/s dup=358 drop=0 speed=0.434x 
frame= 497 fps=222 q=33.0 size= 256kB time=00:00:00.86 bitrate=2431.5kbits/s dup=469 drop=0 speed=0.386x 
 
...
More than 1000 frames duplicated
...
 
frame=158751 fps=196 q=33.0 size= 134656kB time=00:02:39.00 bitrate=6937.4kbits/s dup=151385 drop=0 speed=0.196x 
frame=158851 fps=196 q=33.0 size= 134912kB time=00:02:39.00 bitrate=6950.6kbits/s dup=151482 drop=0 speed=0.196x 
frame=158983 fps=196 q=33.0 size= 134912kB time=00:02:39.00 bitrate=6950.6kbits/s dup=151610 drop=0 speed=0.196x 
frame=159081 fps=196 q=-1.0 Lsize= 137197kB time=00:02:39.07 bitrate=7065.2kbits/s dup=151706 drop=0 speed=0.196x 

video:132693kB audio:2494kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.486001%

[libx264 @ 0x562b4842a500] frame I:637 Avg QP:17.73 size:123895
[libx264 @ 0x562b4842a500] frame P:40088 Avg QP:19.73 size: 1134
[libx264 @ 0x562b4842a500] frame B:118356 Avg QP:27.54 size: 97
[libx264 @ 0x562b4842a500] consecutive B-frames: 0.8% 0.0% 0.0% 99.2%
[libx264 @ 0x562b4842a500] mb I I16..4: 11.1% 67.3% 21.6%
[libx264 @ 0x562b4842a500] mb P I16..4: 0.1% 0.1% 0.0% P16..4: 2.6% 0.4% 0.3% 0.0% 0.0% skip:96.5%
[libx264 @ 0x562b4842a500] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.7% 0.0% 0.0% direct: 0.0% skip:99.3% L0:38.7% L1:61.3% BI: 0.0%
[libx264 @ 0x562b4842a500] 8x8 transform intra:66.8% inter:71.4%
[libx264 @ 0x562b4842a500] coded y,uvDC,uvAC intra: 81.8% 89.5% 72.3% inter: 0.2% 0.4% 0.0%
[libx264 @ 0x562b4842a500] i16 v,h,dc,p: 25% 21% 17% 37%
[libx264 @ 0x562b4842a500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 22% 12% 4% 5% 6% 6% 6% 6%
[libx264 @ 0x562b4842a500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 42% 24% 6% 4% 5% 5% 6% 4% 4%
[libx264 @ 0x562b4842a500] i8c dc,h,v,p: 42% 24% 26% 9%
[libx264 @ 0x562b4842a500] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x562b4842a500] ref P L0: 82.4% 11.5% 5.3% 0.8%
[libx264 @ 0x562b4842a500] ref B L0: 83.0% 16.9% 0.1%
[libx264 @ 0x562b4842a500] ref B L1: 94.9% 5.1%
[libx264 @ 0x562b4842a500] kb/s:6833.11
[aac @ 0x562b4842b540] Qavg: 239.393



-
-
Adding cover art to video wtih chapters and chapters getting deleted
31 mai 2021, par throwaway513I am trying to add a cover art to a video with chapters.


I added 2 chapters to a video using :


ffmpeg -i 1.mp4 -i Chapters.txt -map_metadata 1 -c copy 2.mp4


but when I try to add cover art it deletes the first chapter and only keeps the second ?


ffmpeg -i 2.mp4 -i image.jpg -map 1 -map 0 -c copy -disposition:0 attached_pic 3.mp4


I also tried mp3tag but the picture doesn't show on the file after adding chapters through ffmpeg. Chapters work fine on 2.mp4 but on 3.mp4 it deletes the first chapter. It also deletes the chapter when I do
ffmpeg -i 2.mp4 -c copy any.mp4


Chapter.txt


;FFMETADATA1
major_brand=isom
minor_version=512
compatible_brands=isomiso2avc1mp41
encoder=Lavf58.12.100

[CHAPTER]
TIMEBASE=1/1000
START=1152352
END=
title=

[CHAPTER]
TIMEBASE=1/1000
START=1378578
END=
title=




C:\Users\Dark\Desktop\ffmpeg\bin>ffmpeg -i 1.mp4 -i Chapters.txt -map_metadata 1 -c copy 2.mp4
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
 built with gcc 7.3.1 (GCC) 20180722
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
 libavutil 56. 14.100 / 56. 14.100
 libavcodec 58. 18.100 / 58. 18.100
 libavformat 58. 12.100 / 58. 12.100
 libavdevice 58. 3.100 / 58. 3.100
 libavfilter 7. 16.100 / 7. 16.100
 libswscale 5. 1.100 / 5. 1.100
 libswresample 3. 1.100 / 3. 1.100
 libpostproc 55. 1.100 / 55. 1.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001a7335c99c0] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 creation_time : 1970-01-01T00:00:00.000000Z
 encoder : Lavf52.31.0
 Duration: 00:27:10.00, start: 0.000000, bitrate: 3338 kb/s
 Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 3120 kb/s, 29.97 fps, 29.97 tbr, 770589.00 tbn, 59.94 tbc (default)
 Metadata:
 creation_time : 1970-01-01T00:00:00.000000Z
 handler_name : VideoHandler
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 103 kb/s (default)
 Metadata:
 creation_time : 1970-01-01T00:00:00.000000Z
 handler_name : SoundHandler
 Stream #0:2: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 90k tbr, 90k tbn, 90k tbc
Input #1, ffmetadata, from 'Chapters.txt':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.12.100
 Duration: 504900:42:04.42, start: 0.000000, bitrate: N/A
 Chapter #1:0: start 1152.352000, end 1817642524.416000
 Metadata:
 title :
 Chapter #1:1: start 1378.578000, end 1817642524.416000
 Metadata:
 title :
[mp4 @ 000001a733efdfc0] Application provided duration: 1817641372064 is invalid
[mp4 @ 000001a733efdfc0] Application provided duration: 1817641145838 is invalid
Output #0, mp4, to '2.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.12.100
 Chapter #0:0: start 1152.352000, end 1817642524.416000
 Metadata:
 title :
 Chapter #0:1: start 1378.578000, end 1817642524.416000
 Metadata:
 title :
 Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 3120 kb/s, 29.97 fps, 29.97 tbr, 770589.00 tbn, 770589.00 tbc (default)
 Metadata:
 creation_time : 1970-01-01T00:00:00.000000Z
 handler_name : VideoHandler
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 103 kb/s (default)
 Metadata:
 creation_time : 1970-01-01T00:00:00.000000Z
 handler_name : SoundHandler
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=48851 fps=0.0 q=-1.0 Lsize= 642768kB time=00:27:09.96 bitrate=3230.5kbits/s speed=3.04e+03x
video:620855kB audio:20549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.212700%




C:\Users\Dark\Desktop\ffmpeg\bin>ffmpeg -i 2.mp4 -i image.jpg -map 1 -map 0 -c copy -disposition:0 attached_pic 3.mp4
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
 built with gcc 7.3.1 (GCC) 20180722
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
 libavutil 56. 14.100 / 56. 14.100
 libavcodec 58. 18.100 / 58. 18.100
 libavformat 58. 12.100 / 58. 12.100
 libavdevice 58. 3.100 / 58. 3.100
 libavfilter 7. 16.100 / 7. 16.100
 libswscale 5. 1.100 / 5. 1.100
 libswresample 3. 1.100 / 3. 1.100
 libpostproc 55. 1.100 / 55. 1.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001cdbdbd9b40] Referenced QT chapter track not found
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.12.100
 Duration: 00:27:10.00, start: 0.000000, bitrate: 3230 kb/s
 Chapter #0:0: start 1152.352000, end 1378.578000
 Metadata:
 title :
 Chapter #0:1: start 1378.578000, end 1629.996000
 Metadata:
 title :
 Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 3120 kb/s, 29.97 fps, 29.97 tbr, 770589.00 tbn, 59.94 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 103 kb/s (default)
 Metadata:
 handler_name : SoundHandler
Input #1, image2, from 'image.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 24266 kb/s
 Stream #1:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Output #0, mp4, to '3.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.12.100
 Chapter #0:0: start 1152.352000, end 1378.578000
 Metadata:
 title :
 Chapter #0:1: start 1378.578000, end 1629.996000
 Metadata:
 title :
 Stream #0:0: Video: mjpeg (mp4v / 0x7634706D), yuvj444p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 tbr, 12800 tbn, 25 tbc
 Stream #0:1(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 3120 kb/s, 29.97 fps, 29.97 tbr, 770589.00 tbn, 770589.00 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:2(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 103 kb/s (default)
 Metadata:
 handler_name : SoundHandler
Stream mapping:
 Stream #1:0 -> #0:0 (copy)
 Stream #0:0 -> #0:1 (copy)
 Stream #0:1 -> #0:2 (copy)
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=-1.0 Lq=-1.0 size= 642887kB time=00:27:09.96 bitrate=3231.1kbits/s speed=2.79e+03x
video:620973kB audio:20549kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.212752%