Opened 2 months ago
Last modified 2 months ago
#11250 new defect
VVC MP4 decoding of frames missing
Reported by: | Rupert_Williamson | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avformat |
Version: | git-master | Keywords: | mp4 editlist |
Cc: | MasterQuestionable | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
Attempting to extract frames from a vvenc-encoded .mp4 file does not extract all the frames.
How to reproduce:
Encode with: % ffmpeg -r 60 -ss 0 -i silver.mov -t 4 -y -c:v libvvenc vvc.mp4 Then decode with: ffmpeg -r 60 -i vvc.mp4 out/out_%04d.png ffmpeg version 2024-10-10-git-0f5592cfc7-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
Rather than getting 240 frames as I would expect (4 seconds of 60.000 fps input), I only get 209 frames out.
In this case the input file is a lossless 8bpc RGB 60fps 4K uncompressed .mov file. However I have this issue with other files too, such as 16 bit .nut files or even 16bpc .tif sequences.
Gyan thinks it "notionally appears to be a bug in the mp4 muxer" and sees an "editlist setting the start of the video track output from ~half-second."
For more details, you can see a post I made here:
https://www.reddit.com/r/ffmpeg/comments/1g684mo/vvc_decoding_issue_frames_are_missing/
Change History (5)
comment:1 by , 2 months ago
Cc: | added |
---|---|
Component: | ffmpeg → avformat |
Keywords: | editlist added; vvc vvenc livbbenc removed |
Summary: | VVC MP4 Decoding Issue - Frames Are Missing → VVC MP4 decoding of frames missing |
Version: | unspecified → git-master |
follow-up: 3 comment:2 by , 2 months ago
͏ Also input "-ss" with output "-t"..?
͏ Try "-t" as input?
͏ Also express "-r" implies frame rate override:
͏ At times may cause unexpected behavior (when using with input of defined frame rate incompatible).
comment:3 by , 2 months ago
Replying to MasterQuestionable:
͏ Also input "-ss" with output "-t"..?
͏ Try "-t" as input?
͏ Also express "-r" implies frame rate override:
͏ At times may cause unexpected behavior (when using with input of defined frame rate incompatible).
I just tried several permutations of different orders of -ss, -i, and -t, as well as including or excluding the -r flag. It seems like it only happens when -r 60 is specified when decoding.
Here were the results:
-ss -i -t, -r encode, -r for decode: 209 frames -ss -t -i, -r encode, -r for decode: 209 frames -i -ss -t, -r encode, -r for decode: 209 frames -ss -i -t, -r encode only: 240 frames -ss -t -i, -r encode only: 240 frames -i -ss -t, -r encode only: 240 frames -ss -i -t, -r decode only: 209 frames -ss -t -i, -r decode only: 209 frames -i -ss -t, -r decode only: 209 frames -ss -i -t, no -r flag used: 240 frames -ss -t -i, no -r flag used: 240 frames -i -ss -t, no -r flag used: 240 frames
Given both the .mov file and the output .vvc file are exactly 60.000 fps, I don't really understand why the -r flag is causing a problem, but apparently it is.
follow-up: 5 comment:4 by , 2 months ago
͏ Probably bug.
͏ Did you reproduce what mentioned by Gyan?
͏ https://old.reddit.com/r/ffmpeg/comments/1g684mo/vvc_decoding_issue_frames_are_missing/?sort=old#lshv5q4
͏ (͏"-ignore_editlist" workaround)
͏ ----
͏ For debug adding below may help:
͏ -v debug -hide_banner -nostdin -nostats
comment:5 by , 2 months ago
Replying to MasterQuestionable:
͏ Probably bug.
͏ Did you reproduce what mentioned by Gyan?
͏ https://old.reddit.com/r/ffmpeg/comments/1g684mo/vvc_decoding_issue_frames_are_missing/?sort=old#lshv5q4
͏ (͏"-ignore_editlist" workaround)
͏ ----
͏ For debug adding below may help:
͏-v debug -hide_banner -nostdin -nostats
Yes, I could, using
ffmpeg -r 60 -ignore_editlist true -i vvc.mp4 out/out_%04d.png
produces all 240 frames, whereas
ffmpeg -r 60 -i vvc.mp4 out/out_%04d.png
only produces 209 frames.
͏ Another MP4 editlist shenanigans...