Working on some video stuff.
#ColorSpace #ColourSpace #hell with #ffmpeg as usual.
Encoding sRGB data in PPM files to yuv420p x264 mkv with ffmpeg and back to PNG looks ok. There is no colour space information recorded in the mkv afaict, so maybe other decoders will guess at different colours...
Encoding REC.709 YUV raw data to yuv240p/bt709 mkv with x264 command line, specifying which colour matrices and transfer functions etc to use, ffmpeg decodes it to something with bad/shifted colours (too dark). This is probably to do with transfer functions; either from bt709 to linear YUV, or from linear RGB to sRGB, or both (probably both).
MPlayer output to PNG on Debian Buster is broken somehow at the moment so I can't test if decoding is the issue, haven't figured out how to get (C)VLC to output to image files either. MPV uses ffmpeg internally so that's no good for testing, even though it works with `--vo image`.
#colorspace #ColourSpace #hell #ffmpeg