How to stream audio in network using RTP
arpi d
reachtoarpi at gmail.com
Fri Jul 15 22:06:07 PDT 2011
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:
--------------------------------------
#!/bin/sh
#
# A simple RTP server
# change this to send the RTP data and RTCP to another host
DEST=127.0.0.1
AELEM=audiotestsrc
#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 :
#!/bin/sh
#
# 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_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"
AUDIO_SINK="alsasink"
# 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.
DEST=127.0.0.1
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110715/65a12dbd/attachment.html>
More information about the gstreamer-devel
mailing list