How to concatenate / merge multiple video files | Concatenation Lesson Part 02

Опубликовано: 02 Январь 2023
на канале: The FFMPEG guy
701
28

Today, we show how to concatenate (.i.e. add one after the other) many (many) video files. Concatenation allows to merge / add both video and audio tracks / streams. All parameters can be customized to suit your needs.

IMPORTANT! All files to be concatenated need to be of the same type (same format, size, SAR, audio sample rate, ...) or the concatenation will fail or produce unpredictible results (video skipping frames, video and audio out of sync', ...)
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
EXAMPLE
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
❶ Concatenate many videos (image & sound)
→ ffmpeg -f concat -safe 0 -i filelist.txt -c copy output01.mp4

with:
* -f concat = Calls the concat «demuxer» …
* -i filelist.txt = … to read, in order, all the files listed in text file «filelist.txt» …
* -c copy = … and copies each input streams …
* output01.mp4 = … into the final video “output01.mp4”.
* -safe 0 = Avoids ffmpeg complaining about “unsafe” paths / filenames

❷ BONUS: Create the “filelist.txt” with 1 command (Windows)
→ (for %f in (*.mp4) do @echo file ‘%f') [greater than sign.. can't put in the description though since YouTube does not allow it) filelist.txt

with:
* (for %f in (*.mp4) = For every .mp4 files in the folder …
* do @echo file ‘%f') = … writes the line ‘filename.mp4’ …
* filelist.txt = … in text file “filelist.txt”
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Catch up with the FFMPEG guy Channel
   • ALL THE VIDEOS FROM THE CHANNEL  
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
MUSIC
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Mover - DivKid
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
An FFMPEG question?
Ask the FFMPEG guy
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ


Смотрите видео How to concatenate / merge multiple video files | Concatenation Lesson Part 02 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь The FFMPEG guy 02 Январь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 701 раз и оно понравилось 28 людям.