Audio Encoding

Anything About Anything...
Post Reply
User avatar
breeze
Average Program
Posts: 79
Joined: Sat May 26, 2012 4:33 pm
Location: http://armagetronad.net

Audio Encoding

Post by breeze »

Hey, tronners! I have a situation where I need to redo my entire music library. If anyone out there is an audio expert or knows a thing or two about audio encoding, I have a few questions as I go through this daunting process. I should preface my questions by saying that I am mostly concerned with getting the best possible audio quality regardless of size. Also, I am looking to use VBR, unless convinced otherwise, as I have read it's better with smaller files as a side benefit. On a side note I know 128kbps isn't terribly good anyway, so don't chide me. I am using the LAME mp3 encoder to do the work. Let me run a few scenarios I have.

Example 1: I have a 128kbps mp3 file, which I think is CBR. I would like to run it through the encoder to encode it in VBR. (Plus, I like to edit the ID3 tags at the same time.) Would re-encoding it diminish the quality? I plan to use VBR, should I set the minimum bit rate so it doesn't try to take it higher than 128kbps, thereby attempting to invent information that's not there and presumably decreasing the quality? Or is the encoder smart enough to not do that?

Example 2: I have a FLAC file. I would like to encode it using VBR. Should I set a minimum (or maximum) bit rate when encoding? I don't want to diminish the quality if I don't select a minimum bit rate. I might be underestimating the intelligence of the encoder, but that's why I'm asking!

Example 3: I have a 320kbps mp3 that I've ripped from a CD (I'm assuming it ripped with CBR). I have noticed on a test run if I encode it in VBR the bit rate for the file is something like 290kbps. Did it just go lower because it's calculating the average bit rate across the entire song? I could certainly keep them CBR if the quality will be better, but again I'm not sure if re-encoding diminishes the quality and I run them though the encoder to edit the ID3 tags as well. Yes, I know programs are available to do just that, but if re-encoding doesn't harm the quality then I might as well for convenience sake.

Thank you anyone/everyone for your time! :star: :star: :star:
User avatar
Ratchet
Match Winner
Posts: 779
Joined: Sat Mar 15, 2008 5:55 am

Re: Audio Encoding

Post by Ratchet »

I'm sure Sinewav would be your best bet. You can probably get more real-time assistance (provided he has the time) by joining the #armagetron IRC channel and messaging him there.
Image
"Dream as if you'll live forever,
Live as if you'll die today." -James Dean
Hoax
Shutout Match Winner
Posts: 892
Joined: Sun Jun 18, 2006 5:24 pm
Location: UK

Re: Audio Encoding

Post by Hoax »

A bit pedantic but if you don't care about file size why is vbr even being mentioned :)
User avatar
breeze
Average Program
Posts: 79
Joined: Sat May 26, 2012 4:33 pm
Location: http://armagetronad.net

Re: Audio Encoding

Post by breeze »

Haha yes, to say it more clearly, I mean all other things being equal, I would rather have smaller sized files than larger ones. However, there is so much mixed information on the quality of VBR vs CBR, I'm not sure what's what. One would think that 320kbps CBR would be the best possible quality, but then some people say VBR sounds better even at a lower bit rate. I would like someone's opinion who knows about this because I don't want to get through all of this and then find out sometime later that I could have had better quality and dwell on that or start over.
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Audio Encoding

Post by sinewav »

This is a complicated topic breeze. If size is not an issue then don't use compression at all. Just keep your files as WAV or AIFF. I need to know more about how you are listening to music to give you better advice.

From an archival standpoint I would get a pair of terabyte+ drives and dedicate them to audio (one for a backup of course) and rip all your music to them, uncompressed. Then, when you want to listen to an album on a media device with limited space and support for file formats, rip a copy of that album in a format for that device. This allows you preserve your originals while navigating the changing landscape of technology.

As far as the CBR vs VBR argument goes, I think it's a stupid argument. One mode is not inherently better than the other, it's just a matter of application. This is a file size versus quality issue, and that issue is now dead because storage space and bandwidth are not precious like they were in the 90s when this technology was developed.

I rip my music to mp3 because of the wide support for the format. I usually use 192kpbs CBR since I can't tell the difference in quality at higher values (I'm old and my ears are shot). This brings my to a final point: use what sounds best to you. However, some music I own sounds bad with any level of lossy compression, regardless of bitrate.

