Luca
Luca

Reputation: 11016

gstreamer dropping frames: ARM processor

I am running a 9 sec video on my NVIDIA Tegra jetson TK1 board using gstreamer as:

 gst-launch-0.10 playbin uri=file:///home/ubuntu/widescreen.avi

I notice this drops a lot of frames and gstreamer prints these messages:

WARNING: from element /GstPlayBin:playbin0/GstBin:vbin/GstAutoVideoSink:videosink/GstXvImageSink:videosink-actual-sink-xvimage: A lot of buffers are being dropped.

Additional debug info:
gstbasesink.c(2875): gst_base_sink_is_too_late (): /GstPlayBin:playbin0/GstBin:vbin/GstAutoVideoSink:videosink/GstXvImageSink:videosink-actual-sink-xvimage:

 There may be a timestamping problem, or this computer is too slow.

I ran top while executing this and indeed gstreamer is taking 95% of the CPU. Now, when i play this video through the default media player, it plays completely fine and without any lag. I was wondering if anyone knows what may be the reason that gstreamer is unable to play it properly. I am new to gstreamer and wondering if I can do something to alleviate this.

Upvotes: 0

Views: 2903

Answers (2)

Rakesh M.R.
Rakesh M.R.

Reputation: 31

Bins are many elements combined into one element type structure(i.e with appropriate number of sinks and sources). playbin is a standard bin with an "autovideosink" element which automatically detects video sinks. Firstly I would suggest you to upgrade to gstreamer-1.0 in which many bugs were fixed. Secondly the problem seems to be with your xvimagesink, hence try using ximagesink by defining explicitly, your autovideosink is selecting xvimagesink by default. try this pipeine:- (for hardware decoding)

gst-launch-1.0 filesrc location="location of h264 video/file.avi" ! avidemux ! h264parse ! omxh264dec ! videoconvert ! ximagesink

or for cpu decoding use avdec_h264 instead of omxh264dec

Upvotes: 2

jfoytik
jfoytik

Reputation: 910

The default media player is likely using video hardware decoding if the media file is H.264, which allows it decode with less CPU resources. Try creating a gstreamer pipeline that explicitly uses the omx H.264 decoding element as discussed here (http://elinux.org/Jetson/H264_Codec).

eg. gst-launch-0.10 filesrc location=/home/ubuntu/widescreen.avi ! avidemux ! h264parse ! nv_omx_h264dec ! autovideosink

Upvotes: -1

Related Questions