GStreamer RTSP Server use case

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

GStreamer RTSP Server use case

Victor Gottardi
Consider an IP camera. I'm looking for a way to provide two video streams with different resolutions or codec settings using the RTSP server. The video comes from the same source and therefore the streams are in the same pipeline. How to map these two different streams to two different RTSP URIs using rtsp-server?

Looking at the source, it looks like RTSP server was not designed for this. It assumes that each URI maps to a standalone pipeline. Is this a true limitation? (Wim Tymans, this question is directly addressed to you :-) The source is quite complex and some of the classes allow subclassing and customization. It's not clear to me at this point how I can work around this problem. Any help is appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer RTSP Server use case

Wes Miller
Administrator

On 8/30/11 3:55 PM, "Victor Gottardi" <[hidden email]>
wrote:

>Consider an IP camera. I'm looking for a way to provide two video streams
>with different resolutions or codec settings using the RTSP server. The
>video comes from the same source and therefore the streams are in the same
>pipeline. How to map these two different streams to two different RTSP
>URIs
>using rtsp-server?

Just being curious/dumb, do you have multiple endpoints (i.e. Payloaders)
in your pipeline?  Something along the line of

     ... Complex-pipe ! tee name=t
       t. ! low-res-pipe ! rtpwxyzpay pt=100
       t. ! higfh-res-pipe ! rtpwxyzpay pt=101

So that the low and hires streams are sent out as different payload types.
 Of course, this is going to be a single URI not two.  Did you want two
URIs?  I think the gstrtpbin in the receiver program ought to be able to
separate the payload type and gives you back two streams.

This idea is based on the rtsp example program test-video.c in the
/examples directory of the rtsp source package.

Of course I could be all wet.....

Wes


CONFIDENTIALITY NOTE:

This e-mail and any attachments are confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: GStreamer RTSP Server use case

Victor Gottardi
Wes, I want two different URIs. For example:
  rtsp://ip-address:8554/high-res
  rtsp://ip-address:8554/low-res
For low bandwidth applications, the client would use the low-res stream.

I'm not sure if it's possible to select one stream if both are added to
the same URI as in:
  rtsp://ip-address:8554/both-res
Clients are typically not that smart. For example VLC would open an
extra window in this case (not implying that VLC is not smart, quite the
opposite).


-----Original Message-----
From:
gstreamer-devel-bounces+victor.gottardi=[hidden email].
org
[mailto:gstreamer-devel-bounces+victor.gottardi=[hidden email]
desktop.org] On Behalf Of Wesley J. Miller
Sent: Tuesday, August 30, 2011 4:26 PM
To: Discussion of the development of and with GStreamer
Subject: Re: [GST-DEVEL]GStreamer RTSP Server use case


On 8/30/11 3:55 PM, "Victor Gottardi" <[hidden email]>
wrote:

>Consider an IP camera. I'm looking for a way to provide two video
streams
>with different resolutions or codec settings using the RTSP server. The
>video comes from the same source and therefore the streams are in the
same
>pipeline. How to map these two different streams to two different RTSP
>URIs
>using rtsp-server?

Just being curious/dumb, do you have multiple endpoints (i.e.
Payloaders)
in your pipeline?  Something along the line of

     ... Complex-pipe ! tee name=t
       t. ! low-res-pipe ! rtpwxyzpay pt=100
       t. ! higfh-res-pipe ! rtpwxyzpay pt=101

So that the low and hires streams are sent out as different payload
types.
 Of course, this is going to be a single URI not two.  Did you want two
URIs?  I think the gstrtpbin in the receiver program ought to be able to
separate the payload type and gives you back two streams.

This idea is based on the rtsp example program test-video.c in the
/examples directory of the rtsp source package.

Of course I could be all wet.....

Wes


CONFIDENTIALITY NOTE:

This e-mail and any attachments are confidential. If you are not the
intended recipient, be aware that any disclosure, copying, distribution
or use of this e-mail or any attachment is prohibited. If you have
received this e-mail in error, please notify us immediately by returning
it to the sender and delete this copy from your system. Thank you for
your cooperation.
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer RTSP Server use case

