
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (28)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (4520)
-
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%



-
Losing audio quality when merging multiple videos with FFmpeg
30 mai 2021, par CharlyI am trying to merge multiple videos (a few seconds each) into one, using FFmpeg.


Merging all at once


I first tried merging all videos with one FFmpeg command, but it only seems to work with up to a certain amount of videos. On my Raspberry Pi 4 (2BG RAM), it worked for 16 videos and broke (ran out of memory ?) while merging 36 videos (command and ouput below)


ffmpeg -i 1Rbrdn1Xp.mp4 -i G7eYqdFPb.mp4 -i -Xo-6ABm3.mp4 -i 6As9IlqbW.mp4 -i tz9tVKFA-.mp4
-i MS6DHZoJE.mp4 -i CeJYs99-G.mp4 -i Hsv5X48IC.mp4 -i Gm_DtjNU4.mp4 -i PZytbInZL.mp4
-i qsIJuvKO2.mp4 -i c5wxGk_Fx.mp4 -i j4K1qA7ih.mp4 -i AIpVWuhGV.mp4 -i yiLk0snSh.mp4
-i q1zmytaXZ.mp4 -i VRwQvLxaW.mp4 -i 0_3yLrokH.mp4 -i fW28LPQsk.mp4 -i La6WsGeE8.mp4
-i FlroQnCHq.mp4 -i c7SiL_qSU.mp4 -i aaGTUMJXD.mp4 -i hvXYBaCSM.mp4 -i CMDaFrWM4.mp4
-i _YAGDRyQN.mp4 -i RQXyshs_o.mp4 -i 96pKlIZxW.mp4 -i HVOOeCUYG.mp4 -i pJFxq7BTx.mp4
-i VxMJQqbK5.mp4 -i mkgbViPTI.mp4 -i zrjj93b5c.mp4 -i AL9oG1F36.mp4 -i IsUnC0NPb.mp4
-i Qhj2bhab9.mp4 -y -filter_complex concat=n=36:v=1:a=1 -vsync 2 kn-dQSN-v.mp4



ffmpeg version 4.1.6-1~deb10u1+rpt1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 8 (Raspbian 8.3.0-6+rpi1)
(...)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1Rbrdn1Xp.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.20.100
 Duration: 00:00:08.08, start: 0.000000, bitrate: 602 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 533 kb/s, 57.62 fps, 60 tbr, 15360 tbn, 120 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 64 kb/s (default)
 Metadata:
 handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'G7eYqdFPb.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.20.100
 Duration: 00:00:21.00, start: 0.000000, bitrate: 310 kb/s
 Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 229 kb/s, 59.09 fps, 60 tbr, 15360 tbn, 120 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 72 kb/s (default)
 Metadata:
 handler_name : SoundHandler
(...)
Stream mapping:
 Stream #0:0 (h264) -> concat:in0:v0
 Stream #0:1 (aac) -> concat:in0:a0
 Stream #1:0 (h264) -> concat:in1:v0
 Stream #1:1 (aac) -> concat:in1:a0
(...)
 concat:out:v0 -> Stream #0:0 (libx264)
 concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[libx264 @ 0x17cb5e0] using SAR=1/1 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
[libx264 @ 0x17cb5e0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x17cb5e0] profile High, level 3.2
[libx264 @ 0x17cb5e0] 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=6 lookahead_threads=1 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 'kn-dQSN-v.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.20.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 60 fps, 15360 tbn, 60 tbc (default)
 Metadata:
 encoder : Lavc58.35.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), 22050 Hz, mono, fltp, 69 kb/s (default)
 Metadata:
 encoder : Lavc58.35.100 aac
frame=15952 fps= 52 q=31.0 size= 10240kB time=00:04:33.02 bitrate= 307.3kbits/s speed=0.844x
[h264 @ 0x3472d80] get_buffer() failed40kB time=00:04:33.02 bitrate= 307.3kbits/s speed=0.844x 
[h264 @ 0x3472d80] thread_get_buffer() failed
[h264 @ 0x3472d80] decode_slice_header error
[h264 @ 0x3472d80] no frame!
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x34f54d0] get_buffer() failed
[h264 @ 0x34f54d0] thread_get_buffer() failed
[h264 @ 0x34f54d0] decode_slice_header error
[h264 @ 0x34f54d0] no frame!
[h264 @ 0x3472d80] get_buffer() failed
[h264 @ 0x3472d80] thread_get_buffer() failed
(...)
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x3472d80] reference picture missing during reorder
[h264 @ 0x3472d80] Missing reference picture, default is 65660
[h264 @ 0x34c4540] mmco: unref short failure
[h264 @ 0x34f54d0] get_buffer() failed08kB time=00:04:45.37 bitrate= 316.0kbits/s speed=0.845x 
[h264 @ 0x34f54d0] thread_get_buffer() failed
[h264 @ 0x34f54d0] decode_slice_header error
[h264 @ 0x34f54d0] no frame!
[h264 @ 0x3472d80] decode_slice_header error
[h264 @ 0x3472d80] no frame!
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x34f54d0] mmco: unref short failure
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x3472d80] get_buffer() failed
[h264 @ 0x3472d80] thread_get_buffer() failed
[h264 @ 0x3472d80] decode_slice_header error
[h264 @ 0x3472d80] no frame!
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x3472d80] get_buffer() failed
[h264 @ 0x3472d80] thread_get_buffer() failed
[h264 @ 0x3472d80] decode_slice_header error
[h264 @ 0x3472d80] no frame!
[h264 @ 0x34f54d0] reference picture missing during reorder
 Last message repeated 1 times
[h264 @ 0x34f54d0] Missing reference picture, default is 65708
 Last message repeated 1 times
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x34dccb0] reference picture missing during reorder
[h264 @ 0x34dccb0] Missing reference picture, default is 65716
[h264 @ 0x3472d80] mmco: unref short failure
[h264 @ 0x34f54d0] decode_slice_header error
[h264 @ 0x34f54d0] no frame!
Error while decoding stream #15:0: Invalid data found when processing inputbits/s speed=0.845x 
[h264 @ 0x3480010] get_buffer() failed
[h264 @ 0x3480010] thread_get_buffer() failed
[h264 @ 0x3480010] decode_slice_header error
[h264 @ 0x3480010] no frame!
[h264 @ 0x34c4540] decode_slice_header error
[h264 @ 0x34c4540] no frame!
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x3480010] mmco: unref short failure
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x34c4540] get_buffer() failed
[h264 @ 0x34c4540] thread_get_buffer() failed
[h264 @ 0x34c4540] decode_slice_header error
[h264 @ 0x34c4540] no frame!
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x34c4540] get_buffer() failed
[h264 @ 0x34c4540] thread_get_buffer() failed
[h264 @ 0x34c4540] decode_slice_header error
[h264 @ 0x34c4540] no frame!
[h264 @ 0x34f54d0] decode_slice_header error
[h264 @ 0x34f54d0] no frame!
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x3480010] reference picture missing during reorder
 Last message repeated 1 times
[h264 @ 0x3480010] Missing reference picture, default is 65772
 Last message repeated 1 times
Error while decoding stream #15:0: Invalid data found when processing input
[h264 @ 0x3472d80] reference picture missing during reorder
[h264 @ 0x3472d80] Missing reference picture, default is 65780
[h264 @ 0x34c4540] mmco: unref short failure
av_interleaved_write_frame(): Cannot allocate memory
[mp4 @ 0x295c7e0] Application provided duration: 3689347710924763697 / timestamp: 6291454 is out of range for mov/mp4 format
Segmentation fault



Merging videos 2 by 2


I then tried gradually merging videos into one, using multiple FFmpeg commands.


# Pseudocode
final = merge(clip1, clip2)
final = merge(final, clip3)
final = merge(final, clip4)
final = merge(final, clip5)
...



with each command, looking like this :


ffmpeg -i 1Rbrdn1Xp.mp4 -i G7eYqdFPb.mp4 -y -filter_complex concat=n=2:v=1:a=1 -vsync 2 UMVDl9jki.mp4



