[FFmpeg-devel] samplerates in flvenc ?

Craig Whitmore lennon
Sun Apr 27 12:49:49 CEST 2008


On Sun, 2008-04-27 at 12:34 +0200, Michael Niedermayer wrote:
> On Sun, Apr 27, 2008 at 09:18:25PM +1200, Craig Whitmore wrote:
> > I am using vlc which uses ffmpeg for the FLV muxing and my source is
> > samplerate 48K but the flvenc.c only allows 44.1K. 
> > 
> > Since flash 9.0.115.0? you should be able to use any samplerate so I
> > tested it and allowed in flvenc.c a 48K sample rate to be used and it
> > works fine now. My Audio no longer is low pitched (what happens when you
> > go from 48K -> 44.1K and it seems to work 100% when I stream to
> > flowplayer and other flv players.
> > 
> > should flvenc.c be changed to allow any samplerate?
> 
> Upload the spec that specifies how other samplerates are to be muxed.
> Or provide us with a url where we can download the spec.

http://www.adobe.com/licensing/developer/ to get the SDK.

All I did to get the 48K working Maybe not the correct thing to do but
for anyone who wants to try it at the moment until I or someone else can
have a read of the SDK (works on every FLV player I have tried on flash
9) is:

in flvenc.c
switch (enc->sample_rate) {
        case    48000:
            flags |=FLV_SAMPLERATE_48000HZ;
            break;

and flv.h
FLV_SAMPLERATE_22050HZ = 2 << FLV_AUDIO_SAMPLERATE_OFFSET,
FLV_SAMPLERATE_44100HZ = 3 << FLV_AUDIO_SAMPLERATE_OFFSET,
FLV_SAMPLERATE_48000HZ = 3 << FLV_AUDIO_SAMPLERATE_OFFSET,

Thanks
Craig










More information about the ffmpeg-devel mailing list