[FFmpeg-trac] #10062(undetermined:new): av1_qsv produces incorrect output files
FFmpeg
trac at avcodec.org
Mon Nov 28 22:28:28 EET 2022
#10062: av1_qsv produces incorrect output files
-------------------------------------+-------------------------------------
Reporter: oviano | Owner: (none)
Type: defect | Status: new
Priority: normal | Component:
| undetermined
Version: git-master | Resolution:
Keywords: qsv | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by oviano):
Thank you for the information.
In the meantime and for fun/to try and learn something I have been trying
to figure out why even with the suggested workaround from James above the
bitstream was not correct, and I think I can see what is going on.
============================================================
Bitstream produced by FFmpeg (with workaround to overwrite packet.pts
timestamps)
============================================================
EXTRADATA
OBU (1)
SEQ
PACKET PTS 0
OBU (1)
SEQ
OBU (6)
FRAME (SHOW)
PACKET PTS 512
OBU (6)
FRAME
PACKET PTS 1024
OBU (6)
FRAME
PACKET PTS 1536
OBU (6)
FRAME
PACKET PTS 2048
OBU (6)
FRAME (SHOW)
OBU (3)
FRAME HDR (SHOW FRAME IDX 3)
PACKET PTS 2560
OBU (6)
FRAME (SHOW)
OBU (3)
FRAME HDR (SHOW FRAME IDX 2)
PACKET PTS 3072
OBU (6)
FRAME
PACKET PTS 3584
OBU (6)
FRAME (SHOW)
OBU (3)
FRAME HDR (SHOW FRAME IDX 0)
PACKET PTS 4096
OBU (6)
FRAME (SHOW)
============================================================
Bitstream produced by QSVEnc (which has its own workaround for this issue)
============================================================
EXTRADATA
OBU (1)
SEQ
PACKET PTS 0
OBU (1)
SEQ
OBU (6)
FRAME (SHOW)
PACKET PTS 512
OBU (6)
FRAME
OBU (6)
FRAME
OBU (6)
FRAME
OBU (6)
FRAME (SHOW)
PACKET PTS 1024
OBU (3)
FRAME HDR (SHOW FRAME IDX 3)
PACKET PTS 1536
OBU (6)
FRAME (SHOW)
PACKET PTS 2048
OBU (3)
FRAME HDR (SHOW FRAME IDX 2)
PACKET PTS 2560
OBU (6)
FRAME
OBU (6)
FRAME (SHOW)
PACKET PTS 3072
OBU (3)
FRAME HDR (SHOW FRAME IDX 0)
PACKET PTS 3584
OBU (6)
FRAME (SHOW)
============================================================
In the FFmpeg bitstream not all packets output by QSV containable a frame
that can be shown, whereas with QSVEnc a packet always ends with a frame
that can be shown. This explains the stutter that occurs with FFmpeg-
produced bitstreams, because at some timestamps there is no frame, whereas
at other times they're a multiple.
Hopefully the fixes will resolve this, if not then I guess any FFmpeg
workaround would involve splitting and merging OBUs across packets.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10062#comment:17>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list