Convert 10bit HDR video to 8bit frames

Convert 10bit HDR video to 8bit frames

I want to convert a yuv420p10le video into .png frames at 8bit (0,255) without washing away the colours. How can I do that?

The usual command I use is:

ffmpeg -i input.mp4 '%05d.png'

However this will results in washed out colours. I've tried several commands I've found around but none of them worked properly. Can you help please?

答案1

I found the solution:

ffmpeg -i HDR.mov -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p '%05d.png'

Make sure to get the correct build of ffmpeg otherwise it won't have some of these options.

答案2

You can try something like:

ffmpeg -i input.mp4 -pix_fmt rgb24 '%05d.png'

This should write PNG files to be RGB, 24 bits per pixel

相关内容