ffmpeg -i UMVDl9jki.mp4 -i -Xo-6ABm3.mp4 -y -filter_complex concat=n=2:v=1:a=1 -vsync 2 azE1Uombp.mp4



This works but there is a loss in audio quality on the first clips, and it is slowly improving over time. I am guessing this is due to the first videos being merged more times than the last ones. You can see this effect happen in this video (weird artefacts in the voice).



So, am I doing something wrong ?

Is there a way of merging a lot of videos, without running out of memory or worsening the audio quality ?

-
FFmpeg Error while filtering : Cannot allocate memory While Using Gifs Overlay Over Video
4 mars 2021, par Abhishek Sharmacreating overlay gif over video but One gif is stoping after one loop and all other gifs are in a continuous loop by default in the file and FFmpeg throws an error


Command :


ffmpeg -y -i "2021_03_04_03_54_43.mp4" -f lavfi -i "color=000000:s=540x960" -ignore_loop 0 -i "2021_03_04_03_55_08.gif" -ignore_loop 0 -i "2021_03_04_03_56_19.gif" -ignore_loop 0 -i "2021_03_04_04_02_29.gif" -ignore_loop 0 -i "2021_03_04_04_03_50.gif" -filter_complex "[0:v]trim=0:15.047,setpts=PTS-STARTPTS[Clip_0_VideoTrim_0] ;[0:a]atrim=0:15.047,asetpts=PTS-STARTPTS,volume=1[Clip_0_AudioTrim_0] ;[1:v]crop=540:960:0:0,boxblur=luma_radius=10:chroma_radius=10:luma_power=1,scale=540:960[Clip_0_BG] ;[Clip_0_VideoTrim_0]scale=540:960[Clip_0_FG] ;[Clip_0_BG][Clip_0_FG]overlay=0:0:shortest=1[Clip_0_BackgroundOutput] ;[Clip_0_BackgroundOutput][Clip_0_AudioTrim_0]concat=n=1:v=1:a=1[ClipsVideoOut][ClipsAudioOut] ;[2:v]format=yuva444p,colorchannelmixer=aa=1,scale=226.374008178711 :-1,rotate=0:c=none:ow=rotw(0):oh=roth(0)[OverLay_2] ;[ClipsVideoOut][OverLay_2]overlay=enable='between(t,3.839,7.6)':x='(389.626037597656-(overlay_w/2))':y='(205.619873046875-(overlay_h/2))':shortest=1[OverlayLayer_2] ;[3:v]format=yuva444p,colorchannelmixer=aa=1,scale=179.254348754883 :-1,rotate=0:c=none:ow=rotw(0):oh=roth(0)[OverLay_3] ;[OverlayLayer_2][OverLay_3]overlay=enable='between(t,0,3.762)':x='(117.589767456055-(overlay_w/2))':y='(759.018127441406-(overlay_h/2))':shortest=1[OverlayLayer_3] ;[4:v]format=yuva444p,colorchannelmixer=aa=1,scale=326.199066162109 :-1,rotate=0:c=none:ow=rotw(0):oh=roth(0)[OverLay_4] ;[OverlayLayer_3][OverLay_4]overlay=enable='between(t,7.478,11.24)':x='(118.761810302734-(overlay_w/2))':y='(153.96012878418-(overlay_h/2))':shortest=1[OverlayLayer_4] ;[5:v]format=yuva444p,colorchannelmixer=aa=1,scale=268.915679931641 :-1,rotate=0:c=none:ow=rotw(0):oh=roth(0)[OverLay_5] ;[OverlayLayer_4][OverLay_5]overlay=enable='between(t,11.25,15.011)':x='(396.322570800781-(overlay_w/2))':y='(747.451477050781-(overlay_h/2))':shortest=1[OverlayOutput] ;[OverlayOutput][ClipsAudioOut]concat=n=1:v=1:a=1[OutputVideo][OutputAudio]" -map [OutputVideo] -map [OutputAudio] -c:v libx264 -c:a aac -b:a 256k -r 30 -preset ultrafast "2021_03_04_04_04_09.mp4" -hide_banner" ;


