combining 2 mpeg videos

Category:bug report
Project wiki:Tools of the trade

I created two videos with kdenlive, which I wanted to concatenate together. At first, I imported them both into a new kdenlive project, added them to the timeline, and tried to export them. But the resulting video was out of sync (audio/video), and the height/width ratio was distorted. The sound had many scratches, too. The videos had the same size, frame rate, etc... I am not sure if it's a bug in kdenlive or with the user (me).

In any case, there is a very simple Unix trick to concatenate two mpeg videos:
cat video1.mpeg video2.mpeg > video1+2.mpeg.
I tried and it worked like a charm. No audio/video problem. No distortion. The result looked like the sum of the two original videos.


This is something you can do with only some media format (namedly:
mpeg-1, mpeg-2 PS and DV, and maybe IIRC mono-media ogg files).

Then you should be able to play them (but apparently not if you use
WMP), but timestamps will be wrong, so you need to reencode the file

> #encode them so they work as one file
> ffmpeg -i output.mpg -vcodec copy -acodec copy three.mpg

which will adjust the timestamps.

Anyway, we need to document a bit this.
And I still need to know how to combine different mpegs within kdenlive and still have a decent result.



Project:web site» Tools