The Gang of Five
The forum will have some maintenance done in the next couple of months. We have also made a decision concerning AI art in the art section.


Please see this post for more details.

Audio File Formats

action9000

  • Member+
  • Cera
  • *
    • Posts: 5742
    • View Profile
Quote
And to think people think we need 96khz sampling rates.
For the sake of arguement, I am going to try and justify 96 kHz sampling rates. B)

Let's take a normal CD at a 44kHz (44 is easier to type than 44.1 so I'll just stick with 44 for the purpose of this discussion :p) sampling rate.  Physically, the Single Highest audio frequency that can be captured with a 44kHz sampling rate is 22kHz.  The reason for this is simple physics:

To create a wave, one needs to connect two or more instantaneous points in a pattern of some sort.  The simplest wave one can produce is the sinusoidal (sine) wave, which can be created using only Two points in a repeating pattern: the top of the wave and the bottom of the wave.  Draw a steady line from the top point to the bottom point to the next top point.  There are no shortcuts; 22,000 Hz is the single highest frequency we can produce with 44,000 dots per second.

As an audio guy, I don't really care about 22 kHz soundwaves because nobody can hear them anyway.  This is just an opening into my arguement.

Remember, we need to build digital audio out of instantaneous samples of the source audio signal.  Using simple logic, the more samples of the original audio we have, the more closer the new digital audio will be to the original.

at 44kHz, Any frequency above 22kHz is lost, that's a fact.  I don't care about this data for the sake of my arguement because humans can't hear that high. :p BUT also consider that any frequencies above approximately 11 kHz will also be somewhat distorted and data below 11kHz will be progressively less distorted as the frequency becomes lower.  According to physics and mathematics, sampling will deteriorate the original data.  Anyone who has taken calculus and used the trapezoid rule will understand this clearly.  Basically the idea is that one can approximate the original waveform using sampling but the subtle details will be lost in all but a 100% copy.

If you have an 11kHz wave, not necessarily a sine wave in the source, sampled at 44kHz, you have 4 samples (down, down, up up; or down up down up) to capture the details of this wave.  The first sample in a wave must be "down" and the last must be "up", for the sake of this "essay".  I could reverse it but flipping a wave upside down doesn't change the sound so I declare those as being equal.  Therefore there is a total of TWO combinations of sample patterns to produce an 11kHz wave.  This doesn't create a very accurate representation of the original wave, especially if it was largely complex.  A sine wave needs only two samples, but our world isn't made up of just sine waves.  I consider 11kHz an important frequency range to capture accurately because it is in the realm of human hearing.

With 96kHz sampling rates, we get over 8 samples (8.72 repeating, to be exact) to produce this same 11kHz wave.  This allows for the sampling process to capture more details from the source wave and produce a more consistant result.

Whether or not we can hear the difference (or whether speakers are precise enough to reproduce a difference) between 44kHz and 96kHz sampling rates is debateable but I can guarantee you'd see quite a difference if you zoomed in on the waveforms, even well below 20 kHz. B)


Manny Cav

  • Cera
  • *
    • Posts: 3354
    • View Profile
I can't resist. :p

Does bit rate for an MP3 file always guarantee audio quality? I've got two MP3s of Diana Ross's "If We Hold On Together". Here are the specs (information courtesy of Windows Media Player):

