[gst-devel] Re : Re : Re : Help with RTP

Aurelien Grimaud gstelzz at yahoo.fr
Fri Aug 8 15:14:31 CEST 2008


There are two "rtpbin" elements availables for gstreamer
rtpbin from gst-plugin-farsight and gstrtpbin from gst-plugins-bad.
I think Remi was using farsight's and Thomas gst-plugin-bad one.
I prefer the last one (gstrtpbin), it handles multiple rtp sessions, with AV sync using rtcp. jitterbuffer works better and RTCP is generated.

Remi, keep in mind that RTP is only a transport. You need some negotiation to be able to display a stream. RTP, for many case, is not enough. You need clockrate, frame size, frame rate of the stream and of course which codec to use.

These are the informations given by the sdp file, which are exchanged via the stream negotiation protocol RTSP.
So RTP handling is not enough if you want your client to be generic. You also need a codec negotiation for client to know what is sent and  how to handle it.

> Do you mean I have to write a plugin which is like this pipeline ?
> src -> demuxer -> streamer_transformer -> encoder -> payloader -> rtp

Actually, just the src/demuxer part of this pipeline is missing in gstreamer.
It could be a rtspserversrc :
It would act as a udp/tcp src, handling rtsp requests.
DESCRIBE requests may be answered via local sdp files (as in QTSS) or full filled by a signal
SETUP requests create udpsink elements, and new sometimes sink pad  to link to rtp. 
PLAY and PAUSE requests will be signaled to application.
TEARDOWN will clean up and send eos.

In fact rtspserversrc does not need to be a source. It can be linked to a tcp/udp source feeding it with rtsp.

udpsrc (rtsp) -->  |----------------| <--- <SETUP pad> -- <-- payloader <-- encoder <-- stream_transformer <-- stream source
                                  | rtspserverbin | 
                                  |----------------| --> |-----------|
                                                              | gstrtpbin |--> udpsink (rtp)
                                  udpsrc (rtcp) --> |-----------|--> udpsink (rtcp)
                                                               

Aurelien


----- Message d'origine ----
De : Thomas Winkler <wi-tom at gmx.de>
À : gstreamer-devel at lists.sourceforge.net
Envoyé le : Vendredi, 8 Août 2008, 12h05mn 02s
Objet : Re: [gst-devel] Re :  Re :  Help with RTP

gst-launch rtpbin localport=5000 ! rtph264depay ! decodebin ! xvimagesink

This pipeline is incomplete. Your Sender pipeline uses udpsink, so you have to use udpsrc on your Receiver. If you want to use rtpbin on your Receiver, you have to add the udpsrc element and connet it with the rtpbin element.

Example:


Sender:
=========
VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
RHOST=192.168.0.5

gst-launch-0.10 -v gstrtpbin name=rtpbin v4l2src ! $VCAPS \
                        ! ffmpegcolorspace \
                        ! ffenc_h263 \
                        ! video/x-h263 \
                        ! rtph263pay \
                        ! application/x-rtp \
                        ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 \
                        ! application/x-rtp \
                        ! udpsink host=$RHOST port=5000 sync=false async=false rtpbin.send_rtcp_src0 \
                        ! udpsink host=$RHOST port=5001 sync=false async=false udpsrc port=5005 \
                        ! application/x-rtcp \
                        ! rtpbin.recv_rtcp_sink_0



Receiver:
=========
VCAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263"
RHOST=192.168.0.5

gst-launch-0.10 -v gstrtpbin name=rtpbin udpsrc caps=$VCAPS port=5000 \
                        ! application/x-rtp \
                        ! rtpbin.recv_rtp_sink_0 rtpbin. \
                        ! application/x-rtp \
                        ! rtph263depay \
                        ! video/x-h263 \
                        ! decodebin \
                        ! ffmpegcolorspace \
                        ! xvimagesink sync=false async=false udpsrc port=5001 \
                        ! application/x-rtcp \
                        ! rtpbin.recv_rtcp_sink_0 rtpbin.send_rtcp_src_0 \
                        ! application/x-rtcp \
                        ! udpsink host=$RHOST port=5005 sync=false async=false



