[FFmpeg-user] Shrinking video files

Cecil Westerhof Cecil at decebal.nl
Mon Apr 3 16:23:09 EEST 2017

On Monday  3 Apr 2017 14:14 CEST, Moritz Barsnick wrote:

> 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.

That makes it all a bit more difficult. :'-(

But the input from Chronek put me on the right track and made my life
a lot easier. :-D
I now used:
    -vcodec libx265 -crf 26 -af volume=3 -preset ultrafast

This gave a 84 MB file in 34 minutes. It is noticeable less quality,
but I think it is still acceptable. (I could try 24.) I'll send it to
the organisation and just wait what they think.

By the way: when I am going to use an other preset like slow, the file
will be smaller, but can I count on it that the quality is at least as
good as with ultrafast?

> 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.)

In this case it was a speaking contest, so not much movement. Any
resources to educate myself for the different situations?

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

Well, ffmpeg already took all my cores. That is part of the problem of
long runs: when the conversion runs, I can almost do nothing else on
my computer.

It looks like I have to do it again the 15th for an ever bigger
speaking contest. (That is the problem when you do a job that is
perceived as good. ;-) )

I shoot the videos with a photo camera you can shoot also pictures
with. (A Canon SX60 HS or a Canon EOS 700D.) Any tips about what to do
to get the best source material?
And if someone has tips about shooting the videos themselves, I do not
mind to get them. Saturday was the first time I did this. It was not
to bad, but there is room for improvement.

Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

More information about the ffmpeg-user mailing list