<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Tue, Feb 5, 2019, 15:12 barapa <<a href="mailto:ben.rapaport@gmail.com">ben.rapaport@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have an annex-b H264 stream that I am decoding via a gstreamer command-line<br>
pipeline that looks something like: <br>
<br>
gst-launch-1.0 fdsrc ! queue ! h264parse ! avdec_h264 ! videoconvert !<br>
'video/x-raw, format=RGB' ! fdsink sync=false <br>
<br>
I run this as a subprocess from another program, communicating over<br>
stdin/stdout. I cannot easily build gstreamer into this program, so for now,<br>
I am stuck running it as a subprocess like this. <br>
<br>
Before writing each frame to stdin, I know the PTS of the frame, and I need<br>
to know this PTS on the RGB image I read out of stdout. At the moment, I<br>
simply match the incoming to outgoing frames one-to-one. However, I want<br>
gstreamer to be able to drop frames to keep up by introducing a leaky queue.<br>
However, in doing so, I lose track of which PTS belongs to which output RGB<br>
image. <br>
<br>
Is there any way to write the PTS values into the stream somehow and recover<br>
them after decoding (while continuing to use a command-line pipeline)? Or,<br>
can I get gstreamer to somehow notify me of a dropped frame, preferably by<br>
outputting something to stdout that I could parse?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Ending your pipeline with "! identity silent=0 ! fdsink sync=0" and starting gst-launch with -v (or was it -m?) should print buffer info to stderr right before writing each frame.</div><div dir="auto"><br></div><div dir="auto">Needless to say this isn't considered a stable interface. Or a good one, for that matter.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>