There are lossless compression codecs (like FLAC) but support for them is sketchy.
breeze wrote:Example 1: I have a 128kbps mp3 file, which I think is CBR. I would like to run it through the encoder to encode it in VBR. (Plus, I like to edit the ID3 tags at the same time.) Would re-encoding it diminish the quality? I plan to use VBR, should I set the minimum bit rate so it doesn't try to take it higher than 128kbps, thereby attempting to invent information that's not there and presumably decreasing the quality? Or is the encoder smart enough to not do that?
You can't re-encode a compressed file to a higher quality. Re-encoding at all will likely damage the quality (severely even). If you take a 128kbps CBR file and re-encode to VBR with a 128kbps minimum you have exactly the same file size, but possibly worse sounding. Just leave the file as it is (or get an original copy and start over).
breeze wrote:Example 2: I have a FLAC file. I would like to encode it using VBR. Should I set a minimum (or maximum) bit rate when encoding? I don't want to diminish the quality if I don't select a minimum bit rate. I might be underestimating the intelligence of the encoder, but that's why I'm asking!
Going from FLAC to mp3 will diminish the quality no matter what the settings. FLAC is a lossless format and mp3 is a lossy format. But really, the quality is determined by your ears. Try encoding the file with different minimums until you hear a difference, then set the minimum higher than that.
breeze wrote:Example 3: I have a 320kbps mp3 that I've ripped from a CD (I'm assuming it ripped with CBR). I have noticed on a test run if I encode it in VBR the bit rate for the file is something like 290kbps. Did it just go lower because it's calculating the average bit rate across the entire song? I could certainly keep them CBR if the quality will be better, but again I'm not sure if re-encoding diminishes the quality and I run them though the encoder to edit the ID3 tags as well. Yes, I know programs are available to do just that, but if re-encoding doesn't harm the quality then I might as well for convenience sake.
What you are seeing is an average. The "variable" bitrate changes many times a second. You wouldn't be able to read it in real time. Encoding a CBR file to VBR reduces the quality if the minimum VBR value is lower than the CBR value. Example: if a 160kpbs CBR file is encoded with a VBR of 128/320 min/max you are throwing information out without gaining anything. If you set the minimum VBR to 160 on the same file there is no reduction in file size. You gain nothing. So basically, don't do it.
breeze wrote:Thank you anyone/everyone for your time! :star: :star: :star:
No problem!
User avatar
breeze
Average Program
Posts: 79
Joined: Sat May 26, 2012 4:33 pm
Location: http://armagetronad.net

Re: Audio Encoding

Post by breeze »

Sinewav, I was looking forward to your input, and thank you for your detailed response. I was unaware of the lack of extent, the CBR vs. VBR argument goes. If I understand you correctly, VBR basically exists to reduce file size and won't have a noticeable impact on quality.

I primarily listen to music on my phone. So, the FLAC files I'll need to encode. I suppose I'll do 320kbps CBR for them, to keep the quality. I'll definitely save the FLACs for backup, especially since some of my most precious albums I have in FLAC format.

The other files that are already in mp3 format, I'll resist the urge to re-encode them for quality's sake and grab a program to edit the ID3 tags. So, the 320kbps and 128kbps mp3s will remain the same.

Thanks again.
User avatar
ppotter
Match Winner
Posts: 451
Joined: Sun Sep 28, 2008 12:45 am

Re: Audio Encoding

Post by ppotter »

If you use Android there are plenty of apps that play FLAC files. Pretty sure there will be some for Windows phone too, it's only Apple I'm doubtful of.
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Audio Encoding

Post by sinewav »

breeze wrote:If I understand you correctly, VBR basically exists to reduce file size and won't have a noticeable impact on quality.
All compressed formats exist to reduce file size. CBR and VBR are two different methods at reducing size. Depending on the settings, VBR might get you a smaller size than the same file encoded with CBR, but with a further impact on quality. I actually never use VBR except in rare cases. Like I said, storage and bandwidth are problems from the 90s and there is very little reason to use compressed audio these days except for on media players with small SD cards/drives.
ppotter wrote:If you use Android there are plenty of apps that play FLAC files. Pretty sure there will be some for Windows phone too, it's only Apple I'm doubtful of.
To add to this, if you are concerned with audio quality then the digital-to-analog converters in smartphones are not something you want to use for playing music. They are all pretty horrible, but Apple's is worse from my experience. Any benefit gained from using an uncompressed file over a high bitrate compressed file would likely be lost at the d/a converter.

Again, the best choice to make is decided by your own ears.
Hoax
Shutout Match Winner
Posts: 892
Joined: Sun Jun 18, 2006 5:24 pm
Location: UK

Re: Audio Encoding

Post by Hoax »

If anything the consensus nowadays is with flac being a lot more prevalent, 320 cbr is obsolete in a way. V0 vbr sounds the same and the smaller file size is good, especially if it's for something mobile and you have a backup anyway. That being said I would leave 320 cbr as it is if I didn't have lossless of it. I guess it does just all come down to space, 320cbr doesn't seem worth it anymore though if you have a choice
The last time I was editing ID3 tags, mp3tag was a good program to use
User avatar
Ratchet
Match Winner
Posts: 779
Joined: Sat Mar 15, 2008 5:55 am

Re: Audio Encoding

Post by Ratchet »

TagScanner is a great program for the PC for editing ID3 tags.

It allows you to select your entire music library and automatically tag things by the file name using parameters.

For example: my entire music library is named in the format of "Daughtry - Superman.mp3"
When I tag my new music, I enter into the box %artist% - %title% and it automatically detects that the artist is Daughtry and the title of the song is Superman. Likewise, it does so for every song of mine in a matter of seconds.

I'm sure many other programs have similar functionality, I just wanted to point out that this app is great and you should check it out if you ever need to tag songs :)
Image
"Dream as if you'll live forever,
Live as if you'll die today." -James Dean
User avatar
Phytotron
Formerly Oscilloscope
Posts: 5041
Joined: Thu Jun 09, 2005 10:06 pm
Location: A site or situation, especially considered in regard to its surroundings.
Contact:

Re: Audio Encoding

Post by Phytotron »

sinewav wrote:From an archival standpoint I would get a pair of terabyte+ drives and dedicate them to audio (one for a backup of course) and rip all your music to them, uncompressed. Then, when you want to listen to an album on a media device with limited space and support for file formats, rip a copy of that album in a format for that device. This allows you preserve your originals while navigating the changing landscape of technology.
Exactly what I do and recommend as well, where digital media is concerned—and that goes for other types as well, like images and video.

Just remember: You can't add back in data that's not there. There is no "zoom and enhance!"
Post Reply