-------- Original-Nachricht --------
> Datum: Fri, 08 Aug 2008 09:09:00 +0200
> Von: "Rémi BUISSON" <remi.buisson at viotech.net>
> An: Discussion of the development of GStreamer <gstreamer-devel at lists.sourceforge.net>
> Betreff: Re: [gst-devel] Re :  Re :  Help with RTP

> 
> 
> Aurelien Grimaud wrote:
> > Darwin is a streaming server. It is fed with RTP Audio/Video streams 
> > and is able to dispatch them to rtsp clients.
> > So yes, you can stream from dvb source to Darwin, and then use an rtsp 
> > client to ask Darwin for the stream.
> >
> > To interact with Darwin, you have to write your own darwin plugin.
> > Have a look at the QTSS documentation 
> > http://www.apple.com/quicktime/streamingserver/
> >
> > A better solution would be to write a gstreamer plugin acting as a 
> > RTSP server ...
> Do you mean I have to write a plugin which is like this pipeline ?
> src -> demuxer -> streamer_transformer -> encoder -> payloader -> rtp
> 
> If this is this, that was my original idea but I have some trouble in 
> using rtpbin.
> I send a file with this :
> gst-launch filesrc location=../partage/Videos/superman_originale.avi ! 
> decodebin ! x264enc ! rtph264pay ! rtpbin localport=5001 
> destinations=192.168.1.2:5000
> 
> I receive it with this :
> gst-launch udpsrc port=5000 ! rtph264depay ! decodebin ! xvimagesink
> 
> And I don't know why I have to use the last pipeline instead of :
> gst-launch rtpbin localport=5000 ! rtph264depay ! decodebin ! xvimagesink
> 
> to make it work.
> 
> Next, I don't know why streams are not compatible because I can't read 
> the stream I send with VLC or Totem (which use gstreamer).
> 
> Rémi
> >
> > Aurelien
> >
> > ----- Message d'origine ----
> > De : Rémi BUISSON <remi.buisson at viotech.net>
> > À : Discussion of the development of GStreamer 
> > <gstreamer-devel at lists.sourceforge.net>
> > Envoyé le : Jeudi, 7 Août 2008, 17h14mn 30s
> > Objet : Re: [gst-devel] Re : Help with RTP
> >
> > Thanks.
> >
> > With this server, can I stream from dvb source for instance ?
> >
> > In fact, I am in an internship and the program I have to write must
> > exchange SIP message for the commands. So my question is: can I interact
> > easily with Darwin from my C program ? with a plugin ?
> >
> > Thanks again !
> >
> > Rémi
> >
> > Aurelien Grimaud wrote:
> > > Hi, I think you need a server here to handle the negotiations (sdp
> > > exchange).
> > > Then, you can use RTCP sent by client to detect network congestion.
> > >
> > > Darwin streaming server is a rtsp server and may be a good start to
> > > handle rtsp.
> > > It also supports easy plugin writting, in which you can alter your
> > > stream the way you want, without re-writting a rtsp stack from
> scratch.
> > >
> > > Aurelien
> > >
> > > ----- Message d'origine ----
> > > De : Rémi BUISSON <remi.buisson at viotech.net 
> > <mailto:remi.buisson at viotech.net>>
> > > À : Daiane Angolini <daiane.angolini at freescale.com 
> > <mailto:daiane.angolini at freescale.com>>
> > > Cc : Discussion of the development of GStreamer
> > > <gstreamer-devel at lists.sourceforge.net 
> > <mailto:gstreamer-devel at lists.sourceforge.net>>
> > > Envoyé le : Jeudi, 7 Août 2008, 8h37mn 59s
> > > Objet : Re: [gst-devel] Help with RTP
> > >
> > > Hi and thanks for your reply !
> > >
> > > OK I will try today and I will tell you if it works for me.
> > >
> > > My goal is to write a streaming server which can transcode, transrate,
> > > ... a stream and using a file for clients may be some kind of a
> > > do-it-yourself solution.
> > >
> > > For instance, the client send a message to the server for starting the
> > > streaming of a file. Next, imagine the network is overloaded. Then,
> the
> > > client will ask to the server to decrease the bitrate of the stream.
> > >
> > > The client may be VLC, MPlayer, ...
> > >
> > > Have you any idea to do it ?
> > >
> > > I think it's possible because the streams are standardized.
> > > Moreover, I tried to read a video streamed by flumotion over HTTP and
> it
> > > works perfectly with VLC.
> > >
> > > Thanks again.
> > >
> > > Daiane Angolini wrote:
> > > > Hello Remi!
> > > >
> > > > If you want to see streaming using VLC you can use a SDP file.
> > > >
> > > > Try this:
> > > >
> > > >
> > > > *v=0*
> > > > *o=- 37 614155991 IN IP4 127.0.0.0*
> > > > *s=QuickTime*
> > > > *t=0 0*
> > > > *a=range:npt=now-*
> > > > *m=audio 5432 RTP/AVP 0*
> > > > *c=IN IP4 10.29.241.6*
> > > > *b=AS:63*
> > > > *m=video 5434 RTP/AVP 96*
> > > > *c=IN IP4 10.29.241.6*
> > > > *a=rtpmap:96 H263-2000/90000*
> > > > *a=fmtp:96  *
> > > > *a=cliprect:0,0,144,176*
> > > > *a=framesize:96 176-144*
> > > >
> > > > In this file you have both audio and video.
> > > > But if you need a simple one, you can try this:
> > > >
> > > > *v=0*
> > > > *m=video 5434 RTP/AVP 96*
> > > > *c=IN IP4 10.29.240.186*
> > > > *a=rtpmap:96 MP4V-ES/90000  *
> > > > *a=fmtp:96
> > > >
> > > 
> >
> config=000001b002000001b59113000001000000012000c488800f50584121443f;profile-level-id=2*
> > > >
> > > > The *config* and *profile-level-id* you can get from the return
> value
> > > > of *gst-lauch -v* command. In the caps property.
> > > >
> > > > Ah!
> > > > To use VLC with SDP file use:
> > > >
> > > > vlc -vvv file.sdp
> > > >
> > > > I hope it works
> > > >
> > > >
> > > > Daiane
> > > >
> > > >
> > > >
> > > >
> > > > On Wed, 2008-08-06 at 16:21 +0200, Rémi BUISSON wrote:
> > > >> Hi everyone,
> > > >>
> > > >> I have some troubles streaming video file over the network.
> > > >>
> > > >> First of all, I tired this :
> > > >>
> > > >> server:
> > > >> gst-launch filesrc 
> > location=../partage/Videos/superman_originale.avi !
> > > >> decodebin ! x264enc ! video/x-h264 ! rtph264pay pt=96 ! udpsink
> > > >> host=192.168.1.2 port=5000 sync=false
> > > >>
> > > >> client:
> > > >> gst-launch udpsrc port=5000 ! rtph264depay  ! decodebin !
> xvimagesink
> > > >>
> > > >> It works but I can't read it with vlc : vlc udp://@:5000 : is it
> > > normal ?
> > > >>
> > > >> Now I would like to do the same thing with an RTP pipeline :
> > > >>
> > > >> server:
> > > >> gst-launch filesrc 
> > location=../partage/Videos/superman_originale.avi !
> > > >> decodebin ! x264enc ! rtph264pay ! rtpbin localport=5001
> > > >> destinations=127.0.0.1:5000
> > > >>
> > > >> client:
> > > >> gst-launch udpsrc port=5000 ! rtph264depay ! decodebin !
> > > xvimagesink -->
> > > >> this works
> > > >> gst-launch rtpbin localport=5000 ! rtph264depay ! decodebin !
> > > >> xvimagesink --> this doesn't work
> > > >>
> > > >> How can I receive my stream ? with vlc ?
> > > >>
> > > >> Thanks in advance !
> > > >>
> > > >>
> > > 
> >
> -------------------------------------------------------------------------
> > > >> This SF.Net email is sponsored by the Moblin Your Move Developer's
> > > challenge
> > > >> Build the coolest Linux based applications with Moblin SDK & win
> > > great prizes
> > > >> Grand prize is a trip for two to an Open Source event anywhere in
> > > the world
> > > >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ 
> > <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> > > <http://moblin-contest.org/redirect.php?banner_id=100&url=/ 
> > <http://moblin-contest.org/redirect.php?banner_id=100&url=/>>
> > > <http://moblin-contest.org/redirect.php?banner_id=100&url=/ 
> > <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> > > <http://moblin-contest.org/redirect.php?banner_id=100&url=/ 
> > <http://moblin-contest.org/redirect.php?banner_id=100&url=/>>>
> > > >> _______________________________________________
> > > >> gstreamer-devel mailing list
> > > >> gstreamer-devel at lists.sourceforge.net 
> > <mailto:gstreamer-devel at lists.sourceforge.net>
> > > <mailto:gstreamer-devel at lists.sourceforge.net 
> > <mailto:gstreamer-devel at lists.sourceforge.net>>
> > > <mailto:gstreamer-devel at lists.sourceforge.net 
> > <mailto:gstreamer-devel at lists.sourceforge.net>
> > > <mailto:gstreamer-devel at lists.sourceforge.net 
> > <mailto:gstreamer-devel at lists.sourceforge.net>>>
> > > >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> > > >> 
> > >
> > > 
> >
> -------------------------------------------------------------------------
> > > This SF.Net email is sponsored by the Moblin Your Move Developer's
> > > challenge
> > > Build the coolest Linux based applications with Moblin SDK & win great
> > > prizes
> > > Grand prize is a trip for two to an Open Source event anywhere in the
> > > world
> > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ 
> > <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> > > <http://moblin-contest.org/redirect.php?banner_id=100&url=/ 
> > <http://moblin-contest.org/redirect.php?banner_id=100&url=/>>
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > gstreamer-devel at lists.sourceforge.net 
> > <mailto:gstreamer-devel at lists.sourceforge.net>
> > > <mailto:gstreamer-devel at lists.sourceforge.net 
> > <mailto:gstreamer-devel at lists.sourceforge.net>>
> > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> > >
> > >
> ------------------------------------------------------------------------
> > > Envoyé avec Yahoo! Mail
> > > 
> >
> <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html>.
> > > Une boite mail plus intelligente.
> > >
> ------------------------------------------------------------------------
> > >
> > > 
> >
> -------------------------------------------------------------------------
> > > This SF.Net email is sponsored by the Moblin Your Move Developer's 
> > challenge
> > > Build the coolest Linux based applications with Moblin SDK & win 
> > great prizes
> > > Grand prize is a trip for two to an Open Source event anywhere in 
> > the world
> > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ 
> > <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> > >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > gstreamer-devel at lists.sourceforge.net 
> > <mailto:gstreamer-devel at lists.sourceforge.net>
> > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> > > 
> >
> >
> -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's 
> > challenge
> > Build the coolest Linux based applications with Moblin SDK & win great 
> > prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the 
> > world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/ 
> > <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net 
> > <mailto:gstreamer-devel at lists.sourceforge.net>
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
> > ------------------------------------------------------------------------
> > Envoyé avec Yahoo! Mail 
> >
> <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html>.
> > Une boite mail plus intelligente.
> > ------------------------------------------------------------------------
> >
> >
> -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >  
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20080808/f8de6f8a/attachment.htm>


More information about the gstreamer-devel mailing list