How do I convert 10-bit H.265 videos to H.264 without quality loss?

7

7

My laptop can't handle 10bit H.265 / HEVC videos, so I'm looking to convert them to 10bit H.264. How do I do this using, say, ffmpeg, with the least quality loss? And how can I convert 10-bit H.265 to 8-bit H.265?

HappyFace

Posted 2018-12-05T09:24:20.967

Reputation: 224

Answers

17

Convert 10-bit H.265 to 10-bit H.264:

ffmpeg -i input -c:v libx264 -crf 18 -c:a copy output.mkv
  • libx264 will automatically to to match the pixel format of the input, so no extra parameters are needed.

  • The example uses -crf 18 which will likely appear visually lossless. If you want true lossless mode then then use -crf 0, but note this can create large files. See FFmpeg Wiki: H.264.

Convert 10-bit H.265 to 8-bit H.265:

ffmpeg -i input -c:v libx265 -vf format=yuv420p -c:a copy output.mkv
  • Uses the format filter to choose the yuv420p pixel format to create 8-bit output.

  • Adjust the -crf value to provide the desired level of quality. Default is -crf 28. See FFmpeg Wiki: H.265.

  • If you want lossless mode then then replace -crf with -x265-params lossless=1, but note this can create large files.

Convert 10-bit H.265 to 8-bit H.264:

ffmpeg -i input -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy output.mkv
  • Uses the format filter to choose the yuv420p pixel format to create 8-bit output.

  • The example uses -crf 18 which will likely appear visually lossless. If you want true lossless mode then then use -crf 0, but note this can create large files. See FFmpeg Wiki: H.264.

llogan

Posted 2018-12-05T09:24:20.967

Reputation: 31 929

What about 10bit x265 to 8bit x265? – HappyFace – 2018-12-05T21:52:21.307

1@HappyFace Looks like I misread the question. I added that section. – llogan – 2018-12-05T21:57:50.543

1Adding -map 0 to the commands above will preserve subtitles and other additional streams. – HappyFace – 2018-12-07T09:06:46.013

PS4 only allow 8bit H264/AVC. But if use ffmpeg convert the 10bit H265/HEVC to H624, with preset, you will get the 10bit H264, which is not recognized on PS4 vedio player. This comment mark it useful for getting compability on PS4. – Alex Chiang – 2019-09-14T03:04:02.730

0

Handbrake can handle most anything.

The release notes mention 10-bit support.

The UI has all the options. I suggest you start there and get familiar with it.
See quick start guide.

There is also a CLI that can be downloaded here.
And the guide that has all the options laid out.

BlueGI

Posted 2018-12-05T09:24:20.967

Reputation: 216

Can you add the complete command? – HappyFace – 2018-12-05T14:46:49.267

Added links to post, start with the UI - it has a queue so you can load up an entire folder at once if needed. – BlueGI – 2018-12-05T14:58:24.000