[FFmpeg-trac] #6418(undetermined:open): ffmpeg QSV doesnt work with live streams
FFmpeg
trac at avcodec.org
Mon Jan 8 16:12:54 EET 2018
#6418: ffmpeg QSV doesnt work with live streams
-------------------------------------+-------------------------------------
Reporter: rycius | Owner:
Type: defect | Status: open
Priority: important | Component:
Version: git-master | undetermined
Keywords: qsv | Resolution:
regression | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by mkver):
I can confirm that this issue affects not only MPEG2, but also H.264 as
rycius has said. And it really has something to do with SPS/PPS parsing:
It treats recovery point I frames that are not IDR frames as keyframes if
they have SPS and PPS inband; if the SPS and PPS is merely available via
extradata, it refuses to decode. IDR frames are always treated as
keyframes and it works with extradata, too, not only in-band extradata.
I tested rycius' patch and it really makes qsv not give up if the first
frame it finds is not a keyframe; but it does not change which frames qsv
treats as keyframes. It should probably be put posted on the developers
mailing list to be merged as they see fit.
I'll attach some H.264 samples so that developers have something tangible
to work with.
IDR.No.Inband.SPPS.mkv contains two GOPs: First an open GOP with a
keyframe (with a recovery message SEI) and then a second GOP with an IDR
frame at the beginning. There are no in-band SPS/PPS. With the patch, the
first GOP produces some errors, but the second GOP is correctly decoded.
Without the patch, nothing is decoded at all.
The other samples are all variations of the same sample. They all have no
IDR frames and start with a closed GOP; the keyframes are all correctly
flagged with recovery point SEI messages. They differ in the amount of in-
band extradata (the SPS and PPS don't change within the stream at all):
Inband.SPPS.No.IDR.mkv has SPS/PPS in front of every keyframe;
No.Inband.SPPS.No.IDR.mkv has no in-band extradata; and
Partially.Inband.SPPS.No.IDR.mkv has SPS/PPS in front of every keyframe
except the very first. Of course, all these files contain the necessary
extradata in the CodecPrivate, too. Decoding Inband.SPPS.No.IDR.mkv
succeeds both with and without the patch; decoding
No.Inband.SPPS.No.IDR.mkv fails with and without the patch. Decoding
Partially.Inband.SPPS.No.IDR.mkv fails without the patch. With the patch,
the first GOP can't be decoded, but all subsequent ones can.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6418#comment:17>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list