Wim Taymans
In reply to this post by Victor Gottardi
On 08/30/2011 09:55 PM, Victor Gottardi wrote:
> Consider an IP camera. I'm looking for a way to provide two video streams
> with different resolutions or codec settings using the RTSP server. The
> video comes from the same source and therefore the streams are in the same
> pipeline. How to map these two different streams to two different RTSP URIs
> using rtsp-server?
>
> Looking at the source, it looks like RTSP server was not designed for this.
> It assumes that each URI maps to a standalone pipeline. Is this a true
> limitation? (Wim Tymans, this question is directly addressed to you :-) The

This is not true: an URI maps to a media factory, which is responsible
for creating a media object that provides the streams. The factory
receives the URI to do this and can reuse the same pipeline for multiple
media objects if it wants.

What you want to do is use the uri to configure the pipeline with
different codec settings (use tee to send the video stream to multiple
encoders with different settings) and create a media object from it. For
that you would need to make a subclass of the media-factory object.

Wim


> source is quite complex and some of the classes allow subclassing and
> customization. It's not clear to me at this point how I can work around this
> problem. Any help is appreciated.
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/GStreamer-RTSP-Server-use-case-tp3779614p3779614.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: [gmail] Re: GStreamer RTSP Server use case

Marc Leeman

Zeg Wim

Een proficiat he!

Tim vertelde gisteren bij een leffeke op de grote markt in Kortrijk dat
ge vader geworden zijt...


--
  greetz, marc
harvey 2.6.29.1 #1 PREEMPT Mon Apr 6 22:33:31 CDT 2009 GNU/Linux

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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [gmail] Re: GStreamer RTSP Server use case

Marc Leeman
Please ignore me and my irrelevant message.

/me backs away slowly and writes 100x
"I shall check the Reply-To header."

--
  greetz, marc
harvey 2.6.29.1 #1 PREEMPT Mon Apr 6 22:33:31 CDT 2009 GNU/Linux

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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: GStreamer RTSP Server use case

Victor Gottardi
In reply to this post by Wim Taymans
Thanks Wim, that helped a lot.

I subclassed the media factory to handle two different URIs. It creates
the pipeline and the common part (videotestsrc, caps, and tee) when the
first client connects. It then creates an encoder and a media object for
each of the URIs when requested. It works fine so far as only one of the
URI is used. As soon as the second one connects, the pipeline hangs. I
know it's not trivial to add branches to a running pipeline so I wonder
if I'm on the right track for now.

Victor

-----Original Message-----
From: Wim Taymans [mailto:[hidden email]]
Sent: Tuesday, August 30, 2011 5:19 PM
To: Discussion of the development of and with GStreamer
Cc: Gottardi, Victor (ON19)
Subject: Re: GStreamer RTSP Server use case

On 08/30/2011 09:55 PM, Victor Gottardi wrote:
> Consider an IP camera. I'm looking for a way to provide two video
streams
> with different resolutions or codec settings using the RTSP server.
The
> video comes from the same source and therefore the streams are in the
same
> pipeline. How to map these two different streams to two different RTSP
URIs
> using rtsp-server?
>
> Looking at the source, it looks like RTSP server was not designed for
this.
> It assumes that each URI maps to a standalone pipeline. Is this a true
> limitation? (Wim Tymans, this question is directly addressed to you
:-) The

This is not true: an URI maps to a media factory, which is responsible
for creating a media object that provides the streams. The factory
receives the URI to do this and can reuse the same pipeline for multiple

media objects if it wants.

What you want to do is use the uri to configure the pipeline with
different codec settings (use tee to send the video stream to multiple
encoders with different settings) and create a media object from it. For

that you would need to make a subclass of the media-factory object.

Wim


> source is quite complex and some of the classes allow subclassing and
> customization. It's not clear to me at this point how I can work
around this
> problem. Any help is appreciated.
>
> --
> View this message in context:
http://gstreamer-devel.966125.n4.nabble.com/GStreamer-RTSP-Server-use-ca
se-tp3779614p3779614.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

RE: GStreamer RTSP Server use case

Victor Gottardi
No luck. GstRTSPMedia assumes it has full control over the pipeline. It doesn't look like it's possible to have two Media objects sharing the same pipeline. In the current implementation, GstRTSPMedia shuts down the entire pipeline in it's finalize method.

How can I work around this problem? Is this even possible without changes to the current GstRTSPMedia implementation?

Victor
Reply | Threaded
Open this post in threaded view
|

RE: GStreamer RTSP Server use case

timothybean
In reply to this post by Victor Gottardi
Were you ever able to get this figured out? I am looking to do the same exact thing. Any help would be much appreciated!

Tim