[FFmpeg-devel] [PATCH] riff: make the G723.1 in wav outputcompatible with WMP/msacm codec

Piotr Bandurski ami_stuff at o2.pl
Tue Jul 24 21:14:50 CEST 2012


Hi,

> > + } else if (enc->codec_id == CODEC_ID_G723_1) {
> > + bytespersec = 800;
> > } else {
> > bytespersec = enc->bit_rate / 8;
> > }
> 
> g723.1 supports multiple bitrates, is this correct for all ?

MS codec have two modes for encoding - 6400 bit/s and 5333 bit/s.

It looks like for 6400 mode blkalign is set to 24, bytespersec is set to 800,
for 5333 mode - blkalign is set to 20, bytespersec is set to 666, but the output
files have the same size and are identical if we do not count these two different
values in the wav header.

> > + } else if (enc->codec_id == CODEC_ID_G723_1) {
> > + hdrsize += 20;
> > + bytestream_put_le32(&riff_extradata, 0x9ace0002); /* extradata needed for msacm g723.1 codec */
> > + bytestream_put_le32(&riff_extradata, 0xaea2f732);
> > + bytestream_put_le16(&riff_extradata, 0xacde);
> 
> i assume noone has an idea what these are ?
> I could find a spec for g723 in wav but not g723.1 ...

I found only this:

http://en.verysource.com/code/1526388_1/pwavfile.cxx.html

Regards



More information about the ffmpeg-devel mailing list