How to stream audio in network using RTP

Stefano D'Aronco jagger88 at
Sat Jul 16 00:20:00 PDT 2011


you hear a sound because you are using audiotestsrc, this elements generates a sin wave, and with the property freq you can vary the frequency of the signal.

If you want to use the microphone substitute the AELEM with "autoaudiosrc" or "alsasrc" or "pulsesrc"...
I hope it works.


Date: Fri, 15 Jul 2011 22:06:07 -0700
Subject: How to stream audio in network using RTP
From: reachtoarpi at
To: gstreamer-devel at

How to stream the audio which will be recorded from microphone and will be encoded in AAC codec format and will be send using RTP packetization? 

I have used this code for server: 
# A simple RTP server 

# change this to send the RTP data and RTCP to another host 


#AAC encode from the source 
ASOURCE="$AELEM ! audioconvert" 
AENC="faac ! rtpmp4gpay " 

gst-launch -v gstrtpbin name=rtpbin \ 
$ASOURCE ! $AENC ! rtpbin.send_rtp_sink_0  \ 

rtpbin.send_rtp_src_0 ! udpsink port=5002 host=$DEST     \ 
rtpbin.send_rtcp_src_0 ! udpsink port=5003 host=$DEST sync=false async=false \ 
udpsrc port=5007 ! rtpbin.recv_rtcp_sink_0 

Client code : 

# A simple RTP receiver 


#AUDIO_CAPS="application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)MPEG4-GENERIC, encoding-params=(string)1, streamtype=(string)5, profile-level-id=(string)2, mode=(string)AAC-hbr, config=(string)1208, sizelength=(string)13, indexlength=(string)3, indexdeltalength=(string)3, ssrc=(uint)853015980, payload=(int)96, clock-base=(uint)2040203639, seqnum-base=(uint)52067" 

AUDIO_DEC="rtpmp4gdepay ! faad" 


# the destination machine to send RTCP to. This is the address of the sender and 
# is used to send back the RTCP reports of this receiver. If the data is sent 

# from another machine, change this address. 
gst-launch -v gstrtpbin name=rtpbin                            \ 
udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_0              \ 

rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK                                \ 
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0                              \ 
rtpbin.send_rtcp_src_0 ! udpsink port=5007 host=$DEST sync=false async=false 

I am not getting any error, but what I am talking in my Microphone is not streaming.I can hear only beep sound. Please reply. 
Thanks in advance.

gstreamer-devel mailing list
gstreamer-devel at 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list