intel / gstreamer-media-SDK

GNU Lesser General Public License v2.1
90 stars 49 forks source link

[WINDOWS] h264 decode dropping buffers for RTSP stream #151

Closed boxerab closed 5 years ago

boxerab commented 5 years ago

I am displaying an RTSP stream with low latency. I use the playbin plugin to set up the pipeline.

Using software avdec_h264 without hardware decode, there are no dropped frames. So, machine can keep up in software mode. Hardware decode is worse.

boxerab commented 5 years ago

Sdk version is 2018 R2, on HD 530

boxerab commented 5 years ago

Here is a pipeline that shows this problem:

gst-launch-1.0 -v rtspsrc location="rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov" latency = 0  ! rtph264depay ! h264parse ! mfxh264dec live-mode=true  ! videoconvert ! d3dvideosink

Error is:

gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstD3DVideoSink:d3dvideosink0:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstD3DVideoSink:d3dvideosink0: A lot of buffers are being dropped.
boxerab commented 5 years ago

If I set latency to default value of 2000 ms, then problem seems to go away. So, it looks like a problem with latency. Perhaps the multi-threading in Intel SDK makes it poorly designed for low latency RTSP streaming ?

boxerab commented 5 years ago

See here at the end of the page for a discussion of multi-threading problems when combining GStreamer and MSDK.

boxerab commented 5 years ago

Is MSDK suitable for playing live stream ?

boxerab commented 5 years ago

Strange thing is that sometimes, the stream runs without any dropped frames at all.

boxerab commented 5 years ago

Setting sync=false on the video sink fixes this issue, but this fix has its own issues.