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?
Asked
Active
Viewed 1.7k times
3

Vedant Sahu
- 51
- 1
- 1
- 6
1 Answers
9
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

Gyan
- 85,394
- 9
- 169
- 201
-
Is there a specific reason why little-endianness is used here? Will `yuv420p10be` produce a different result? – Andreï V. Kostyrka May 22 '22 at 00:01
-
That happens to be the native endianness on my machine. Run `ffmpeg -h encoder=libx265` to see yours. – Gyan May 22 '22 at 05:05