The officially official Devuan Forum!

You are not logged in.

#1 2020-07-29 12:30:59

wingcommander1999
Member
Registered: 2020-04-14
Posts: 15  

[HowTo] Merge videos with ffmpeg

FFmpeg is a collection of open source software intended for processing audio or video streams. Source

Be sure that you have the last version of ffmpeg:

ffmpeg -version

You will see an output of your version, in my case i have the last stable version 4.1.6.


No output??? Whaaaat!!! Don't panic on the Titanic, we need just to install the package:

sudo apt update && sudo apt upgrade -y
sudo apt install ffmpeg -y

Go to the Videos folder and we create an file like this, necessary to concat later:

file '/path_to_my_file/part1.mp4'
file '//path_to_my_file/part2.mp4'
file '/=/path_to_my_file/part3.mp4'

then save the file with a name of your choice in .txt output, in my example merge.txt.


Now we can merge our vids, the per-file main options retained are:

-f input/output with the concat option
-i input file or url
-c codec or stream output with the copy option


 ffmpeg -f concat -safe 0 -i merge.txt -c copy my_vids.mp4

After a few moments you can see your new merged video.

Enjoy! big_smile

Source

Last edited by wingcommander1999 (2020-07-30 22:32:39)


AMD Ryzen 5 3600 - Gigabyte AB350 Gaming - 2x8GB DDR4 - SSD HyperX MLC 120GB / HDD Toshiba 1TO - RX570 Pulse 8GB - Lepa MaxBron 500W - Zalman NEO 9 White

Offline

Board footer