Sending with rtpbin

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

Sending with rtpbin

Aaron Lindsey
I'm working on an rtp sender/receiver pair for streaming mpeg4.  I've
tested the receiver and it will correctly display an mpeg4 rtp stream from
a network camera.  I'm having problems writing a sender to stream to the
receiver.  Here's how I'm setting up the pipeline:


GstElement *source = gst_element_factory_make( "videotestsrc", "source" );
GstElement *encode = gst_element_factory_make( "ffenc_mpeg4", "encode" );
GstElement *pay = gst_element_factory_make( "rtpmp4vpay", "pay" );

GstElement *rtpbin = gst_element_factory_make( "rtpbin", "rtpbin" );
g_object_set( G_OBJECT( rtpbin ), "localport", 9002, NULL );
g_object_set( G_OBJECT( rtpbin ), "destinations", "127.0.0.1:9000", NULL);
g_object_set( G_OBJECT( rtpbin ), "default-pt", 96, NULL );

pipeline = gst_pipeline_new( "Mp4RtpSenderPipeline" );
gst_bin_add_many( GST_BIN( pipeline ), source, encode, pay, rtpbin, NULL );

if( !gst_element_link_many( source, encode, pay, rtpbin, NULL ) ) {
    g_warning( "Failed to link elements" );
}


Both sides run but I never get a video window.  I know the receiver is
getting packets because I get a bunch of debug output saying "Incoming RTP
packet, sending without jrtplib".  I'm hoping I have a glaring omission
that someone here can point out to me.  Any comments welcome.  Thanks.

Aaron












-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sending with rtpbin

Francesco Cabras

>
> GstElement *source = gst_element_factory_make( "videotestsrc", "source" );
> GstElement *encode = gst_element_factory_make( "ffenc_mpeg4", "encode" );
> GstElement *pay = gst_element_factory_make( "rtpmp4vpay", "pay" );
>
> GstElement *rtpbin = gst_element_factory_make( "rtpbin", "rtpbin" );
> g_object_set( G_OBJECT( rtpbin ), "localport", 9002, NULL );
> g_object_set( G_OBJECT( rtpbin ), "destinations", "127.0.0.1:9000", NULL);
> g_object_set( G_OBJECT( rtpbin ), "default-pt", 96, NULL );
>
> pipeline = gst_pipeline_new( "Mp4RtpSenderPipeline" );
> gst_bin_add_many( GST_BIN( pipeline ), source, encode, pay, rtpbin, NULL );
>
> if( !gst_element_link_many( source, encode, pay, rtpbin, NULL ) ) {
>     g_warning( "Failed to link elements" );
> }
>
>
> Both sides run but I never get a video window.  I know the receiver is
> getting packets because I get a bunch of debug output saying "Incoming RTP
> packet, sending without jrtplib".  I'm hoping I have a glaring omission
> that someone here can point out to me.  Any comments welcome.  Thanks.
>
> Aaron
>
>
>  
Mmm you can try to add "send-config=true" parameter to "rtpmp4vpay"
payloader.
I solved in this way.

Francesco

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sending with rtpbin

Aaron Lindsey
>>
>> Both sides run but I never get a video window.  I know the receiver is
>> getting packets because I get a bunch of debug output saying "Incoming
>> RTP
>> packet, sending without jrtplib".  I'm hoping I have a glaring omission
>> that someone here can point out to me.  Any comments welcome.  Thanks.
>>
>> Aaron
>>
>>
>>
> Mmm you can try to add "send-config=true" parameter to "rtpmp4vpay"
> payloader.
> I solved in this way.
>
> Francesco
>

That was it.  Thanks a lot for the help, Francesco.  I don't really quite
understand what's happening, though.  Can anyone explain what
configuration is being sent, or can you point me to an explanation?

Aaron


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sending with rtpbin

Aaron Lindsey
In reply to this post by Francesco Cabras
>> GstElement *source = gst_element_factory_make( "videotestsrc", "source"
>> );
>> GstElement *encode = gst_element_factory_make( "ffenc_mpeg4", "encode"
>> );
>> GstElement *pay = gst_element_factory_make( "rtpmp4vpay", "pay" );
>>
>> GstElement *rtpbin = gst_element_factory_make( "rtpbin", "rtpbin" );
>> g_object_set( G_OBJECT( rtpbin ), "localport", 9002, NULL );
>> g_object_set( G_OBJECT( rtpbin ), "destinations", "127.0.0.1:9000",
>> NULL);
>> g_object_set( G_OBJECT( rtpbin ), "default-pt", 96, NULL );
>>
>> pipeline = gst_pipeline_new( "Mp4RtpSenderPipeline" );
>> gst_bin_add_many( GST_BIN( pipeline ), source, encode, pay, rtpbin, NULL
>> );
>>
>> if( !gst_element_link_many( source, encode, pay, rtpbin, NULL ) ) {
>>     g_warning( "Failed to link elements" );
>> }

I just thought of another followup question.  Adding in send-config does
seemingly work, but I'm not specifying the clock rate anywhere here.  The
receiving side has the payload type 96 mapped to a clock rate of 90000.
Nothing has jumped out at me as the obvious way to specify the clock rate
on the sending side, which I assume is necessary.  If anyone can shed some
light on this issue it would be greatly appreciated.

Aaron

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel