[Live-devel] Streaming live PCM audio

Felix Radensky felix at embedded-sol.com
Tue Feb 19 01:32:50 PST 2013


Hi,

I have problems streaming live PCM audio. Audio comes either directly
from microphone (16-bit LE) or from hardware encoder (A-LAW). Sampling
frequency is 8k, mono. In both cases I receive a buffer (320 bytes for 
16-bit,
160 bytes for 8-bit) in the thread interfacing hardware and use event 
trigger
to signal my live555 thread. I've created my own class based on DeviceSource
template, that sets fFrameSize and fPresentationTime (using gettimeoofday())
and delivers the buffer to SimpleRTPSink via deliverFrame(). 16-bit data 
is also
converted to BE. I'm setting OutPacketBuffer:: maxSize to 20480.

I know that audio is correct, because if I save it to file instead of 
sending to
RTPSink, convert to WAV and stream via testWAVAudioStreamer, VLC reproduces
it correctly. I also know that my DeviceSource class is correct, because 
I use it
successfully to stream live H.264 video. However with PCM audio, VLC
correctly recognizes stream format, sampling frequency and numbers of 
channels,
but produces noisy output that cuts frequently. I get the following 
errors in VLC:

mainerror: ES_OUT_RESET_PCR called

mainwarning: PTS is out of range (-9982), dropping buffer

mainwarning: buffer too early (-55875), down-sampling

mainwarning: timing screwed, stopping resampling

mainwarning: buffer too early (-86375), down-sampling

mainwarning: resampling stopped after 256448 usec (drift: 58884)

mainwarning: buffer too early (-56084), down-sampling

mainwarning: timing screwed, stopping resampling

mainwarning: buffer way too early (-125031), clearing queue

mainwarning: buffer too late (60316), up-sampling

mainwarning: resampling stopped after 610634 usec (drift: -7483)

mainwarning: buffer too early (-54829), down-sampling

mainwarning: timing screwed, stopping resampling

mainwarning: buffer too early (-80356), down-sampling

mainwarning: buffer way too early (-133937), clearing queue

mainwarning: timing screwed, stopping resampling

mainwarning: buffer too early (-97938), down-sampling

mainwarning: buffer way too early (-150441), clearing queue

mainwarning: timing screwed, stopping resampling


I'm currently out of ideas what I'm doing wrong. Any help would be
greatly appreciated.

Thanks.

Felix.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130219/d6cf9ba3/attachment.html>


More information about the live-devel mailing list