How do I convert 10-bit H.265 / HEVC videos to H.264 without quality loss?
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?
10-bit/12-bit HEVC to 8-bit H.264
ffmpeg -i input -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy output.mkv
-
-map 0
will include all streams (default stream selection only selects 1 stream per type). See FFmpeg Wiki: Map.
-
Adjust the -crf
value to provide the desired level of quality. Add the -preset
option if you want to adjust encoding speed. See FFmpeg Wiki: H.264 for more info on -crf
and -preset
.
-
Uses the format filter to choose the yuv420p
pixel format to create 8-bit output.
10-bit/12-bit HEVC to 10-bit H.264
ffmpeg -i input -map 0 -c:v libx264 -crf 18 -c:a copy output.mkv
-
-map 0
will include all streams (default stream selection only selects 1 stream per type). See FFmpeg Wiki: Map.
-
Adjust the -crf
value to provide the desired level of quality. Add the -preset
option if you want to adjust encoding speed. See FFmpeg Wiki: H.264 for more info on -crf
and -preset
.
-
No need for the format filter in this case.
10-bit/12-bit HEVC to 8-bit HEVC
ffmpeg -i input -map 0 -c:v libx265 -crf 20 -vf format=yuv420p -c:a copy output.mkv
-
-map 0
will include all streams (default stream selection only selects 1 stream per type). See FFmpeg Wiki: Map.
-
Adjust the -crf
value to provide the desired level of quality. Add the -preset
option if you want to adjust encoding speed. See FFmpeg Wiki: HEVC / H.265 for more info on -crf
and -preset
.
-
Uses the format filter to choose the yuv420p
pixel format to create 8-bit output.
12-bit HEVC to 10-bit HEVC
ffmpeg -i input -map 0 -c:v libx265 -crf 20 -vf format=yuv420p10le -c:a copy output.mkv
-
-map 0
will include all streams (default stream selection only selects 1 stream per type). See FFmpeg Wiki: Map.
-
Adjust the -crf
value to provide the desired level of quality. Add the -preset
option if you want to adjust encoding speed. See FFmpeg Wiki: HEVC / H.265 for more info on -crf
and -preset
.
-
Uses the format filter to choose the yuv420p10le
pixel format to create 10-bit output. Other 10-bit pixel formats supported by libx265 are yuv422p10le
& yuv444p10le
, but your player may not like these. See ffmpeg -h encoder=libx265
for additional supported pixel formats.
ffmpeg -i input -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy output.mkv
-map 0
will include all streams (default stream selection only selects 1 stream per type). See FFmpeg Wiki: Map.
Adjust the -crf
value to provide the desired level of quality. Add the -preset
option if you want to adjust encoding speed. See FFmpeg Wiki: H.264 for more info on -crf
and -preset
.
Uses the format filter to choose the yuv420p
pixel format to create 8-bit output.
ffmpeg -i input -map 0 -c:v libx264 -crf 18 -c:a copy output.mkv
-
-map 0
will include all streams (default stream selection only selects 1 stream per type). See FFmpeg Wiki: Map. -
Adjust the
-crf
value to provide the desired level of quality. Add the-preset
option if you want to adjust encoding speed. See FFmpeg Wiki: H.264 for more info on-crf
and-preset
. -
No need for the format filter in this case.
10-bit/12-bit HEVC to 8-bit HEVC
ffmpeg -i input -map 0 -c:v libx265 -crf 20 -vf format=yuv420p -c:a copy output.mkv
-
-map 0
will include all streams (default stream selection only selects 1 stream per type). See FFmpeg Wiki: Map.
-
Adjust the -crf
value to provide the desired level of quality. Add the -preset
option if you want to adjust encoding speed. See FFmpeg Wiki: HEVC / H.265 for more info on -crf
and -preset
.
-
Uses the format filter to choose the yuv420p
pixel format to create 8-bit output.
12-bit HEVC to 10-bit HEVC
ffmpeg -i input -map 0 -c:v libx265 -crf 20 -vf format=yuv420p10le -c:a copy output.mkv
-
-map 0
will include all streams (default stream selection only selects 1 stream per type). See FFmpeg Wiki: Map.
-
Adjust the -crf
value to provide the desired level of quality. Add the -preset
option if you want to adjust encoding speed. See FFmpeg Wiki: HEVC / H.265 for more info on -crf
and -preset
.
-
Uses the format filter to choose the yuv420p10le
pixel format to create 10-bit output. Other 10-bit pixel formats supported by libx265 are yuv422p10le
& yuv444p10le
, but your player may not like these. See ffmpeg -h encoder=libx265
for additional supported pixel formats.
ffmpeg -i input -map 0 -c:v libx265 -crf 20 -vf format=yuv420p -c:a copy output.mkv
-map 0
will include all streams (default stream selection only selects 1 stream per type). See FFmpeg Wiki: Map.
Adjust the -crf
value to provide the desired level of quality. Add the -preset
option if you want to adjust encoding speed. See FFmpeg Wiki: HEVC / H.265 for more info on -crf
and -preset
.
Uses the format filter to choose the yuv420p
pixel format to create 8-bit output.
ffmpeg -i input -map 0 -c:v libx265 -crf 20 -vf format=yuv420p10le -c:a copy output.mkv
-
-map 0
will include all streams (default stream selection only selects 1 stream per type). See FFmpeg Wiki: Map. -
Adjust the
-crf
value to provide the desired level of quality. Add the-preset
option if you want to adjust encoding speed. See FFmpeg Wiki: HEVC / H.265 for more info on-crf
and-preset
. -
Uses the format filter to choose the
yuv420p10le
pixel format to create 10-bit output. Other 10-bit pixel formats supported by libx265 areyuv422p10le
&yuv444p10le
, but your player may not like these. Seeffmpeg -h encoder=libx265
for additional supported pixel formats.
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.