Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have 3 flv files which I wish to merge. I used the answer in this post:

Merge multiple flv files?

which suggested this option:

mencoder -forceidx -ovc copy -oac pcm -o output.flv input1.flv input2.flv

It seems to have worked except that the merged file is 400meg in size whereas the original 3 files were about 33meg each.

Is this expected? Is there a way to join the 3 files without the massive increase in size?

share|improve this question
    
I can't explain the massive increase in size. Check my answer for a solution using ffmpeg. –  Patrick Jan 18 '13 at 15:09
    
Hmmm, with mencoder, isn't that actually making an AVI file (but with a .flv suffix)? –  derobert Jan 18 '13 at 15:49
add comment

1 Answer

Create a file mylist.txt with all the files you want to have concatenated in the following form:

    # this is a comment
    file '/path/to/file1'
    file '/path/to/file2'
    file '/path/to/file3'

Then you can encode your files with:

    ffmpeg -f concat -i mylist.txt -c copy output

Edit: You may need to compile ffmpeg from source to get a recent enough version.

Source: http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20concatenate%20(join,%20merge)%20media%20files

share|improve this answer
    
thanks. Unfortunately I am getting: Unknown input format: 'concat' –  Carl Jan 19 '13 at 22:18
    
okay, wait. I think I have an old ffmpeg version –  Carl Jan 19 '13 at 22:22
    
confirmation that it works except you do need ffmpeg 1.1 which I had to install from source. Even the repository holding the latest latest for Debian only had 1.0.1 –  Carl Jan 19 '13 at 23:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.