Multiples audio channels throught RTSP
Weavel
weavel37 at yahoo.fr
Thu Jul 25 01:20:45 PDT 2013
*Hi people !*
I’m stuck since several days and can’t find the answers so i’ll ask the
experts :).
I’m trying to encode multiples audio channels and one video into one stream
through rtp and then decode this one flow into multiples mono audio with the
video. I’m using gstreamer-0.10. For the tests i did put audiotestsrc
instead of audio inputs for the moments.
For that, i first try with jack.
*Encoder’s side :
Pipeline is *
“decklinksrc mode=10 connection=0 audio-input=1 subdevice=0 ! queue !
ffmpegcolorspace ! videorate ! videoscale !
video/x-raw-yuv,framerate=25/1,width=1920 ! x264enc interlaced=false
! rtph264pay ! audiotestsrc volume=1 freq=2000 ! queue !
audio/x-raw-int,width=(int)16,depth=(int)16,channels=(int)2,rate=(int)48000
! audioconvert ! audiorate ! audioresample ! faac bitrate=128000 !
rtpmp4apay \ jackaudiosink server=stream”
*And i launch jackd*
jackd -R -c s -s -m -v -n stream -dnet -a xx.xx.xx.xx -p xxxx
*Decoder’s side :*
“rtspsrc protocols=GST_RTSP_LOWER_TRANS_TCP latency=1000 timeout=1
buffer-mode=1 location=rtsp://xx.xx.xx.xx:xxxx name=src ! queue ! gstrtpbin
latency=250 name=srcbin ! queue ! rtph264depay ! ffdec_h264 ! identity !
interlace top-field-first=true field-pattern=1 ! videoscale add-border=true
! videorate ! colorspace ! video/x-raw-yuv,framerate=25/1,
width=1920,format=(fourcc)UYVY ! decklinksink name=sink mode=10 src. ! queue
! rtpmp4adepay ! aacparse ! faad ! audioconvert ! audioresample ! sink.
sync=true \ jackaudiosrc server=stream ! queue ! audioconvert !
audioresample ! level ! fakesink sync=false sink.”
*And i launch jack_load netmanager*
jack_load netmanager -i “xx.xx.xx.xx -a xx.xx.xx.xx -p xxxx” -s stream -w
The connection establish between the two machines looks pretty good, it
shows :
**************** Network parameters ****************
Name : stream
Protocol revision : 1
MTU : 1500
Master name : decoder
Slave name : encoder
ID : 1
Transport Sync : yes
Send channels (audio - midi) : 2 - 0
Return channels (audio - midi) : 2 - 0
Sample rate : 48000 frames per second
Period size : 1024 frames per period
Frames per packet : 256
Packet per period : 4
Bitdepth : float
Slave mode : async
Network mode : slow
****************************************************
I don’t have sound at the output of the decoder. The video looks good. The
“level” element show me that i have around -86 dB on my audio channel. So i
don’t know if it’s my jack or just my pipeline which doesn’t work around.
And also, i can't launch another jackd -dalsa on the decoder because it says
that the hardware hw:0 is already in use.
*And then i tried with interleave & deinterleave :
Encoder’s side :*
“decklinksrc mode=10 connection=0 audio-input=1 subdevice=0 ! queue !
ffmpegcolorspace ! videorate ! videoscale !
video/x-raw-yuv,framerate=25/1,width=1920 ! x264enc interlaced=false !
interleave name=i ! rtph264pay ! audiorate !
audio/x-raw-int,width=(int)16,depth=(int)16,channels=(int)2,rate=(int)48000
! audioconvert ! audioresample ! queue ! faac bitrate=128000 ! rtpmp4apay
pt=97 \ audiotestsrc volume=1 freq=200 ! audioconvert ! queue ! i. \
audiotestsrc volume=1 freq=2000 ! audioconvert ! queue ! i.”;
*Decoder’s side :*
“rtspsrc protocols=GST_RTSP_LOWER_TRANS_TCP latency=1000 timeout=1
buffer-mode=1 location=rtsp://xx.xx.xx.xx:xxxx name=src ! queue ! gstrtpbin
latency=250 name=srcbin ! queue ! rtph264depay ! ffdec_h264 ! identity !
interlace top-field-first=true field-pattern=1 ! videoscale add-border=true
! videorate ! colorspace ! video/x-raw-yuv,framerate=25/1,
width=1920,format=(fourcc)UYVY ! decklinksink name=sink mode=10 src. ! queue
! rtpmp4adepay ! aacparse ! faad ! deinterleave ! audioconvert !
audioresample ! sink. sync=true”
*But then i got on the encoder :*
“Intern data flow error … and … streaming task paused, reason not-negotiated
(-4)”
I saw that some had the same problem but with vorbis, i assume that decklink
do the same and don’t accept the default caps of interleaved elements.
I also tried “adder” element. It works well on the encoder but it seems that
on the decoder’s side it’s more complicated to split those audios channels.
I apologize in advance for my speeking and thanks you for any advise !
Weavel
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Multiples-audio-channels-throught-RTSP-tp4661243.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list