Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: OGG At 48kHz (Read 4893 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.