nvcodec: Timestamps modified when nvh265dec is used, resulting in uneven video playback
Discussed in gstreamer-devel post.
Win 10 x64
Gstreamer 1.17 build from Cerbero/master -v visualstudio nvcodec intelmsdk
gst-launch filesrc ! matroskademux ! h265parse ! avdec_h265 OR nvh265dec [! queue] ! (d3d11videosink OR glimagesink)
Either avdec
or nvcodec
for decoding. Videosink choice doesn't change result; queue is optional. Tested with 4K and 1440p sources, playback using avdec
is smooth, whereas it's choppy/stuttering/jumpy with nvh265dec
. It's not a performance issue because with sync=false on the videosink, the video plays very fast and smooth with either decoder.
demux -> (even PTS progression) parser (uneven PTS) -> nvcodec decoder -> ... -> uneven video playback
Buffer PTS times logged from pad probes showed even progression with avdec
throughout the pipeline; with nvh265dec
, these timestamps are also even at the parser's sink, but become uneven (i.e. the delta between buffer PTS values becomes not constant) from the parser's src pad down; some buffers even share the same PTS. Restoring the "original" PTS values (taken from the parser's sink) results in smooth video playback.