File "a" (came from landbeforetimelover's protected archive):
Length: 4:09
Bit rate: 112 Kbps
Media type: Audio
Audio codec: MPEG Audio Layer-3 112 Kbps
File size: 3.33 MB (3,493,728 bytes)

File "b" (OGG conversion not from landbeforetimelover's archive)
Length: 4:07
Bit rate: 128 Kbps
Media type: Audio
Audo codec: MPEG Audio Layer-3 128 Kbps
File size: 3.78 MB (3,965,177 bytes)

Would either file be of better audio quality than the other? I'm not always going to trust higher bit rates for better quality (it's been proven to me that file size is not always an indicator of quality, as with the YouTube video WAV sampling), plus, what if being an OGG conversion messed up the second file? But the first file has some popping in it mentioned in another thread I posted in, so I dunno. How do I know that the first file wasn't converted from OGG format?

This also brings up another issue that's apparently forgotten here: What are OGG files!? :blink:  What are their specs? Are they lossless are lossy? Are they similar to MP3, or do they share their roots more with WAV files? Is OGG to MP3 lossy?


action9000

  • Member+
  • Cera
  • *
    • Posts: 5742
    • View Profile
Quote
I'm not always going to trust higher bit rates for better quality (it's been proven to me that file size is not always an indicator of quality, as with the YouTube video WAV sampling),
Like anything in life, one needs to "consider the source". B)
The WAV recordings off YouTube will be perfectly lossless quality...with regards to the quality of the audio Found on Youtube.  99.9% of users will compress the audio in their videos to reduce the overall filesize (as we've seen, uncompressed audio is HUGE) and Youtube will further compress the audio Again, resulting in very poor-quality sound by the time the video actually makes it to Youtube.  Recording a .WAV from Youtube will result in an incredibly accurate depiction of what you hear on Youtube but it won't magically recreate the lost data and restore audio quality.

128 kbps MP3 Will sound  better than a 112kbps MP3 Assuming they are produced from equally-good-quality sources.  If the source of the 128kbps MP3 is only 64 kbps, the result will sound LESS than 64 kbps.  If the 112 kbps Mp3 is produced from a CD, it will sound like a 112 kbps MP3.  In this example the 112 kbps Mp3 is clearly higher-quality, even though it takes up less data per minute of music than the 128 kbps mp3.

If you don't know the source of the mp3 file, you are taking your chances.  I have noticed a patten though: If 192 or higher bitrates are used, typically the person who produced the mp3 used a very good source (or they wouldn't bother with such a high bitrate).  128 kbps files can be iffy because it's a sort of "default" for mp3.  If you see a 128 kbps file, the source could basically be anything.

As for OGG, I don't have a lot of experience or knowledge about it.  All I know is that Goldwave doesn't like them and it's an open-archetecture file format similar to Mp3 (they are lossy) but with a different compression algorithm.

To answer the question:
Quote
Does bit rate for an MP3 file always guarantee audio quality?
The short answer is "Yes, as long as the sources are of similar quality."


Manny Cav

  • Cera
  • *
    • Posts: 3354
    • View Profile
There seems to be a misconception here. I never recorded any WAVs off of YouTube. I downloaded the video files in FLV format and used a video converter to convert the file itself into WAV format.


action9000

  • Member+
  • Cera
  • *
    • Posts: 5742
    • View Profile
Quote
I downloaded the video files in FLV format and used a video converter to convert the file itself into WAV format.
Same thing as recording straight off youtube, as far as I know.  Unless the streamed videos have the quality reduced while the downloaded FLV files don't (I don't see why Youtube would do that, but you never know), you'll get the same result either way.

Can anyone confirm if the quality of the video/audio is different depending if you play the video off Youtube versus downloading it as an FLV?  If the file has compressed audio, you can't magically recover it.  Fact of life.  It depends on how Youtube did the compression in the case of FLV downloads.  I don't see why it would be different.


Manny Cav

  • Cera
  • *
    • Posts: 3354
    • View Profile
If I actually used something like Sound Recorder to record it off of YouTube, I'd likely end up with a 50 MB file, where if I just converted the downloaded video file itself, I'd get the same quality for only 10 MB. I've seen it a lot where two different WAV files of the same quality have differing file sizes.


action9000

  • Member+
  • Cera
  • *
    • Posts: 5742
    • View Profile
Youtube is a unique case because the audio quality is crap anyway :p

.WAV conversions from Youtube are probably using 22kHz sampling rates (or lower) and mono.  Sound Recorder probably records 44kHz and stereo.  That would account for the size difference right there.  If the sound in the video is only 22kHz mono (or 11kHz mono, whatever), using 44kHz stereo won't make it sound any better.  You'll only be wasting space.  This goes back to "consider the source". B)


Manny Cav

  • Cera
  • *
    • Posts: 3354
    • View Profile
Recording actual audio always jacks up the file size. I can record a 100 KB MIDI file with Sound Recorder and make it 70 or whatever MB. :D I've always thought that you're better off simply using file conversions than simply manually recording the audio to WAV.


action9000

  • Member+
  • Cera
  • *
    • Posts: 5742
    • View Profile
