On Sat, 17 Jan 2009 18:54:54 -0500, Franco Amato <[email protected]>  
wrote:
> My original audio raw samples are pcm float  -1/+1 stereo. So I have 4  
> bytes
> (2 for the L channel and 2 for the R channel TOTAL = 4 bytes).
> To encode an audio frame and use the avcodec_encode_audio ffmpeg need the
> samples to be
> signed short (2 bytes - 1 for the L channel and 1 for the R channel  
> TOTAL = 2 bytes)

A byte is 8 bits.
A short is 16 bits.
A float is 32 bits.

ffmpeg uses "16 bit sound", where each sample is a signed integer between  
-0x8000 and 0x7FFF.  There is one sample for each channel. If you have 2  
16-bit channels at 22050 hz, then you will have 88200 bytes per second for  
stereo sound.

-- 
Michael Conrad
IntelliTree Solutions llc.
513-552-6362
[email protected]
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to