Slight but noticeable color shift when using FFmpegFrameGrabber
#2 172 ouverte le 18 janv. 2024
Métriques du dépôt
- Stars
- (6 985 stars)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
There's a slight change in colors when grabbing frames with FFmpegFrameGrabber and the bgr24 pixel format, compared to what the ffmpeg command line tool produces when saving frames as PNGs or when compared to ffplay's output. Parts of the image are sometimes more contrasty, which makes compression artifacts more pronounced (e.g., banding with some low-contrast gradients).
I'm attaching the same frame fragment, one grabbed with FFmpegFrameGrabber and the other saved as a PNG with the command line tool.
Correct colors (straight from ffmpeg):
Colors from the same frame grabbed with FFmpegFrameGrabber:
The FFmpegFrameGrabber one has a slight, greenish tint (judging purely by eye).
To get the PNGs with the command line tool, I used this:
ffmpeg -i in.mp4 -t 00:00:01 out/%04d.png