Speex in ffmpeg (was RE: [Ffmpeg-devel] Speex proposed addition to ffmpeg and suggestions)

Michael Niedermayer michaelni
Fri Jul 8 10:55:31 CEST 2005


Hi

On Tuesday 28 June 2005 08:21, Dario Andrade wrote:
[...]
> avctx->bitrate: set by user when vbr mode is enabled (up to 44kbps),
> otherwise returned by speex (since it depends on global_quality).

hmm, are you saying that speex sets avctx->bitrate during encoding? why? its 
trivial to sum up the sizes of the returned packets, i dont see any need to 
missuse the bitrate field


[...]
> avctx->flags2:
> CODEC_FLAG2_AUDIO_CNG (encoder, always in vbr)
> CODEC_FLAG2_AUDIO_DTX (encoder, only if vbr or cng is enabled)
> CODEC_FLAG2_AUDIO_PREPROC_VAD (encoder),
> CODEC_FLAG2_AUDIO_PREPROC_DENOISE (encoder)
> CODEC_FLAG2_AUDIO_PREPROC_AGC (encoder)
> CODEC_FLAG2_AUDIO_ENH (decoder)
>
> avctx->level: when agc is enabled, controls the avarage peak for
> amplification (default is 8000 out of 32768).

codec independant pre and postprocessing does not belong into AVCodecContext, 
that does not mean that iam against supporting these in ffmpeg, what iam 
strongly against is supporting them over AVCodec speex_*, they should rather 
be supported in a codec independant way, maybe somewhat similar to how 
resampling is done, sadly we dont have a libavfilter yet ...


[...]
> Note 2: As previously said, with latest cvs (06/28/2005), ffmpeg.c does not
> allow one to encode speex in .wav files anymore (perhaps a bug?).
> That seems to be a recent change in cvs tree, since my whole development on
> speex.c depended on testing with ffmpeg.c utility. Anyway, the API will
> still work for encoding/decoding speex.

well unless someone fixes this bug (it doesnt really matter if its ffmpegs 
fault), the patch wont be applied


[...]

> --- Makefile	27 Jun 2005 00:55:28 -0000	1.195
> +++ Makefile	28 Jun 2005 04:48:57 -0000
> @@ -4,6 +4,17 @@
>  #
>  include ../config.mak
>  
> +X264_INC=-I../../x264
> +X264_LIB_INC=-L../../x264
> +SPEEX_INC=-I../../speex/include
> +SPEEX_LIB_INC=-L../../speex/libspeex/.libs
> +MP3LAME_INC=-I../../lame/include
> +MP3LAME_LIB_INC=-L../../lame/libmp3lame/.libs
> +OGG_INC=-I../../ogg/include
> +OGG_LIB_INC=-L../../ogg/src/.libs
> +VORBIS_INC=-I../../vorbis/include
> +VORBIS_LIB_INC=-L../../vorbis/lib/.libs
[...]
> @@ -260,11 +272,6 @@
>  EXTRALIBS += -lxvidcore
>  endif
>  
> -ifeq ($(CONFIG_X264),yes)
> -OBJS+= x264.o
> -EXTRALIBS += -lx264
> -endif
> -
>  ifeq ($(CONFIG_PP),yes)
>  ifeq ($(SHARED_PP),yes)
>  EXTRALIBS += -Llibpostproc -lpostproc$(BUILDSUF)
...

well, that mess obviously cant be applied, so if you want speex support in 
ffmpeg cvs, send a clean patch

-- 
Michael





More information about the ffmpeg-devel mailing list