? re: optimizing sample rate & bit depth for converting from one format to another via export

I have some files in .mp4 format that I would like to convert into .flac

I wanted high quality so I selected 44,100 Hz & 24 bit depth with “8” (best) as the level.

But later I found Media Info & the Codec tab in VLC and see that the Hz is often/sometimes lower in the original than in what I am exporting it as from Audacity.

I also see that on one I am looking at now it shows “Bits per sample: 32”

Is that the same as bit rate?

If I export the audio in higher quality than it was originally saved as am I unnecessarily increasing file size? or worse yet, introducing possible artifacts or distortion?

Should I match the export settings to those of the original audio file?

I was trimming a small amount of silence at the beginning & end of each audio clip and was amplifying them so that I could play back without having to adjust volume levels for each one.

I was a little surprised to see that the file sizes for the .flac versions were larger than they were for the .mp4 which included video.

Hang on… I typed a lot!

That’s fine!

MP4 (and MP3 and other lossy formats) doesn’t store individual samples so there is no have a bit depth. But its dynamic range is greater than 16-bits, so it might be worthwhile going with 24-bits.

On the other hand 16-bits is generally better than human hearing so it’s generally good-enough for just about anything. At 16-bits, your files will be about 30% smaller, if that’s important. And MP4 is lossy, so your not starting with “perfection”.

Note that the “best” level is only for file-size compression. FLAC is always lossless so it doesn’t affect quality. A higher level takes more time & processing and it “works harder” to make the file as small as possible.

Bits-per-sample or “bit depth” is the amplitude resolution.

Audacity works internally at 32-bit-floating point and you can export to 32-bit floating-point WAV, but Audacity can’t make 32-bit FLACs.

I trust MediaInfo, but VLC might be converting it like Audacity does. The conversion to 32-bit floating-point (and-back) is lossless.

The sample rate (44.1kHz) is the time resolution (44,100 samples per second).
With the current version of Audacity, you can select the sample rate in the Export dialog. But if you only open one file, it should default to match the file you opened.

Increasing it will make your file proportionally larger without adding any useful information.

No. Bitrate is kilobits per second and it relates to file size. You can divide by 8 to get the file size in kilobytes per second. For compressed files, it’s an indication of the amount of compression, and with lossy compression it (usually) relates to quality, with a lower bitrate indicating lower quality.

CD audio is 44.1kHz x 16-bits x 2- channels = 1411kbps (or 176 kilobytes per second). FLAC is lossless so with FLAC, bitrate doesn’t relate to quality. It’s usually about half the size of the uncompressed data.

Note that any embedded artwork increases file size without affecting the audio bitrate.

FLAC is lossless so you’re not hurting quality unless you reduce the sample rate. Increasing the resolution (bit depth or sample rate) doesn’t hurt anything.

MP3 and MP4 are lossy compression. They work by trying to throw-away information that you can’t hear (and some other tricks). A good quality MP3 or MP4 is typically 1/5th the size of the original.

When you open a compressed file in Audacity it gets decompressed and becomes larger (of course without restoring the original lost information).

If you re-export in a lossy format you are going through another generation of lossy compression and additional damage can occur. But, MP3 (AKA M4A or AAC) is mostly immune to accumulated damage. (MP3 is worse for multiple re-compression cycles.)

1 Like

Thank you very much!

This topic was automatically closed after 30 days. New replies are no longer allowed.