How to use BT.709
Closed this issue · 2 comments
I have an RGB raw data, and I would like to generate the JPG.
But the range is incorrect when I encode the frame because I need to use raw images not full range (BT.709)
I try various parameter but I am not able to have the correct color in the jpg.
When I load the RGB raw24 how I can specify to use not the full range ?
Here the command I am using to extract the raw RGB and then the GPUJPEG command for just the standard conversion:
$ ffmpeg -i test.mp4 -frames:v 100 -pix_fmt rgb24 -color_primaries bt709 -t 10 %05d.raw
$ for i in {00001..00100}; do gpujpeg -e -g -q 100 -s 3072x3072 -R $i.raw $i.jpg; done
Hi Anthony,
this is currently not possible. Technically it would be possible to add limited-range RGB to GPUJPEG but I am not sure whether it is wise to increase the number of color spaces.
I am not sure about your use case - would it be possible to decode to full range RGB instead using: -vf scale=in_range=limited:out_range=full
?
The above will introduce some performance penalty. If not acceptable, what about using YCbCr output instead (which should be even faster than the original), eg. to uyvy422? GPUJPEG option would then be -c ycbcr-bt709 -f 422-u8-p1020
.
@MartinPulec thanks,
Sorry I did not respond early, I finally use another approach having a colorspace change in my code