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 MasterQuestionable, 2 months ago

Cc: MasterQuestionable added
Component: ffmpegavformat
Keywords: editlist added; vvc vvenc livbbenc removed
Summary: VVC MP4 Decoding Issue - Frames Are MissingVVC MP4 decoding of frames missing
Version: unspecifiedgit-master

͏    Another MP4 editlist shenanigans...

comment:2 by MasterQuestionable, 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).

in reply to:  2 comment:3 by Rupert_Williamson, 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.

comment:4 by MasterQuestionable, 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

Last edited 2 months ago by MasterQuestionable (previous) (diff)

in reply to:  4 comment:5 by Rupert_Williamson, 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.

Note: See TracTickets for help on using tickets.