3

How can I encode and concatenate multiple videos using HandBrake / HandBrakeCLI??

In HandBrakeCLI when I run: HandBrakeCLI -i file1.MPG -i file2.MPG -o out.m4v -O -e x264 -r 23.976 --pfr

the output only contains the second file!

Hamed Tabatabaei
  • 695
  • 1
  • 7
  • 16
  • 2
    This should be on [superuser](http://superuser.com/), not stack overflow. See [this question](http://superuser.com/q/173300/31240) for more info on concatenating video files. – Jeff Axelrod Oct 31 '12 at 16:46

1 Answers1

4

You cannot concatenate videos using HandBrakeCLI.

You can concatenate videos simply if they are in MPG-1

Using FFMPEG you can do

ffmpeg -i input1.avi -same_quant intermediate1.mpg
ffmpeg -i input2.avi -same_quant intermediate2.mpg
cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg

See the FFmpeg FAQ for details.

Once the videos are concatenated, you can encode them however you like.

Terence Eden
  • 14,034
  • 3
  • 48
  • 89