[FFmpeg-user] Joining 2 mkv videos

Kieran O Leary kieran.o.leary at gmail.com
Fri Sep 15 23:11:45 EEST 2017


On Fri, Sep 15, 2017 at 8:41 PM, JD <jd1008 at gmail.com> wrote:
>
> So far I have failed.
>

What have you tried and what errors did you receive?

> Any help with this?
>

https://trac.ffmpeg.org/wiki/Concatenate

Sometimes, if I'm on a unix system, I just put the files in a new
directory and run (stolen from that wiki):

for f in ./*.mkv; do echo "file '$f'" >> mylist.txt; done
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mkv

And that usually does the trick. That really only works if both files
have the same specs.
I just tried with your youtube links and it failed because of the
apostophe in the downloaded filename
file './A brief animation of David Hudson's theory of ormus.-Bhx3HEV_6FQ.mkv'

so I removed that apostrophe and all worked fine. The order might have
been off so you can just alter myfile.txt to get the right order. Or
add something to the for loop that sorts everything in the way you
like.

-K


More information about the ffmpeg-user mailing list