How to export video with best quality at smallest file size in Final Cut Pro X?

0

I have two clips of mp4 video. Each clip is 150 MB. I want to combine the two clip into one, which will make a 300 MB file, logically.

I use Final Cut Pro X to achieve this. The result is an incredibly large file: an astounding 1.5 GB. How come? So what do you guys do in this case to combine two clips and keep the file size as it supposed to be?

I provided sample clips that I want to combine: one and two.

angry kiwi

Posted 2012-12-09T09:56:55.753

Reputation: 160

It would help if you told us what resolution (in pixels) the clips have and how long they are. Otherwise this question cannot be reasonably answered. The first sample clip has 0 bytes, by the way. Also, since I don't have FCP, could you show us what options there are for rendering the final video? Finally, do you have to use FCP for this? – slhck – 2012-12-09T11:23:12.183

Answers

0

Your source material is encoded with lossy compression. To maintain the video quality after editing, the video would have to be exported with lossless compression, which is far less efficient and thus results in a larger file size.

The alternative is to re-encode the material with a lossy algorithm, but even if you mimic the compression settings of the original clips, the quality will suffer. This is called 'generation loss'. Wikipedia has a nice visual example pertaining to re-encoding JPEG images a large number of times. You can of course export the video with an arbitrary compression algorithm to reduce the quality degradation at the cost of a larger file or vice versa.

If you are simply merging two clips, similarly encoded and to be played in succession, into one file, and doing no other editing, it may be possible to create the new file without re-encoding, but by joining raw file contents and manipulating them into a valid .mp4. I suspect Final Cut Pro cannot do this, but there may be tools that can, such as YAMB.

Marcks Thomas

Posted 2012-12-09T09:56:55.753

Reputation: 5 749

the original size of video is 640 x 480. My export setting was 1280x 720. That's when the file went up to 1.5GB. When I changed ex set to 640 x 480 the result is what it supposed to be which is about 300MB – angry kiwi – 2012-12-09T12:49:18.660

0

Assuming the MP4 clips have all the same settings (frame size, bit rate, etc) and use h264 video and AAC audio, this can be done on the command line with ffmpeg.

The easy, but less efficient way to do it:

ffmpeg -i input0.mp4 -c copy -bsf h264_mp4toannexb temp0.ts
ffmpeg -i input1.mp4 -c copy -bsf h264_mp4toannexb temp1.ts
ffmpeg -i "concat:temp0.ts|temp1.ts" -c copy -absf aac_adtstoasc output.mp4

The slightly more complicated way, that doesn't require intermediate files to be created:

mkfifo temp1 temp2
ffmpeg -i input1.mp4 -c copy -bsf h264_mp4toannexb -f mpegts temp1 2> /dev/null & \
ffmpeg -i input2.mp4 -c copy -bsf h264_mp4toannexb -f mpegts temp2 2> /dev/null & \
ffmpeg -f mpegts -i "concat:temp1|temp2" -c copy -absf aac_asdstoacs output.mp4

Either of these will be completely lossless.

I notice that you've solved your FCP-specific problem by using the correct settings, per that comment...

evilsoup

Posted 2012-12-09T09:56:55.753

Reputation: 10 085