Video freezes and continues while reading RTSP, no buffering msg comes, using playbin2

Tim Müller tim at centricular.com
Tue Oct 28 14:16:34 PDT 2014


On Tue, 2014-10-28 at 13:44 -0700, mezik wrote:

Hi,

I would strongly recommend you use the 1.x binaries from

 http://gstreamer.freedesktop.org/data/pkg/windows/

The 0.10 binaries from gstreamer.com are outdated and unmaintained.

As for your problem,

> I am writing a dll using gstreamer. the dll Gets the url and opens the rtsp
> stream then passes recived uncompressed buffers to application for video
> analysing.
> 
> I use playbin2 
> 
> then change the video-sink to appsink.
> 
> pipeline = gst_parse_launch("playbin2
> uri=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov")
> 
> /* Set playbin2's audio sink to be our sink bin */
> g_object_set(GST_OBJECT(pipeline), "video-sink", sink, NULL); 
> 
> setting appsink to emit signals and drop and save some buffers in its queue,
> gst_app_sink_set_emit_signals((GstAppSink*)sink, true);
> gst_app_sink_set_drop((GstAppSink*)sink, true);
> gst_app_sink_set_max_buffers((GstAppSink*)sink, 100);
> 
> 
> Then I set the pipeline state to playing.
> 
> I created callback for new_buffer, where I receive the new buffers reaching
> the appsink
> GstAppSinkCallbacks callbacks = { NULL, new_preroll, new_buffer,
> 		new_buffer_list, { NULL } };
> gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, NULL, NULL);
> 
> also have a callback to read all the messages passed to bus.
> gst_bus_add_signal_watch(bus);
> g_signal_connect(bus, "message", G_CALLBACK(cb_message), &data);
> 
> I listen to buffering messages, and when percent is lower then 100 I pause
> the pipline then I set to play again.
> 
> I have a funciton to recive the new buffers from the new_buffer callback
> 
> My problem is:
> The stream does not play smoothly there are several pauses, but no buffering
> message passed to bus.

Does it work fine (smooth) if you output things via playbin2 to a normal
videosink?

You probably want to set

   g_object_set (appsink, "sync", TRUE, NULL);

to make appsink respect the playout time of the buffers arriving on it.

Cheers 
 -Tim

> Please If you can help me 
> My goal is smooth video , and also low latency since I am using the video
> for analyzing app.
> 
> I understand playbin2 takes care of buffering, 
> should I set buffer-size, or buffer-duration? (tried it did not change the
> problem) what is the meaning of these properties?
> 
> Is there anything else to do.
> 
> 
> I am using 0.10 (from www.gstreamer.com)
> also today tried the same code( with some fixes) to use 1.4 version from
> official site.
> but still no luck.
> 
> 
> If someone could help me. I would be very grateful 
> I can post more of my code, to help clarify.
> 
> Thanks in advance 
> Mezik
> 
> 
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Video-freezes-and-continues-while-reading-RTSP-no-buffering-msg-comes-using-playbin2-tp4669252.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list