[Live-devel] Darwin Streaming Server and Audio Problem
Keith
kgurganus at 650dialup.com
Fri Feb 18 11:09:38 PST 2005
Well, I think I have found at least one problem and I am now writing a good
.wav file. It was operator error and that I was only writing half the
samples (160 bytes) instead of (320). Some logic in my part was assuming 8
bit output.
- Keith
> -----Original Message-----
> From: live-devel-bounces at ns.live.com
> [mailto:live-devel-bounces at ns.live.com] On Behalf Of Keith
> Sent: Friday, February 18, 2005 8:02 AM
> To: 'LIVE.COM Streaming Media - development & use'
> Subject: RE: [Live-devel] Darwin Streaming Server and Audio Problem
>
>
>
> > How, specifically, are you trying to use the "LIVE.COM
> > Streaming Media"
> > software? Are you running "openRTSP", to record a RTSP/RTP
> > audio stream to
> > a file?
>
> I started with the openRTSP example. I have modified it so
> that instead of recording the streams to a file I get the
> streams in the function afterGettingFrame callback. When I
> get an audio packet data, I decode it and write it to a wav
> file. I know that it is 8000 khz, mono and 16 bit because I
> control that on the encoding side so I create the correct wav
> header. The packet is encoded with Speex Narrowband and I
> just decode each packet as it comes in and write it to the
> wav file. When I stop the encode, I update the sizes in the
> wav file. If you listen to the sample I pointed to in the
> previous email, you can see that I am creating a good .wav
> file with the decoded data I am receiving. However, the
> audio does not sound correct as is it does when I listen to
> it with the QuickTimePlayer and my Speex decoder there. One
> thing I am assumming at this time is that the packets are
> coming in order and none are dropped when I get the call in
> afterGettingFrame. Could this be my problem? I just thought
> that by listening to the audio, someone would have a clue to
> what I need to do.
>
> > Note that 16-bit samples in PCM audio RTP streams are
> > *big-endian*, by
> > definition, whereas in WAV files, they're little endian.
> If you use
> > "openRTSP" to record a PCM RTSP/RTP audio stream into a file,
> > and then just
> > add a WAV file header on the front, the audio won't be
> > correct. Instead,
> > you'll need to byte-swap the audio samples before writing
> > them to a WAV file.
>
> I am encoding the audio stream with my QT Speex component and
> broadcasting with QT to a DSS. I did try swapping the buffer
> after the decode, but all I got was garbage sound then. I
> think I have the correct endian as the audio in the sample
> wav file sounds very close to what it should be. Maybe I am
> wrong there too.
>
> - Keith
>
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live.com
> http://lists.live.com/mailman/listinfo/live-devel
>
More information about the live-devel
mailing list