Opened 3 years ago
Last modified 11 months ago
#8215 open defect
AVFoundation recording has inaccurate RGB values
Reported by: | LordHDL | Owned by: | Thilo Borgmann |
---|---|---|---|
Priority: | normal | Component: | avdevice |
Version: | git-master | Keywords: | avfoundation |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary: Recording the desktop with AVFoundation in RGB pixel format changes the color values of the output video.
How to reproduce: Use rawvideo or any lossless codec that supports RGB formats, and use -pixel_format 0rgb
or bgr0 for -f avfoundation
.
ffmpeg -f avfoundation -framerate 60 -pixel_format 0rgb -i "3:3" -c:v rawvideo -c:a copy -t 5 /Volumes/Samsung_X5/rawvideo.nut
Attachments (1)
Change History (6)
by , 3 years ago
Attachment: | Terminal Saved Output.txt added |
---|
comment:1 by , 3 years ago
Keywords: | macos removed |
---|
comment:2 by , 3 years ago
Earliest build I could find was January 2, 2019 and the issue was present then as well. Tested one from June as well, same thing.
comment:3 by , 3 years ago
Owner: | set to |
---|---|
Status: | new → open |
Please elaborate what "changes the color values of the output video" means.
Your console output looks fine.
comment:4 by , 3 years ago
When examining the pixels with a color tool (macOS has a preinstalled one called Digital Color Meter), the RGB values do not match the source. Recording with other software that supports these pixel formats (Syphon Recorder, OBS, etc.) will preserve the correct values, as will taking simple png/tiff screen shots. When using Digital Color Meter, select "display native values" to see 8-bit RGB, and compare a source (solid colors work best) with a media player that is confirmed to display RGB correctly (ffplay).
comment:5 by , 11 months ago
The display of MacOS uses display-p3. You need to tag the RGB values as p3-d65 primaries and as sRGB transfer. Tiff and PNG have an ICC profile while OBS may read sRGB swapchain. Please attach all needed files.
Is the issue also reproducible with builds from June 2019 or is this a regression?