[FFmpeg-user] Shrinking video files

Moritz Barsnick barsnick at gmx.net
Mon Apr 3 15:14:43 EEST 2017


On Mon, Apr 03, 2017 at 13:52:18 +0200, Cecil Westerhof wrote:
> Well, there are always optimums. As in my other reply: with the advice
> from Chronek I got a smaller file, that was generated a lot faster,
> without a quality loss that I was aware of.

You did ask "and still keeps a good quality". Well, quality is
subjective. While libx264's default of CRF 23 is "quite appropriate in
many cases", it really depends on you. Sometimes, your eyes (or even
those of your customer/consumer) will see certain artifacts or
shortcomings, sometimes not. Sometimes it only manifests itself on a
different device (e.g. on your TV screen instead of your computer
screen). If you are actually willing to sacrifice some "objective"
quality, you need to experiment with those parameters.

Please keep in mind that it also depends on the material. There's a
difference between sports with lots of motion, slower movie sequences,
and even cartoons. Sometimes more grain (and more artifacts, for that
matter) will make the result look "sharper". Sometimes, blurry effects
due to limited bandwidth (or CRF) are more noticable than others. (I
sometimes have the impression that I can easily differentiate between
web-based material (3 Mbit/s) and DVB-S2 (15+ Mbit/s), sometimes I
can't.) 

The tunings of e.g. libx264 may be able to help you with some of this:
    film,animation,grain,stillimage,psnr,ssim(,fastdecode,zerolatency)

> I was hoping to get a few good rule of thumbs from the people that are
> experienced with doing this stuff. ;-)

You have to inspect your thumb first.

Oh, BTW, another way of speeding things up is using a faster CPU. ;-)
(Or multiple CPUs, if you are doing multiple encodes anyway.)

Moritz


More information about the ffmpeg-user mailing list