[Live-devel] H264 + ulaw streaming with audio vibration

Ross Finlayson finlayson at live555.com
Thu Dec 17 03:26:26 PST 2015


> Each time, we will put 1024 bytes to ulaw encode and it produce 512 bytes ulaw data out.
> Then we copy 512 bytes to fTo and put 512 to fFrameSize.
> For fDurationInMicroseconds, we set 16000.
> I think it should be right. But I don’t know why 16K, stereo audio is not working.

Note that, for stereo, each sample is double the size of an audio sample. Therefore, 1024 bytes of mono PCM is 512 samples, but 1024 bytes of stereo PCM is 256 samples.  Therefore, you should set
	fDurationInMicroseconds = 512*1000000/<sampling-frequency>
for mono, and
	fDurationInMicroseconds = 256*1000000/<sampling-frequency>
for stereo.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list