Opened 4 years ago

Last modified 23 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)

Terminal Saved Output.txt (13.3 KB ) - added by LordHDL 4 years ago.

Download all attachments as: .zip

Change History (6)

by LordHDL, 4 years ago

Attachment: Terminal Saved Output.txt added

comment:1 by Carl Eugen Hoyos, 4 years ago

Keywords: macos removed

Is the issue also reproducible with builds from June 2019 or is this a regression?

comment:2 by LordHDL, 4 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.

Last edited 4 years ago by LordHDL (previous) (diff)

comment:3 by Thilo Borgmann, 4 years ago

Owner: set to Thilo Borgmann
Status: newopen

Please elaborate what "changes the color values of the output video" means.
Your console output looks fine.

comment:4 by LordHDL, 4 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 Balling, 23 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.

Note: See TracTickets for help on using tickets.