[FFmpeg-user] how to specify pixel format of input image pixels
Kieran O Leary
kieran.o.leary at gmail.com
Fri Sep 14 22:32:51 EEST 2018
Hi,
On Fri, Sep 14, 2018 at 8:03 PM Mayur Patel <m.patel at toonboxent.com> wrote:
> Perhaps there's something that needs to happen in the TIF header?
> Photometric Interpretation: RGB color
That would probably be a bad idea, seeing as the issue is most likely
that whatever tool is creating your TIFF file is actually creating RGB
values, not YCbCr values, and this Photometric Interpretation value is
probably correct. The issue is probably at source. Does the image
display correctly when you open it?
> Do I need to figure out how to set my TIF header Photometric Interpretation to 6 (YCrCb)? Does ffmpeg key from that?
No, ffmpeg does not do that AFAIK and messing with that value won't
fix your issue. Instead of hacking your file to add YCbCr to
Photometric interpretation, you should instead use whatever software
(what software is it and what settings are you using?) is creating the
TIFF to actually create YCbCr files.
I'm attaching two files. One is a yuv444 file made in ffmpeg. Then I
used a hex editor and switched the photometric interpretation value to
2. You can see that the hexedited one will decode incorrectly.
Best,
Kieran O'Leary
IFI Irish Film Archive
-------------- next part --------------
A non-text attachment was scrubbed...
Name: real_yuv444.tif
Type: image/tiff
Size: 232851 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20180914/8e291084/attachment.tif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hex_edited_to_be_rgb.tif
Type: image/tiff
Size: 232851 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20180914/8e291084/attachment-0001.tif>
More information about the ffmpeg-user
mailing list