Skip to main content


Please be aware that much of the software linked to or mentioned on this forum is niche and therefore infrequently downloaded. Lots of anti-virus scanners and so-called malware detectors like to flag infrequently downloaded software as bad until it is either downloaded enough times, or its developer actually bothers with getting each individual release allow listed by every single AV vendor. You can do many people a great favor when encountering such a "problem" example by submitting them to your AV vendor for examination. For almost everything on this forum, it is a false positive.
Topic: OGG At 48kHz (Read 3646 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

OGG At 48kHz

I'm a little confused on how I'm converting OGG to 48000. If I take a 16/48 file and run:

ffmpeg -i input.flac -f ogg -acodec libvorbis -aq 8 output.ogg

I get a file that is 16/44.1 instead of 16/48. However if I run:

ffmpeg -i input.flac -f ogg -acodec libvorbis -ar 48000 -aq 8 output.ogg

I get a file that's 16/48. So in essence, when I use this command am I downsampling my FLAC file to 44.1k and then upsampling again to 48k or does the -ar 48000 not actually do anything since my input file is already at 48000?

Re: OGG At 48kHz

Reply #1
Default for Vorbis (OGG is the name of the container, not the codec) is to output 48khz if thats the input sample rate. (Just tested with foobar + vorbis encoder)
So the resampling must have something to do with ffmpeg...

Resamplers won't bother resampling if the input and output has the same sample rate, I think it's safe to assume ffmpeg won't do that either.

Re: OGG At 48kHz

Reply #2
Hmmm oggenc seemed to do the same thing if I didn’t specify –R 48000. I believe oggenc can’t actually read the incoming sample rate though and that’s why I needed to specify –R 48000. I don’t really want to use oggenc though because it kept erasing my replaygain data. You’re probably right though ffmpeg shouldn’t actually change it.

Re: OGG At 48kHz

Reply #3
Tags that you want to preserve should be archived before doing anything that writes tags.

The vorbiscomment command can archive comments from an ogg vorbis file.

This though is why I like the fact that lame stores the replaygain in an mpeg header instead of a tag, and opusenc seems to do the same. That data really imho doesn't belong in tags.

SimplePortal 1.0.0 RC1 © 2008-2021