Stranger
Stranger

Reputation: 10610

FFMPEG video joiner

I am working on merging videos, but is not merging my videos. Here is the code

exec(cat file1.flv file2.flv > trailer/output.flv);
exec("ffmpeg -i trailer/output.flv -sameq trailer/output.flv);

But if the size of file1 is 1MB and file2 is 2MB and output is coming as 3MB. But it is playing only the file1.

Upvotes: 0

Views: 1561

Answers (2)

smp
smp

Reputation: 1003

The following:

ffmpeg -i input1.flv -i input2.flv {other parameters if needed} ouput.flv 

will join two files for you.

Upvotes: 1

rkosegi
rkosegi

Reputation: 14618

You can not simply merge FLV files using cat, because at the beginning of output file there will be header from first file.

This post may be helpful:

http://albanianwizard.org/splitting-and-joining-flv-files-under-linux-with-ffmpeg-and-avidemux.albanianwizard

I know it's maybe possible with mencoder like this:

mencoder -ovc lavc file1.flv file2.flv -o complete.avi

Upvotes: 0

Related Questions