Quote
I can record a 100 KB MIDI file with Sound Recorder and make it 70 or whatever MB.
*snicker snicker*  :lol This is really an apples and oranges example but I see what you're saying. :P:

Quote
I've always thought that you're better off simply using file conversions than simply manually recording the audio to WAV.
Depends what you're recording and what you need the resulting audio file for.  If you need 100% quality, WAV -> Lossless compression are among your best options.  If you can get away with sacrificing a tiny bit, 128 kbps Mp3 may do just nicely.  It all depends on what you need in your specific circumstance.

If you're ripping a CD to your computer, the only way you will get full quality is with .WAV or lossless.  Even 320 kbps Mp3 will drop data.


action9000

  • Member+
  • Cera
  • *
    • Posts: 5742
    • View Profile
Goldwave handles audio recording much more nicely than Sound Recorder.  It records to WAV but only stores it in RAM or in temp files on your hard drive (depending on your options.  RAM is faster but you need to have a lot of RAM installed).  You can see the waveform and convert it to whatever you want (resampled .WAV, mp3, whatever you have a codec for).


Manny Cav

  • Cera
  • *
    • Posts: 3354
    • View Profile
I thought that physical audio > recorded audio. If I rip a, say, 320 Kbps MP3 from a CD that goes to 50 MB when converted to WAV, and then use Sound Recorder to record the audio from that 320 Kbps MP3 that results in a 60 MB WAV, is it really better than the original 50 MB WAV, or even the 320 Kbps MP3?


action9000

  • Member+
  • Cera
  • *
    • Posts: 5742
    • View Profile
Quote
thought that physical audio > recorded audio.
That's another topic all together :p
I could get into calculus again to explain this one but I'll try not to :lol
We could get into this if we want.  Remember that CDs don't really count as "physical audio."  They are just as digital as a .WAV file.  A lossless CD rip file on a computer should sound exactly like the CD itself

Quote
If I rip a, say, 320 Kbps MP3 from a CD that goes to 50 MB when converted to WAV, and then use Sound Recorder to record the audio from that 320 Kbps MP3 that results in a 60 MB WAV, is it really better than the original 50 MB WAV, or even the 320 Kbps MP3?

Okay let me see if I made sense of that:
CD -> 320 kbps MP3 #1-> 50MB WAV
50MB WAV -> 320 kbps MP3 #2 ->60MB WAV

In order of quality, from HIGHEST to LOWEST, here is what you will have from that:
CD-> 320kbps MP3 #1 AND the 50MB WAV -> 320kbps MP3 #2 AND 60MB WAV (these both sound LESS than 320 kbps in actual quality)

The simple answer to this is "As soon as you convert audio, the resulting file will NEVER, EVER be better than the original file.  The only way it will even be EQUAL to the original file is if lossless compression is used."

The fewer conversions, the better.  The fewer Lossy conversions, the better, specifically.  Multiple lossy conversions will quickly reduce quality.  You are right when you say a direct conversion is the quickest and easiest, not to mention the best-quality solution.

In this example, the best way to get 320 kbps quality is to simply
CD -> 320kbps mp3.  No WAV conversion.  Converting this 320kbps MP3 to a WAV will result in a file that sounds Exactly like the 320 kbps mp3 but it will be many times larger.  This process is useless for quality purposes.  You won't gain Anything.  Why?  The source is no longer the CD.  The 320 kbps MP3 is lower-quality than the CD.  You can't gain back this quality without using the CD as the soruce.  Consider that CD level of quality non-existant in the 320 kbps mp3.


Petrie.

  • Hatchling
  • *
    • Posts: 0
  • It's good to be the king!
    • View Profile
My head is spinning after reading all of this.  The short form answer:

CD -> WAV -> MP3  (yes!)
CD -> MP3 -> WAV -> MP3 (no!)

End of story.  You can't get the audio lost through compression back by converting it to a lossless file.

Now the FLV...to my ears, they're exactly the same, and to be perfectly honest, youtube's audio compression is about 22khz, mono mp3, and not sure of the encoder.  Also, I've done some mp3 encodings of audio from youtube, and even LAME 3.90.3 with the alt-preset-standard switch, I can only manage 130kbps VBR...meaning there's not much reason to use anything about 128kbps mp3, especially considering the signal is monophonic too.

