Basic question about using playbin/playbin2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Basic question about using playbin/playbin2

Alton
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

RE: Basic question about using playbin/playbin2

dhoyt
> Is there a way to configure the amount of time playbin will try to connect before giving up?

It gets complicated and it depends on what playbin autoplugs and determines is its source. You'll need to listen to the various signals it produces and catch when it determines what its source is (in the past at least, you had to catch when playbin2 added a uridecodebin and then catch when uridecodebin added a decodebin and then catch when the decodebin added its source element -- a bit convoluted for sure). Then you can adjust the source's parameters. But elements like souphttpsrc don't give you much to play with. neonhttpsrc, however, has a connect-timeout property, for instance.

> I tried playbin2, but it wants to buffer for 10-15 seconds before it starts giving me any data.

There are various things that come into play here. If you're using MJPEG, then the auto-plugged multipartdemux in playbin2 can take a while before it determines (decides) that you're only looking at motion jpeg and don't have another (audio) stream muxed as well. With OSSBuild (I don't recall if this was added upstream or not), you can use a pipeline like the following (I did this from memory so it may not be 100% perfect) to take out that decision time:

gst-launch souphttpsrc location=http://...../video.mjpg ! multipartdemux single-stream=true ! jpegdec ! ffmpegcolorspace ! autovideosink

Note the addition of the "single-stream=true" property. I'm not much help w/ mpeg2. I'd also suggest you use the latest OSSBuild, v0.10.7 beta 4 -- it's almost as stable as 0.10.6 and uses a more up-to-date gstreamer.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Basic question about using playbin/playbin2

Alton
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Basic question about using playbin/playbin2

Stefan Sauer
In reply to this post by Alton
On 10.03.2011 15:38, Alton Patrick wrote:

> I've just started using gstreamer in a project, and I have a couple of
> (probably dumb) questions that I haven't been able to find answers to
> online.
>
> I'm using a gstreamer pipeline with playbin followed by gstappsink to
> get streaming video data (MJPEG or MPEG2 over http) into my
> application.  It's working pretty well, except for these two things:
>
> 1. On Windows (using build 0.10.6 from ossbuild), when I try to
> connect to a stream that doesn't exist, playbin sends an error message
> on the bus after a few seconds.  When the app sees the error, it
> prints a message telling the user it can't connect and shuts down.
>  But on Linux (FC14, with gstreamer 0.10.31), it takes *several
> minutes* for playbin to decide it can't connect.  Is there a way to
> configure the amount of time playbin will try to connect before giving
> up?

Maybe you can just lower the DNS timeout on your linux box (man
resolv.conf).

>
> 2. The documentation says playbin is deprecated and I should really be
> using playbin2.  I tried playbin2, but it wants to buffer for 10-15
> seconds before it starts giving me any data.  (playbin either does no
> buffering, or little enough that I don't notice.)  I tried setting the
> properties "buffer-duration" and "buffer-size" to 0, but that didn't
> seem to change the behavior.  How can I stop playbin2 from buffering,
> or at least get the buffer down to a reasonable amount?

Do you get this behaviour with a particualar stream only or in general.
Is it buffering 10-15 seconds of data or is it buffering for 10-15
seconds? Both seems to be too much.

Stefan

>
> I would appreciate any advice about these two issues, or pointers to
> where to find more information.  Thanks.
>
> -Alton
>
> --
> ________________________________________________________________________________
> Alton Patrick
> [hidden email] <mailto:[hidden email]>
> http://www.hapatrick.us/
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel