appsrc QoS issues with omxh264dec on raspberry pi 3

heyron olivier.pelet at gmail.com
Thu Aug 9 16:16:54 UTC 2018


Hello,

I'm currently trying to serve h264 stream to RTSP clients using
gst-rtsp-server using a Raspberry pi 3.
I'm using Raspian and my gstreamer libs package version is 1.10.4-1.

Here's the my current pipeline used by my
gst_rtsp_media_factory_set_launch():
"( appsrc name=bebopsrc is-live=true do-timestamp=true max-bytes=500000 !
h264parse ! omxh264dec ! omxh264enc !
video/x-h264,stream-format=(string)byte-stream,control-rate=variable,profile=(string)high,target-bitrate=10000000
! rtph264pay name=pay0 pt=96 )"

My program fills a ring-buffer of raw h264 frames in background and one
frame of this buffer is pushed via appsrc whenever the "need-data" signal is
emitted.

When I start my RTSP client (VLC, ffplay, mplayer...) right after the
beginning of the ring-buffer fill, everthing works fine. But if I wait few
seconds I have a QoS event emitted by the "omxh264dec" element with a
negative jitter value and my RTSP client never gets the stream (it gets an
error 503 after ~20 seconds).

I took care of GST_BUFFER_DURATION and GST_BUFFER_PTS in my "need-data"
callback:
  GST_BUFFER_DURATION(buffer) = gst_util_uint64_scale_int(1, GST_SECOND,
30);
  GST_BUFFER_PTS(buffer) = ctx->timestamp;
  ctx->timestamp += GST_BUFFER_DURATION(buffer);

Here's the QoS message (printed with GST_DEBUG=5):
GST_BUS gstbus.c:317:gst_bus_post:<bus0> [msg 0x70d48a10] posting on bus qos
message: 0x70d48a10, time 99:99:99.999999999, seq-num 198, element
'omxh264dec-omxh264dec0', GstMessageQOS, live=(boolean)false,
running-time=(guint64)74412543, stream-time=(guint64)74412543,
timestamp=(guint64)74412543, duration=(guint64)18446744073709551615,
jitter=(gint64)-74412544, proportion=(double)0.5, quality=(int)1000000,
format=(GstFormat)GST_FORMAT_BUFFERS, processed=(guint64)0,
dropped=(guint64)1;

I tried to set queues before and after encoding/decoding elements and play
with my appsrc min/max-latency values, but the problem persists.

Moreover, this pipeline works on a "normal" computer using "avdec_h264" and
"x264enc".

I don't know where I am wrong, if anyone has a clue.

Thanks a lot.




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


More information about the gstreamer-devel mailing list