lma at spaceapplications.com
Wed Feb 12 07:33:23 PST 2014
I wish to stream audio over the network using the flac codec. I use the following command :
gst-launch -v autoaudiosrc ! flacenc ! tcpserversink port=9001
to receive I use the command :
gst-launch -v tcpclientsrc port=9001 ! flacdec ! audioconvert ! autoaudiosink
I get about 1 second delay between sending and receiving the audio.
If instead I transmit using :
gst-launch -v autoaudiosrc ! audio/x-raw-int,channels=1,depth=16,width=16,rate=44000 ! flacenc ! tcpserversink port=9001
the delay seems to go up to about 2 seconds.
I wish to sample my audio at 16KHz instead of 44KHz, so if I transmit using :
gst-launch -v autoaudiosrc ! audio/x-raw-int,channels=1,depth=16,width=16,rate=16000 ! flacenc ! tcpserversink port=9001
I get an approx 4 second delay. Why is this ?
I'm guessing it's because flacenc needs a certain number of samples before it can compress a block, it therefore has to wait longer with a lower sample rate ?
Is there any way that I can reduce the sample rate whilst keeping a low delay ?
More information about the gstreamer-devel