Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What tool in Linux can I use to merge multiple flv files ? Files are already in order, just put them altogether seamlessly

share|improve this question
Do you want a GUI or a commandline tool? For the first case you could try avidemux – student Aug 20 '12 at 8:58
@student command line, I will create a script – warl0ck Aug 20 '12 at 9:04
Then you can try ffmpeg – student Aug 20 '12 at 9:06
Do all files have the same resolution and the same audio encoding + same bitrate? – student Aug 20 '12 at 9:16
@student yes, just take it as video segments downloaded from video site like youtube – warl0ck Aug 20 '12 at 9:18
up vote 3 down vote accepted

I didn't test the following yet, so see it just as some hints.

You could use ffmpeg. From the manual

* You can put many streams of the same type in the output:

               ffmpeg -i test1.avi -i test2.avi -vcodec copy -acodec copy -vcodec copy -acodec copy test12.avi -newvideo -newaudio

       In addition to the first video and audio streams, the resulting output file
       test12.avi will contain the second video and the second audio stream found in the
       input streams list.

       The "-newvideo", "-newaudio" and "-newsubtitle" options have to be specified
       immediately after the name of the output file to which you want to add them.

You can also use mencoder for example:

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

Another option is maybe flvcat.

You could also try avidemux-cli.

share|improve this answer
+1 for mencoder – Jan Marek Aug 20 '12 at 10:42

You can check this FAQ from the FFmpeg website.

It seems to be a matter of using the "concat" filter or the "concat" protocol. I never tried the former, so I can't help you on that one, and I tried the latter only with MPEG files, so perhaps a few adjustments are needed when using FLV files.

share|improve this answer

Your Answer


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.