Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to Concatenate mp4 or mkv files using avconv

I have multiple mkv files in a ubuntu directory.I have installed 'avconv' tool and its working fine. My aim is to simple concatenate all those files and produce a single mkv file. I referenced so many articles and found that this command should serve the purpose:

avconv -i "concat:1-1.mkv|1-2.mkv|1-3.mkv" -c copy 1.mkv

However, when I run it, I get error:

concat:1-1.mkv|1-2.mkv|1-3.mkv: No such file or directory

I even tried it with mp4 files but still the same error.

Can anyone point out what wrong I am doing ? Or there is any other approach ?

like image 403
Danny Avatar asked Jun 06 '16 14:06

Danny


1 Answers

ffmpeg may turn out to be a better alternative. There is an entire wiki-page about concatenation of media files with ffmpeg.

Alternatively, try the mkvmerge utility:

mkvmerge -o 1.mkv 1-1.mkv + 1-2.mkv + 1-3.mkv

like image 116
Leon Avatar answered Sep 27 '22 16:09

Leon