I
I
Igore1082016-07-22 23:15:01
fmpeg
Igore108, 2016-07-22 23:15:01

Compressing video in ffmpeg with minimal quality loss?

tell me what the most correct compression option will be, I'm interested in the command (of course, the output bitrate depends on the frame rate and resolution, but omit these points, they are logically understandable, you can experiment with them individually),
as I understand it, a double compression pass will be more gentle, maybe something else can be bungled, here is the command how I do it:
ffmpeg -y -i inpout.MOV -c:v libx264 -r 29.970 -b:v 1000k -pass 1 -c:a aac -b:a 96k -f mp4 / dev/null && \
ffmpeg -i inpout.MOV -c:v libx264 -r 29.970 -b:v 1000k -pass 2 -c:a aac -b:a 96k output.mp4

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-07-23
@Igore108

Two-Pass
This method is generally used if you are targeting a specific output file size and output quality from frame to frame is of less importance. This is best explained with an example. Your video is 10 minutes (600 seconds) long and an output of 50 MB is desired. Since bitrate = file size / duration

double pass not for "quality" but for size
https://trac.ffmpeg.org/wiki/Encode/H.264#a2.Choos...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question