Tracking PTS of decoded H264 frames with leaky queue

barapa ben.rapaport at gmail.com
Tue Feb 5 13:33:51 UTC 2019


I have an annex-b H264 stream that I am decoding via a gstreamer command-line
pipeline that looks something like: 

gst-launch-1.0 fdsrc ! queue ! h264parse ! avdec_h264 ! videoconvert !
'video/x-raw, format=RGB'  ! fdsink sync=false 

I run this as a subprocess from another program, communicating over
stdin/stdout. I cannot easily build gstreamer into this program, so for now,
I am stuck running it as a subprocess like this. 

Before writing each frame to stdin, I know the PTS of the frame, and I need
to know this PTS on the RGB image I read out of stdout. At the moment, I
simply match the incoming to outgoing frames one-to-one. However, I want
gstreamer to be able to drop frames to keep up by introducing a leaky queue.
However, in doing so, I lose track of which PTS belongs to which output RGB
image. 

Is there any way to write the PTS values into the stream somehow and recover
them after decoding (while continuing to use a command-line pipeline)? Or,
can I get gstreamer to somehow notify me of a dropped frame, preferably by
outputting something to stdout that I could parse? 

Thanks



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list