title
Products            Buy            Support Forum            Professional            About            Codec Central
 

OGG -> WAV -> MP3 ???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hoover
    • Feb 2006
    • 6

    OGG -> WAV -> MP3 ???

    Hi,

    I've lurked the forum for a while and have gotten the hint that direct transcoding from a lossy format to another lossy format isn't wise. The confusion comes when you have to do such a conversion but you don't have the original source.

    I had a few OGG file I wanted to convert to MP3, but to avoid a direct lossy to lossy conversion, I went to WAV first, then to MP3. I kept the frequency the same (in this case 48000) all through the conversion. The OGG file was a variable bit rate, and I wanted a constant bit rate, so in the end I compressed the WAV to MP3 at 96 Kbps since the variable rate in the OGG file went no higher than 90-somthing.

    The question is, was the conversion to WAV first overkill? Does dbPowerAmp internally uncompress and then recompress?
  • dbample
    dBpoweramp Enthusiast
    • Oct 2002
    • 69

    #2
    Re: OGG -> WAV -> MP3 ???

    Originally posted by Hoover
    The question is, was the conversion to WAV first overkill? Does dbPowerAmp internally uncompress and then recompress?
    As far as I know, yes it does, so your doing a WAV first would not have resulted in any improvements. You still lost sound quality due to converting from one lossy format to another.

    Comment

    • Hoover
      • Feb 2006
      • 6

      #3
      Re: OGG -> WAV -> MP3 ???

      Originally posted by dbample
      As far as I know, yes it does, so your doing a WAV first would not have resulted in any improvements. You still lost sound quality due to converting from one lossy format to another.
      I tried it both ways and found the resulting file sizes to be less than 2K difference. Convinced.

      Comment

      • neilthecellist
        dBpoweramp Guru
        • Dec 2004
        • 1288

        #4
        Re: OGG -> WAV -> MP3 ???

        File SIZE, hoover, not file QUALITY..... Read what you posted again.

        Comment

        • LtData
          dBpoweramp Guru
          • May 2004
          • 8288

          #5
          Re: OGG -> WAV -> MP3 ???

          File sizes are probably the same if you take a WAV file and make it a 160kbps mp3 or take the WAV file, make it a 16kbps mp3 and then make it a 160kbps mp3. It just means your using most of the bitrate for high-quality garbage.

          Comment

          • Hoover
            • Feb 2006
            • 6

            #6
            Re: OGG -> WAV -> MP3 ???

            Originally posted by neilthecellist
            File SIZE, hoover, not file QUALITY..... Read what you posted again.
            I wasn't explicit enough. This was my test:

            OGG -> WAV -> MP3 was about equal to OGG -> MP3
            Frequency [as Source]
            Channels [as Source]
            VBR (average 76 never went higher than 90-something) to CBR-96

            That is to say, the resultant MP3's were around 2k different in size.

            The difference in size between OGG and MP3 was much greater. The MP3 was about 1.25 times the size of the OGG.

            As far as the quality goes, it most assuredly went down, but I don't hear the difference.

            Comment

            • xoas
              dBpoweramp Guru
              • Apr 2002
              • 2662

              #7
              Re: OGG -> WAV -> MP3 ???

              I'm kind of surprised there was any difference. (Did my own comparison on a sample Ogg file and found no difference). In theory if you start with the same file in Ogg and convert straight to mp3 the results should be the same as if you converted to wave and then mp3-especially if your end files are cbr. My understanding is that in these conversions dMC first uncompresses and then re-compresses (your 2nd question, first post).

              Best wishes,
              Bill

              Comment

              • Hoover
                • Feb 2006
                • 6

                #8
                Re: OGG -> WAV -> MP3 ???

                Originally posted by xoas
                I'm kind of surprised there was any difference. (Did my own comparison on a sample Ogg file and found no difference). In theory if you start with the same file in Ogg and convert straight to mp3 the results should be the same as if you converted to wave and then mp3-especially if your end files are cbr. My understanding is that in these conversions dMC first uncompresses and then re-compresses (your 2nd question, first post).
                The OGG file was over 53 minutes in length. Given the length there was probably room for rounding errors and such. 2k difference out of 38 Megs of the MP3 wasn't too much to get upset about.

                Of course this doesn't have anything to do with the actual sound quality. Is there any sort of utility that can analyze a sound file for that? I mean it can't actually listen to the sound for us, but at least it could tell us what is there for us to hear.

                Comment

                • Deano
                  dBpoweramp Enthusiast
                  • Jan 2006
                  • 130

                  #9
                  Re: OGG -> WAV -> MP3 ???

                  If you cannot perceive the difference in sound quality from converting a lossy to another lossy format, then that's all fine and dandy really isn't it? There will be a sound quality loss in any lossy conversion, even going to .wav first won't stop it due to the fact you have already cut out all the sound data. It's can't be restored. Also the way the different encoders work with music is likely to have a different effect on the music, so going from an .ogg to .mp3 is likely to bring different anomalies in the music to the forefront.

                  If you don't notice, then that's fair enough. Keep going with this route, it's all subjective to your own hearing to make choices on how you encode your music.

                  Comment

                  • gameplaya15143
                    dBpoweramp Enthusiast
                    • Sep 2005
                    • 276

                    #10
                    Re: OGG -> WAV -> MP3 ???

                    ogg -> mp3 will retain tags, tags take up a little space
                    ogg -> wav doesnt preserve tags (not till r12 anyways)
                    so wav -> mp3 wont have tags.. which should account for the 2k or so

                    Comment

                    • learjeff
                      • May 2002
                      • 22

                      #11
                      Re: OGG -> WAV -> MP3 ???

                      Is there any sort of utility that can analyze a sound file for that [sound quality]? I mean it can't actually listen to the sound for us, but at least it could tell us what is there for us to hear.
                      The thing that makes this kind of program hard to write is that lossy compression takes advantage of psychoacoustic phenomena. What I mean is, they work based on how or ears and brains work together. Any simple objective test is likely to miss the complexity of the brain, and it's the brain that we need to please.

                      To put it simpler, the best way to test is to listen. Any other way would be an approximation.

                      But it is conceivably possible to write a program that, based on the best (latest?) theories of what "sounds good for musical audio" (that's the hard part) could compare original wave files to compressions and give them some kind of score, such that most of us would agree most of the time with big differences in scores. Audiophiles would write pages and pages of rants on how the program is completely useless, of course! And they'd have a point ... but only a little one. For example, a program like that would be useful as a guideline, to see whether your audio compression is appropriate to a given target audience, or something like that. It would be useless for measuring subtle distinctions like comparing very similar quality codecs.

                      But it would be a big job and would require gathering reams of data from a scientifically selected random sample, etc., etc. Great idea for a PhD these for someone who really just wants to stay in school.

                      And the bottom line is that most of us just need to pick a format that sounds good enough to us for music [i]we like[i]. The biggest problem there is really just finding the tradeoff between the two big facts: your ears will get worse (so if it's good enough now it'll be good enough later) and storage will get cheaper (so, as your collection grows, the cost of keeping it will go down, even if you keep increasing your bit rate every few years).

                      Pick a number that works for you. I find WMA sounds better than Lame MP3 at the same bit rate. At 64k WMA I hear obvious annoying artifacts in some songs. At 96k I hear artifacts in only a very small minority of songs. Image improves as I go over 96k, but when playing on a good system where image really matters, I use original (CD) anyway. So, I rip at 96k, for listening at work etc, and it'd be good enough for in the car too (if only it would play WMA some day). If I were ripping for "listening room", I'd have to check it out but I bet I wouldn't go below 180k. FYI, my ears aren't great. I've done a bit of audio engineering so they're "educated", but I've lost 20 or so dB above 5kHz and everything above 13k. I would not call myself an audiophile, though I do enjoy listening to music on my audiophile buddys' systems. I just wouldn't spend thousands of dollars for that privilege (I'd buy an instrument instead).

                      Get the point? This is all very subjective. Do what works for you and be happy!

                      Comment

                      • Hoover
                        • Feb 2006
                        • 6

                        #12
                        Re: OGG -> WAV -> MP3 ???

                        Originally posted by learjeff
                        Get the point? This is all very subjective. Do what works for you and be happy!
                        Point taken. I was just wondering if there was a utility that could analyze the histogram of what was left after compression. Maybe that doesn't even make sense. Coders?

                        Does it even make sense that the compressed music/sound is re-expanded before playing?

                        I found a freeware app called EncSpot which tries to rate how good an MP3 is. The MP3's I created are considered poor to the program. The OGG's it won't process so I don't know about those. But I listen to them and find them perfect. Consider, though, that when listening to them I'm running them through Winamp with Enhancer or on my Yamaha stereo with Enhanced Dolby Digital. In fact, I never listen to raw sound.

                        My high end hearing is probably shot as well. I went to college in the 70's. This was the age of the huge stereo rig / chick magnet (we thought anyway). My brother got me these things called "Super Tweaters". Supposedly they enhanced music in the 20 to 100 thousand hertz range. The instructions said while the ear can't hear anything in this range, it still make the music sound better. OK... right... but us stereo ego-maniacs said it must be better. I think all they did is produce static.

                        Running an MP3 through something like a super tweater would be pure noise. In fact in Winamp/Enhancer I've turned the treble completely off. If I listen to an internet radio station or what not it just adds really annoying crackling. I guess thats one thing you lose in this compression business but it really doesn't bother me.

                        I brought up the question of transcoding paths because I thought it was feasible that you could play an OGG such that it would render directly into MP3. Another question for coders, would there be more than one way to do this? I was thinking more in terms of the difference between doing it programmatically and say playing it with Winamp setting the output to MP3. Even then, I think I'm splitting hairs here.

                        Comment

                        • dbample
                          dBpoweramp Enthusiast
                          • Oct 2002
                          • 69

                          #13
                          Re: OGG -> WAV -> MP3 ???

                          Originally posted by Hoover
                          Does it even make sense that the compressed music/sound is re-expanded before playing?
                          Well, as much sense as when you have to uncompress a zipped text file to be able to read it in your language. In other words, it does make sense because it has to come out of an analog device as sound waves for you to hear, and your computer only knows how to make the Digital/Analog conversion if the D part is uncompressed wavelet information.

                          That information is represented digitally by numbers that refer to amplitudes (of air pressure variations from the mean pressure), so you have a stream of numbers (oscillating between positive and negative) as a function of time.

                          The numbers are 16-bit: from -32768 (max neg. variation) to 0 (zero; that is - silence), to +32767 (max. positive variation). You get 44,100 of these numbers (samples) per second per channel. This stream of numbers is then directly translated to air pressure fluctuations, i.e. variations between higher than average (positive numbers) and lower than average (negative numbers) pressure.

                          Any compressed audio file does not look like a stream of numbers wth these characteristics, so some device always has to uncompress it in order to do the D/A conversion and generate the sound waves for you to hear.

                          So it is really your ears' fault that you can't listen to mp3 directly :-)
                          Last edited by dbample; 03-02-2006, 02:12 PM.

                          Comment

                          • Hoover
                            • Feb 2006
                            • 6

                            #14
                            Re: OGG -> WAV -> MP3 ???

                            Being a professional programmer I was curious what goes on within the process.

                            Not knowing about the internals, I thought it might be feasible to convert OGG format to MP3 format by converting OGG representation to MP3 representation directly. The only way this would add to lossyness is if MP3 was incapible of representing something OGG was.

                            This might be naive, so rather than stay that way I started this thread.

                            As far as any quality finding utility would go, I have one idea on that. It could be somewhat personalized based on how high of pitch one could hear (or cared to). You could do this by offering a tone generator to find that out. I used one myself to find that I can actually hear to 16000 Hz but barely. Any measurement of quality should be able to accept that I might cut things off at even 12000 Hz and be satisfied. I don't know for sure but I expect that algorithms take into account the high band is less needed and cuts it out accordingly. Why must we have it when we can't actually hear it?

                            Comment

                            • dbample
                              dBpoweramp Enthusiast
                              • Oct 2002
                              • 69

                              #15
                              Re: OGG -> WAV -> MP3 ???

                              Originally posted by Hoover
                              I don't know for sure but I expect that algorithms take into account the high band is less needed and cuts it out accordingly. Why must we have it when we can't actually hear it?
                              Well, it is not quite as simple as that. Sometimes what you add or subtract, even if it by itself hard or impossible to hear, affects how you perceive the rest of the audio overall. There also are temporal and simultaneous masking effects so a compression software might decide to remove parts of audio that it thinks was masked by another part. And so on.

                              You could read on psychoacoustic models - just google it or search for it in wikipedia.

                              Comment

                              Working...

                              ]]>