negative DTS delays
Nicolas Dufresne
nicolas.dufresne at collabora.com
Thu Feb 19 09:27:57 PST 2015
Le 2015-02-18 14:16, frankw a écrit :
> I am using following simple pipeline to transcode a ts file from mpeg video
> to x264 encoded, the encoding process ran fine, as well as playing encoded
> ts file with VLC, no issue. But when I try to check the DTS delay (DTS -
> STC) of the transcoded stream, I got large variations and lot of negative
> numbers, some period even goes to around minus 800ms around. This looks to
> me to have violated the decoder buffer model and will eventually cause
> decoder buffer underflow, in turn cause video glitches (surprisingly the VLC
> s/w player handles this pretty well...).
Would it be possible to clarify which GStreamer version is this ? Also
what do STC stands for ? What is the tool you are using for your
analyses ? In my knowledge, DTS delay are simply (PTS - DTS), a positive
value. We have upstreamed a first fix to avoid negative values for this
in master, which cause a desync right now, but is better then the old
behaviour which was not very consistent. The center of the issue being
that DTS is an unsigned value in GStreamer, where it is signed in x264
(first DTS is negative if the start PTS is 0 and b-frames are enabled).
Work is in progress to finish fixing this.
>
> Does anyone notice this? Is this a mpegtsmux issue, or something else I've
> missed?
>
> gst-launch-1.0 -v filesrc location=...ts ! tsdemux ! video/mpeg ! mpeg2dec !
> x264enc ! mpegtsmux ! filesink location=trans.ts
>
Note, that if there is issues with input TS or mpeg2dec, it might just
get mixed to everything else, making things even worst.
cheers,
Nicolas
More information about the gstreamer-devel
mailing list