#10513 closed defect (invalid)
FFmpeg makes frames with quality issues
Reported by: | arizel | Owned by: | |
---|---|---|---|
Priority: | critical | Component: | ffmpeg |
Version: | git-master | Keywords: | |
Cc: | arizel | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
I have a problem making frames from a video. Frames in output has different colors in comparison with the video.
Video characteristics (analysed using ffprobe):
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/arizel/Downloads/IMG_9525_7064.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2023-06-20T15:45:07.000000Z
com.apple.quicktime.location.accuracy.horizontal: 4.740115
com.apple.quicktime.location.ISO6709: +47.7496+022.3923+120.265/
com.apple.quicktime.make: Apple
com.apple.quicktime.model: iPhone 14 Pro Max
com.apple.quicktime.software: 16.5
com.apple.quicktime.creationdate: 2023-06-20T18:45:07+0300
Duration: 00:00:10.80, start: 0.000000, bitrate: 8795 kb/s
Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 1920x1080, 8565 kb/s, 30 fps, 30 tbr, 600 tbn (default)
Metadata:
creation_time : 2023-06-20T15:45:07.000000Z
handler_name : Core Media Video
vendor_id : [0][0][0][0]
encoder : HEVC
Side data:
DOVI configuration record: version: 1.0, profile: 8, level: 4, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 4
displaymatrix: rotation of -90.00 degrees
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 182 kb/s (default)
Metadata:
creation_time : 2023-06-20T15:45:07.000000Z
handler_name : Core Media Audio
vendor_id : [0][0][0][0]
Stream #0:2[0x3](und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2023-06-20T15:45:07.000000Z
handler_name : Core Media Metadata
Stream #0:3[0x4](und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2023-06-20T15:45:07.000000Z
handler_name : Core Media Metadata
Stream #0:4[0x5](und): Data: none (mebx / 0x7862656D), 34 kb/s (default)
Metadata:
creation_time : 2023-06-20T15:45:07.000000Z
handler_name : Core Media Metadata
Unsupported codec with id 0 for input stream 2
Unsupported codec with id 0 for input stream 3
Unsupported codec with id 0 for input stream 4
How to reproduce:
% ffmpeg -hide_banner -y -i "IMG_9525_7064.mov" -t 10 -vf "scale=w=480:h=-1, fps=5" -pix_fmt rgb24 frames%06d.jpg ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Attachments (3)
Change History (11)
by , 9 months ago
Attachment: | burger.mp4 added |
---|
comment:1 by , 9 months ago
On Windows I see no difference, with FFplay for the video and IrfanView for the image. Might be a player issue. Please note that in your command line you did make a JPG, but the uploaded image is a PNG. I think "-pix_fmt rgb24" in your command line doesn't make sense for JPG output.
comment:2 by , 9 months ago
Use this command for extracting JPG images from the video:
ffmpeg -i burger.mp4 -vf framestep=10 burger%%3d.jpg
Make this batch file and save it on the desktop:
ffplay -loop 0 -t 0 -x 500 -an %1
pause
Drag and drop the first extracted image on the icon of the batch file.
Drag and drop the video on the icon of the batch file. It will show only the first frame of the video.
Now you see both frames side by side (with the same player) and there should be no difference.
P.S. %%3d is for Windows batch file. You may have to change that to %3d.
comment:3 by , 9 months ago
Do you still see different colors when using the same player? If not, then we can close this ticket.
follow-up: 5 comment:4 by , 9 months ago
Thank you for answer and suggestions. Actually I still have problem with colors. I have attached screenshot how it looks on my computer (MacOS). You can sure that problem still exists.
I made frames using command:
ffmpeg -i burger.mp4 -vf framestep=10 burger%3d.jpg
Then I opened video by default application in macOS(quick time player) and default program for images. The main problem that iphone users see difference between their video and frame images and we need to fix that.
Could you please try to reproduce this issue on macOS? I believe it will help to understand the problem.
Thank you in advance!
comment:5 by , 9 months ago
Replying to arizel:
I made frames using command:
ffmpeg -i burger.mp4 -vf framestep=10 burger%3d.jpg
Then I opened video by default application in macOS(quick time player) and default program for images.
Why do you compare a PNG when you did make a JPG? Where does the PNG come from?
comment:6 by , 9 months ago
I still think it's a player issue and will vanish when you show both images with the same player. Or extract all frames from the video and re-assemble them to a new video, and then compare the old and new video.
follow-up: 8 comment:7 by , 9 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
PNG is tagged as Identity matrix (full range), HLG, BT.2020 primaries by using the new W3C cICP chunk spec. Apple does not support it yet. Bug in Apple. Only mpv supports it.
comment:8 by , 9 months ago
Replying to Balling:
PNG is tagged as Identity matrix (full range), HLG, BT.2020 primaries by using the new W3C cICP chunk spec. Apple does not support it yet. Bug in Apple. Only mpv supports it.
Thank you for information!
original video