how to encode a video file to x265 10bit main10 profile in ffmpeg

Vedant Sahu picture Vedant Sahu · Jun 29, 2020 · Viewed 7.4k times · Source

I'm currently trying to encode a video file with ffmpeg -i input.mkv libx265 crf=28 -x265-params profile=main10 out.mkv but i am getting the output file is in 8 bit?

Answer

Gyan picture Gyan · Jun 29, 2020

If the input isn't already 10-bit, you have to first convert it, usually using -pix_fmt.

ffmpeg -i input.mkv -pix_fmt yuv420p10le -c:v libx265 -crf 28 -x265-params profile=main10 out.mkv