0

My laptop seems unable to handle 12bit HEVC videos efficiently. The video appears to stagger when I play it so I'm looking to convert them to 10bit H.265. How do I do this using, ffmpeg, with little or no quality loss?

Edit: Okay so I managed to convert it from 12-bit to 10-bit but there is visible loss in quality on comparison. How do I maintain quality while converting to 10-bit output?

This is the command I used ffmpeg -i input.mkv -c:v libx265 -vf format=yuv420p10le -c:a copy output.mkv
Should I try a specific -crf/cbr?

The enable/disable hardware acceleration option in media player didn't do well to play the 12-bit video.

Solved: Okay so the quality issue has been solved. I tried three commands and the all worked equally good.

The first ffmpeg -i input.mkv -c:v libx265 -crf 16 -vf format=yuv420p10le -c:a copy output.mkv This resulted in almost identical visual quality and the same size as the original video.

The second (by @harrymc) ffmpeg -i input.mkv -pix_fmt yuv420p10le -c:v libx265 -crf 28 -x265-params profile=main10 out.mkv This one also resulted in equally good visual quality as the above but somehow, it reduced my file size to nearly half so it seems the best command of all three to me.

The third (by @Anmol Mishra), ffmpeg -i input.mkv -pix_fmt yuv420p10le -c:v libx265 -crf 23 -preset slow -tune grain out.mkv This too had no loss in visual quality that's apparent to naked eye and also reduced file size by a quarter.

Thank you everyone for help.

1 Answers1

0

You want to use a visual lossless equivalent crf and tune. Read the x265 page here - https://trac.ffmpeg.org/wiki/Encode/H.265 and here - https://forum.doom9.org/showthread.php?t=172458

ffmpeg -i input.mkv -pix_fmt yuv420p10le -c:v libx265 -crf 23 -preset slow -tune grain film out.mkv

x264 will get blocky while x265 will blur. To offset some of the blur, the -tune grain will bring in smaller detail. Do not try to modify other parameters unless you truly understand HEVC.

Depending on the space you have, you can test crf values from 20-23, I could not find much of a difference.

moi
  • 331