ffmpeg Log :


2021-03-04 16:04:10.092 +05:30 [INF] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2021_03_04_03_54_43.mp4':
2021-03-04 16:04:10.100 +05:30 [INF] Metadata:
2021-03-04 16:04:10.112 +05:30 [INF] major_brand : isom
2021-03-04 16:04:10.123 +05:30 [INF] minor_version : 512
2021-03-04 16:04:10.131 +05:30 [INF] compatible_brands: isomiso2avc1mp41
2021-03-04 16:04:10.141 +05:30 [INF] encoder : Lavf57.76.100
2021-03-04 16:04:10.151 +05:30 [INF] comment : vid:v090444d0000bivu4o5qa7loe16h27e0
2021-03-04 16:04:10.164 +05:30 [INF] genre : aweme_6677028628938787590
2021-03-04 16:04:10.202 +05:30 [INF] Duration: 00:00:15.05, start: 0.000000, bitrate: 1562 kb/s
2021-03-04 16:04:10.253 +05:30 [INF] Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 540x960, 1485 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
2021-03-04 16:04:10.262 +05:30 [INF] Metadata:
2021-03-04 16:04:10.275 +05:30 [INF] handler_name : VideoHandler
2021-03-04 16:04:10.303 +05:30 [INF] Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)
2021-03-04 16:04:10.309 +05:30 [INF] Metadata:
2021-03-04 16:04:10.325 +05:30 [INF] handler_name : SoundHandler
2021-03-04 16:04:10.334 +05:30 [INF] Input #1, lavfi, from 'color=000000:s=540x960':
2021-03-04 16:04:10.366 +05:30 [INF] Duration: N/A, start: 0.000000, bitrate: N/A
2021-03-04 16:04:10.403 +05:30 [INF] Stream #1:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 540x960 [SAR 1:1 DAR 9:16], 25 tbr, 25 tbn, 25 tbc
2021-03-04 16:04:10.416 +05:30 [INF] Input #2, gif, from '2021_03_04_03_55_08.gif':
2021-03-04 16:04:10.482 +05:30 [INF] Duration: 00:00:00.20, start: 0.000000, bitrate: 2071 kb/s
2021-03-04 16:04:10.536 +05:30 [INF] Stream #2:0: Video: gif, bgra, 269x386, 14.25 fps, 19.08 tbr, 100 tbn, 100 tbc
2021-03-04 16:04:10.570 +05:30 [INF] Input #3, gif, from '2021_03_04_03_56_19.gif':
2021-03-04 16:04:10.616 +05:30 [INF] Duration: 00:00:01.47, start: 0.000000, bitrate: 11618 kb/s
2021-03-04 16:04:10.666 +05:30 [INF] Stream #3:0: Video: gif, bgra, 300x300, 28.92 fps, 100 tbr, 100 tbn, 100 tbc
2021-03-04 16:04:10.680 +05:30 [INF] Input #4, gif, from '2021_03_04_04_02_29.gif':
2021-03-04 16:04:10.714 +05:30 [INF] Duration: 00:00:00.90, start: 0.000000, bitrate: 824 kb/s
2021-03-04 16:04:10.793 +05:30 [INF] Stream #4:0: Video: gif, bgra, 310x300, 20.67 fps, 19.75 tbr, 100 tbn, 100 tbc
2021-03-04 16:04:10.811 +05:30 [INF] Input #5, gif, from '2021_03_04_04_03_50.gif':
2021-03-04 16:04:10.845 +05:30 [INF] Duration: 00:00:00.48, start: 0.000000, bitrate: 1516 kb/s
2021-03-04 16:04:10.871 +05:30 [INF] Stream #5:0: Video: gif, bgra, 480x480, 14.33 fps, 12.25 tbr, 100 tbn, 100 tbc
2021-03-04 16:04:10.882 +05:30 [INF] Stream mapping:
2021-03-04 16:04:10.891 +05:30 [INF] Stream #0:0 (h264) -> trim
2021-03-04 16:04:10.901 +05:30 [INF] Stream #0:1 (aac) -> atrim
2021-03-04 16:04:10.913 +05:30 [INF] Stream #1:0 (rawvideo) -> crop
2021-03-04 16:04:10.918 +05:30 [INF] Stream #2:0 (gif) -> format
2021-03-04 16:04:10.926 +05:30 [INF] Stream #3:0 (gif) -> format
2021-03-04 16:04:10.932 +05:30 [INF] Stream #4:0 (gif) -> format
2021-03-04 16:04:10.935 +05:30 [INF] Stream #5:0 (gif) -> format
2021-03-04 16:04:10.943 +05:30 [INF] concat:out:v0 -> Stream #0:0 (libx264)
2021-03-04 16:04:10.949 +05:30 [INF] concat:out:a0 -> Stream #0:1 (aac)
2021-03-04 16:04:10.951 +05:30 [INF] Press [q] to stop, [?] for help
2021-03-04 16:04:10.960 +05:30 [INF] frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
2021-03-04 16:04:11.070 +05:30 [INF] [libx264 @ 2013EB00] using SAR=1/1
2021-03-04 16:04:11.092 +05:30 [INF] [libx264 @ 2013EB00] using cpu capabilities: none!
2021-03-04 16:04:11.116 +05:30 [INF] [libx264 @ 2013EB00] profile Constrained Baseline, level 3.1, 4:2:0, 8-bit
2021-03-04 16:04:11.119 +05:30 [INF] [libx264 @ 2013EB00] 264 - core 157 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
2021-03-04 16:04:11.126 +05:30 [INF] Output #0, mp4, to '2021_03_04_04_04_09.mp4':
2021-03-04 16:04:11.129 +05:30 [INF] Metadata:
2021-03-04 16:04:11.136 +05:30 [INF] major_brand : isom
2021-03-04 16:04:11.251 +05:30 [INF] minor_version : 512
2021-03-04 16:04:11.261 +05:30 [INF] compatible_brands: isomiso2avc1mp41
2021-03-04 16:04:11.274 +05:30 [INF] genre : aweme_6677028628938787590
2021-03-04 16:04:11.282 +05:30 [INF] comment : vid:v090444d0000bivu4o5qa7loe16h27e0
2021-03-04 16:04:11.293 +05:30 [INF] encoder : Lavf58.45.100
2021-03-04 16:04:11.324 +05:30 [INF] Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 540x960 [SAR 1:1 DAR 9:16], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
2021-03-04 16:04:11.328 +05:30 [INF] Metadata:
2021-03-04 16:04:11.338 +05:30 [INF] encoder : Lavc58.91.100 libx264
2021-03-04 16:04:11.341 +05:30 [INF] Side data:
2021-03-04 16:04:11.358 +05:30 [INF] cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
2021-03-04 16:04:11.377 +05:30 [INF] Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 256 kb/s (default)
2021-03-04 16:04:11.380 +05:30 [INF] Metadata:
2021-03-04 16:04:11.392 +05:30 [INF] encoder : Lavc58.91.100 aac
2021-03-04 16:04:11.469 +05:30 [INF] frame= 2 fps=0.0 q=0.0 size= 0kB time=00:00:00.04 bitrate= 8.3kbits/s speed=0.0928x 
2021-03-04 16:04:11.972 +05:30 [INF] frame= 16 fps= 16 q=25.0 size= 0kB time=00:00:00.46 bitrate= 0.8kbits/s dup=3 drop=0 speed=0.463x 
2021-03-04 16:04:12.480 +05:30 [INF] frame= 28 fps= 18 q=23.0 size= 256kB time=00:00:00.88 bitrate=2377.2kbits/s dup=5 drop=0 speed=0.582x 
2021-03-04 16:04:13.012 +05:30 [INF] frame= 41 fps= 20 q=23.0 size= 256kB time=00:00:01.34 bitrate=1557.5kbits/s dup=7 drop=0 speed=0.664x 
2021-03-04 16:04:13.493 +05:30 [INF] frame= 53 fps= 21 q=25.0 size= 512kB time=00:00:01.76 bitrate=2377.0kbits/s dup=9 drop=0 speed=0.696x 
2021-03-04 16:04:14.023 +05:30 [INF] frame= 66 fps= 22 q=22.0 size= 768kB time=00:00:02.18 bitrate=2882.6kbits/s dup=11 drop=0 speed=0.714x 
2021-03-04 16:04:14.535 +05:30 [INF] frame= 77 fps= 22 q=23.0 size= 768kB time=00:00:02.57 bitrate=2441.1kbits/s dup=13 drop=0 speed=0.724x 
2021-03-04 16:04:15.030 +05:30 [INF] frame= 91 fps= 22 q=24.0 size= 1024kB time=00:00:03.01 bitrate=2779.1kbits/s dup=15 drop=0 speed=0.743x 
2021-03-04 16:04:15.547 +05:30 [INF] frame= 104 fps= 23 q=23.0 size= 1280kB time=00:00:03.45 bitrate=3030.9kbits/s dup=17 drop=0 speed=0.756x 
2021-03-04 16:04:16.118 +05:30 [INF] frame= 109 fps= 21 q=23.0 size= 1280kB time=00:00:04.78 bitrate=2192.2kbits/s dup=18 drop=0 speed=0.942x 
2021-03-04 16:04:16.543 +05:30 [INF] frame= 109 fps= 20 q=23.0 size= 1280kB time=00:00:06.61 bitrate=1584.6kbits/s dup=18 drop=0 speed=1.19x 
2021-03-04 16:04:17.042 +05:30 [INF] frame= 109 fps= 18 q=23.0 size= 1280kB time=00:00:08.82 bitrate=1188.4kbits/s dup=18 drop=0 speed=1.45x 
2021-03-04 16:04:17.545 +05:30 [INF] frame= 109 fps= 17 q=23.0 size= 1280kB time=00:00:10.89 bitrate= 962.9kbits/s dup=18 drop=0 speed=1.65x 
2021-03-04 16:04:17.864 +05:30 [INF] Error while filtering: Cannot allocate memory
2021-03-04 16:04:17.889 +05:30 [INF] Failed to inject frame into filter network: Cannot allocate memory
2021-03-04 16:04:17.908 +05:30 [INF] Error while processing the decoded data for stream #0:0
2021-03-04 16:04:18.048 +05:30 [INF] [libx264 @ 2013EB00] frame I:1 Avg QP:20.00 size: 43401
2021-03-04 16:04:18.051 +05:30 [INF] [libx264 @ 2013EB00] frame P:101 Avg QP:23.36 size: 13076
2021-03-04 16:04:18.054 +05:30 [INF] [libx264 @ 2013EB00] mb I I16..4: 100.0% 0.0% 0.0%
2021-03-04 16:04:18.058 +05:30 [INF] [libx264 @ 2013EB00] mb P I16..4: 11.9% 0.0% 0.0% P16..4: 44.6% 0.0% 0.0% 0.0% 0.0% skip:43.5%
2021-03-04 16:04:18.062 +05:30 [INF] [libx264 @ 2013EB00] coded y,uvDC,uvAC intra: 34.5% 62.9% 16.0% inter: 23.5% 29.1% 3.2%
2021-03-04 16:04:18.064 +05:30 [INF] [libx264 @ 2013EB00] i16 v,h,dc,p: 35% 20% 19% 25%
2021-03-04 16:04:18.067 +05:30 [INF] [libx264 @ 2013EB00] i8c dc,h,v,p: 34% 22% 33% 12%
2021-03-04 16:04:18.071 +05:30 [INF] [libx264 @ 2013EB00] kb/s:3209.61
2021-03-04 16:04:18.076 +05:30 [INF] [aac @ 2013C440] Qavg: 2650.414
2021-03-04 16:04:18.081 +05:30 [INF] [aac @ 2013C440] 2 frames left in the queue on closing
2021-03-04 16:04:18.099 +05:30 [INF] Conversion failed!