And before I forget, those 128kbps and 112kbps files from Austin are probably not that good unless they're vbr.  At that bitrate, mp3 doesn't do too good in cbr mode.

Ogg (is the container) Vorbis (is the encoder) is a free lossy encoder of music.  Software support is decent if you leave WMP or itunes behind, but most portables don't play this format.


action9000

  • Member+
  • Cera
  • *
    • Posts: 5742
    • View Profile
Quote
meaning there's not much reason to use anything about 128kbps mp3, especially considering the signal is monophonic too.
Makes sense to me

112 kbps mp3, mono for a decent quality:space ratio would probably do fine.


Manny Cav

  • Cera
  • *
    • Posts: 3354
    • View Profile
Quote from: action9000,Sep 13 2007 on  03:01 PM
Okay let me see if I made sense of that:
CD -> 320 kbps MP3 #1-> 50MB WAV
50MB WAV -> 320 kbps MP3 #2 ->60MB WAV
I can tell that equation is wrong solely from the fact that there never was a second MP3. :p Here's what happened:

Master Quality CD *-> ripped 320 Kbps **10 MB MP3  -> converted 50 MB WAV -> recorded 60 MB WAV. The CD will be the best quality, and all of the others will be of lower quality. Same quality for everything else, but vastly different file sizes from that same 320 Kbps MP3. Am I right?

*To.
**File sizes are assumed and arbitrarily "winged".


action9000

  • Member+
  • Cera
  • *
    • Posts: 5742
    • View Profile
Simple answer:
The converted one is good.  50 MB of WAV is approximately 5 to 6 minutes of 44kHz stereo.  
 
The recorded one is probably useless.  I assume it's 48 kHz and that's the only difference  CDs are 44.1kHz anyway so this will have no gain whatsoever.

The 320 kbps mp3 will sound Exactly like the 50 MB .WAV and the 60 MB .WAV.


Manny Cav

  • Cera
  • *
    • Posts: 3354
    • View Profile
If one is to discount the CD (because, for listening purposes, CD owns all, except for possibly lossless WAV or WMA, but the WAVs here aren't lossless because they were either recorded or derived from lossy MP3s), then the MP3 would be the best choice for listening purposes, because it has the best quality, as well as the lowest file size. But for programs that don't accept MP3s, then the first 50 MB WAV would be the best. Same quality as the MP3, just with a larger file size. Am I also correct with my last statement?


DarkHououmon

  • Member+
  • Littlefoot
  • *
    • Posts: 7203
    • View Profile
    • http://bluedramon.deviantart.com
Petrie: I hope I don't offend you. But I'm curious. Just what is so great about FLAC? No offense, but to me it's just another media player. I don't see anything special about it that makes it stand out.


action9000

  • Member+
  • Cera
  • *
    • Posts: 5742
    • View Profile
Quote
But for programs that don't accept MP3s, then the first 50 MB WAV would be the best. Same quality as the MP3, just with a larger file size. Am I also correct with my last statement?
Yep, everything you stated in your last post is entirely correct (except I assume you meant "lossy mp3s" not "lossless mp3" because there is no such thing as "lossless mp3" :p). B)

If you don't need the mp3, I would suggest
CD -> .WAV
Totally cut out the mp3 step, then you get CD-quality audio in the .WAV so it's still completely lossless.  Goldwave can do this easily.  The filesize of the .WAV won't be any larger than converting the mp3 to .WAV so you might as well do it this way to save time and quality.


Manny Cav

  • Cera
  • *
    • Posts: 3354
    • View Profile
Quote from: action9000,Sep 13 2007 on  04:13 PM
(except I assume you meant "lossy mp3s" not "lossless mp3" because there is no such thing as "lossless mp3" :p). B)
I edited that back before you even posted. :P:

I find ripping the original WAV from the CD a tad pointless, because the program that doesn't accept MP3, only WAVs (which is 3D Movie Maker, by the way), super compresses the WAVs to a lower file size than even MP3, or at least equaling it. There's a third party program that bypasses the super compression, but honestly, who'd, in their right mind, want to load several 50 MB WAVs into a movie file? :DD It wouldn't be pretty, that's for sure.