[FFmpeg-devel] [PATCH] speex in ogg muxer
Tue Jul 7 00:30:13 CEST 2009
On Sat, Jun 20, 2009 at 9:50 PM, Justin Ruggles <justin.ruggles at gmail.com>wrote:
> This patch adds speex support to the ogg muxer. It basically does the
> same thing as Ogg/FLAC, in that the 1st packet is a global header from
> extradata and the 2nd packet is vorbiscomment metadata.
> This seems to work just fine for speex-to-speex stream copy, but
> probably would not work for flv-to-speex because flv doesn't to have any
> speex extradata from what I can tell. I guess a header could be
> constructed, but that would be a separate patch to the flv demuxer.
> This patch is a precursor to libspeex encoding support, which I'll be
> sending shortly.
A couple of comments:
1) Make sure you're setting the frames-per-packet field in the Speex header
and your problems with speexdec and others should go away.
2) Let the encoder set extradata, and in your muxer if extradata is set for
CODEC_ID_SPEEX, assume it's a speex packet.
3) Although speex encoded frames don't end on a byte boundary, encoded
packets should. See the bit-stream termination code I added in my speex
4) FLV (an undocumented requirement) needs 2 speex frames per packet, and
needs the sample-rate flag in the FLV header to be set for 11025. See my
patch for that.
Hope that helps,
xu?ggle (z?' gl) v. To freely encode, decode, and experience audio and
Use Xuggle to get the power of FFmpeg in Java.
More information about the ffmpeg-devel