3

It's easier to notice details in still objects compared to moving ones, so modern codecs save bandwidth by reducing detail during movement. However, this optimization seems far too pronounced to me with the codecs and settings I've tried. The following are cropped screenshots from viewing in VLC, and the person is in the midst of turning their head from screen left to screen right.

Here's the original DVD, MPEG2, 9000 kbps (for the video), 720x480. There's some noise, but the facial expression is clear, even though it's in motion.

original DVD

The following was encoded from the original with DivX 3.11a low-motion, 2-pass, averaging 1705 kbps (for the video), 432x320. It's a bit fuzzier than the original due to the reduced resolution, but it's faithfully reproducing everything in the frame.

DivX 3.11a

The following was encoded from the original with AVC in ffmpeg, averaging 962 kbps (for the video), 720x480. I'm using a CRF of 22 to be a bit higher quality than the AVC default of 23.

ffmpeg -i        in.vob
       -filter:v yadif
       -c:v      libx264
       -crf      22
       -c:a      libopus
       -b:a      64k
       -strict   -2
                 out.mp4

Static areas are almost as crisp as the original, but areas in motion have been optimized into blocky smudges.

AVC

And finally, the following was encoded from the original with HEVC in ffmpeg, averaging 372 kbps (for the video), 720x480. I'm using a CRF of 25 to be a bit higher quality than the HEVC default of 28.

ffmpeg -i        .\in.vob
       -filter:v yadif
       -c:v      libx265
       -crf      25
       -c:a      libopus
       -b:a      64k
       -strict   -2
                 out.mp4

Faces have been turned into blobs, and this isn't even the worst one in the frame.

HEVC

When the encoder tosses out information on certain areas due to the very thing that makes them interesting - motion - the optimization becomes really noticeable. However, I've seen videos encoded in AVC and HEVC that don't suffer from this, maintaining good detail even at ~1000 kbps for 1920x1080. What am I doing wrong, and how do I improve the quality with these modern codecs while still benefiting from reduced file sizes?

2
  • I've settled on the AVC settings above plus -tune film and rescaling to 640x480, and it's pretty okay, but still loses a good deal of detail with motion. Sep 6, 2021 at 5:15
  • Forgot to mention that it needs -vsync vfr -enc_time_base -1 to preserve the correct duration of each frame, otherwise it'll duplicate some frames and drop others in an attempt to make it match the average frame rate which results in choppiness. Jan 6, 2022 at 11:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.