how to output rtp stream from a wav file by gstreamer pipeline

Soho Soho123 soho123.2012 at gmail.com
Mon Aug 27 00:02:39 PDT 2012


Hi Emile,


I try to generate rtp stream, the result is the same as vlc,
linux-72ut:/home/soho/g_media_render_0.10.36/Render_lib_related/bin #
./gst-launch-0.10 -v filesrc location=/home/soho/audio_test/1_48K.wav
! wavparse ! audioconvert ! rtpL16pay ! udpsink host=192.168.1.252
port=8554
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps
= audio/x-raw-int, endianness=(int)4321, signed=(boolean)true,
width=(int)16, depth=(int)16, rate=(int)48000, channels=(int)2
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps
= audio/x-raw-int, endianness=(int)1234, channels=(int)2,
width=(int)16, depth=(int)16, signed=(boolean)true, rate=(int)48000
/GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0.GstPad:src: caps =
application/x-rtp, media=(string)audio, clock-rate=(int)48000,
encoding-name=(string)L16, encoding-params=(string)2, channels=(int)2,
payload=(int)96, ssrc=(uint)327125995, clock-base=(uint)3865385372,
seqnum-base=(uint)37935
/GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0.GstPad:sink: caps =
audio/x-raw-int, endianness=(int)4321, signed=(boolean)true,
width=(int)16, depth=(int)16, rate=(int)48000, channels=(int)2
/GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0: timestamp = 3865385372
/GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0: seqnum = 37935
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps =
application/x-rtp, media=(string)audio, clock-rate=(int)48000,
encoding-name=(string)L16, encoding-params=(string)2, channels=(int)2,
payload=(int)96, ssrc=(uint)327125995, clock-base=(uint)3865385372,
seqnum-base=(uint)37935
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 42295409494 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0: timestamp = 3867416200
/GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0: seqnum = 44281
/GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstRtpL16Pay:rtpl16pay0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstWavParse:wavparse0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...
linux-72ut:/home/soho

the payload type is 96, too.
I can see every 7ms or 8ms a packet from server.
Do you have idea about why payload type is 96?

Thanks!
Soho


2012/8/27 Emile Semmes <emile.semmes at e6group.com>:
> If your wav file is basically uncompressed audio (LPCM), if you take the src
> pad from wavparse, you can payload it as L16 audio. For example:
>
> filesrc ! wavparse ! rtpL16pay ! udpsink
>
> You'll have to play with that pipeline a bit, but it should be enough to get
> you started. Especially since you're streaming from a file, you'll need to
> make sure you throttle it so the file seems like a live source and it
> doesn't send it as fast as possible.
>
> Also, VLC probably won't know the stream unless you provide it an .sdp file
> with the media and payload defined in it.
>
> HTH,
> Emile
>
> --
> Emile Semmes
> Software Consultant
> e6 Group, LLC
> www.e6group.com
>
>
> On 8/26/2012 7:20 PM, Soho Soho123 wrote:
>>
>> Hi all,
>>
>> Does anyone have idea about :
>> using gst-launch command to output rtp stream from a wav file?
>> I just like to get rtp stream only for my rtp receiver,
>> When I try to use VLC to output a rtp stream, it will use dynamic RTP
>> payload type (96) for every rtp packet.
>> It seems does not correct type.
>> I would like to use gstreamer to generate a rtp stream for my rtp receiver
>> .
>> Any ideas ?
>> Or where I can find the example?
>>
>> Thanks!
>>
>> Best Regards,
>> Soho
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list