title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Why doesn't constant bitrate work with Ogg?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JonP01

    • May 2008
    • 5

    Why doesn't constant bitrate work with Ogg?

    Hi,

    If I try to select the CBR option with the Ogg encoder (standard one), it does not produce a constant bitrate file at the specifications I have provided (i.e 500 kbps CBR). I instead get the same file as if I had instead encoded the Ogg file using the VBR option. If however I use a command line encoder from Ogg (oggenc2.exe), I can produce the desired constant bitrate file (505 kbps) without any problems.

    There thus seems to be an error in dbpoweramp when passing this CBR variable to the encoder.
    Last edited by JonP01; May 17, 2008, 05:53 AM.
  • LtData
    dBpoweramp Guru

    • May 2004
    • 8288

    #2
    Re: Why doesn't constant bitrate work with Ogg?

    IIRC, Ogg does not directly support CBR, it instead does a tightly-constrained VBR. dMC may not be using the exact parameters you use when you just use the .exe, turn on dMC debugging and see what command-line is passed when you use the internal encoder.

    Comment

    • JonP01

      • May 2008
      • 5

      #3
      Re: Why doesn't constant bitrate work with Ogg?

      Hi,

      Ogg does support CBR - it's just that one has to get the command syntax correct. I have run the dbpoweramp debugger and noted that dbpoweramp does not pass the correct command to the Ogg encoder.

      The command passed by dbpoweramp for 500 kbps CBR encoding is as follows:

      -managed -b="500"

      whereas the correct command for true CBR encoding is as follows:

      -m XXX -M XXX

      where XXX is the bitrate (i.e 500). The "m" is case sensitive - the first provides the minimum bitrate, the second the maximum.

      I have succesfully created perfect CBR Ogg files using the above syntax. So how do I go about officially reporting this problem so that dbpoweramp will pass the above syntax for CBR encoding?

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 44574

        #4
        Re: Why doesn't constant bitrate work with Ogg?

        The managed command line is supposed to do as m & M, it constrains the bitrate, but if you have found a better way we will use it on the next ogg update. You can edit the options.txt in \dbpoweramp\encoder\ogg vorbis (autov xxx)
        Spoon
        www.dbpoweramp.com

        Comment

        • JonP01

          • May 2008
          • 5

          #5
          Re: Why doesn't constant bitrate work with Ogg?

          Originally posted by Spoon
          You can edit the options.txt in \dbpoweramp\encoder\ogg vorbis (autov xxx)
          Hi,

          Thanks for the reply, but I have just spent an hour trying to understand what you mean by the above - to no avail. I can't find anything at all in any help files about an options.txt file. And only a couple of vague references to it in the forums.

          Comment

          • LtData
            dBpoweramp Guru

            • May 2004
            • 8288

            #6
            Re: Why doesn't constant bitrate work with Ogg?

            First, to do this, you have to have the aoTuV Ogg Vorbis encoders installed. Then pick the one that is correct for your CPU. In other words, use whichever one is the highest version of SSE3 possible. I have a short list below, click on the name of the SSE version to go to the wikipedia page. Also, you could use CPU-Z to determine more precisely what you support.
            SSE: Pentium 3, Athlon XP
            SSE2: Athlon 64, Pentium 4
            SSE3: Core 2 Duo, Core Duo, Athlon 64 X2

            For example, on my computer, I would go to E:\program files\dBpoweramp\encoder\ogg vorbis (aoTuV SSE3), as I have dMc installed to E:\program files\dBpoweramp. You will see a file in there called "encoder.txt". This file is what dMC uses to make the encoding options. If you scroll down about 1/2 way, you will see the CBR section with the --managed -b xx section where xx is the bitrate. Just change it to "-m xx -M xx", again where the xx is the bitrate. Note that you have to type the bitrate for each option, i.e. for 128kbps, put
            Constant Bit Rate: 128 Kbps
            -m 128 -M 128

            Did this help?

            Comment

            • JonP01

              • May 2008
              • 5

              #7
              Re: Why doesn't constant bitrate work with Ogg?

              Hi,

              Thanks for the help. Yes, I coud get it to work that way, however there are two problems with that. The first is that the aoTuV codec is (at least in my experiments) is restricted to 16 bit PCM input, whereas the input files I am using are 32 bit floating. The un-modified oggenc2 codec can accept any bit depth PCM file including 32 bit floating. Secondly, when I was experimenting with the aoTuV codec some weeks back, I blind ABXed the output of that codec versus the "standard" oggenc2 codec in Foobar 2000. Not only could I tell the difference 100% of the time, but the standard codec output was in my opinion closer to the original WAV file. Whatever has been done with the aoTuV codec, it makes classical music less accurate to my ears. It seems that somehow something has been done with this codec apart from optimising it for particular processor architectures.

              Anyway, I'll get round the problem for the time being by just using a simple bat file to process the WAV files. I might see if I can understand the CLI eoncder options as well, though for the time being it would probably just be simpler to do my own conversions outside of dbpoweramp.

              Comment

              • LtData
                dBpoweramp Guru

                • May 2004
                • 8288

                #8
                Re: Why doesn't constant bitrate work with Ogg?

                Actually, I think if you copy the encoder.txt from the aoTuV codec and use it with the CLI encoder and the oggenc2.exe, you should be able to use it with little modification. I do think they have different bitrate ranges, though.

                Comment

                • JonP01

                  • May 2008
                  • 5

                  #9
                  Re: Why doesn't constant bitrate work with Ogg?

                  Hi,

                  Thanks again and you are correct on both counts. I have now modified an encoder.txt file and it works using the stock standard oggenc2.exe and can create a true constant bitrate Ogg file using the CLI encoder. The encoder.txt file needs a lot of modification not only for the constant bitrate encoding but also - as you mentioned - because of the differences in the bitrates to begin with. I also feel that the terminology I have used below more correctly reflects what the Ogg codec is actually doing (i.e Quality mode versus Variable mode versus a true constant bitrate).

                  My main reason for wanting to do this in the first place is that in my own blind (ABX) listening tests, I have formed the opinion that a true constant bitrate 500 kbps Ogg file is the most faithful of all the lossy compressions to the original WAV file. It is certainly a lot more faithful to the original WAV file than the vairable bitrate Ogg options to my ears.

                  For anyone interested here is the encoder.txt file below:
                  Code:
                  [codec]
                  .ogg
                  oggenc2.exe
                  
                  [image]
                  167
                  56
                  ogg.bmp
                  yes
                  
                  [label]
                  4
                  2
                  Target:
                  
                  
                  [radio&slider]
                  4
                  24
                  292
                  1
                  40
                  0
                  Quality Mode
                  
                  13
                  Quality 0   
                  -q 0
                  Quality 0.5   
                  -q 0.5
                  Quality 1   
                  -q 1
                  Quality 1.5   
                  -q 1.5
                  Quality 2   
                  -q 2
                  Quality 2.5   
                  -q 2.5
                  Quality 3   
                  -q 3
                  Quality 3.5  
                  -q 3.5
                  Quality 4   
                  -q 4
                  Quality 4.5   
                  -q 4.5
                  Quality 5   
                  -q 5
                  Quality 5.5   
                  -q 5.5
                  Quality 6   
                  -q 6
                  Quality 6.5   
                  -q 6.5
                  Quality 7   
                  -q 7
                  Quality 7.5   
                  -q 7.5
                  Quality 8   
                  -q 8
                  Quality 8.5  
                  -q 8.5
                  Quality 9   
                  -q 9
                  Quality 9.5  
                  -q 9.5
                  Quality 10   
                  -q 10
                  [/sliderend]
                  110
                  0
                  Variable Bit Rate
                  
                  8
                  Variable Bit Rate: 64 Kbps
                  -b 64
                  Variable Bit Rate: 80 Kbps
                  -b 80
                  Variable Bit Rate: 96 Kbps
                  -b 96
                  Variable Bit Rate: 128 Kbps
                  -b 128
                  Variable Bit Rate: 144 Kbps
                  -b 144
                  Variable Bit Rate: 160 Kbps
                  -b 160
                  Variable Bit Rate: 192 Kbps
                  -b 192
                  Variable Bit Rate: 224 Kbps
                  -b 224
                  Variable Bit Rate: 256 Kbps
                  -b 256
                  Variable Bit Rate: 320 Kbps
                  -b 320
                  Variable Bit Rate: 400 Kbps
                  -b 400
                  Variable Bit Rate: 500 Kbps
                  -b 500
                  [/sliderend]
                  184
                  0
                  Constant Bit Rate
                  
                  8
                  Constant Bit Rate: 64 Kbps
                  -m 64 -M 64
                  Constant Bit Rate: 80 Kbps
                  -m 80 -M 80
                  Constant Bit Rate: 96 Kbps
                  -m 96 -M 96
                  Constant Bit Rate: 128 Kbps
                  -m 128 -M 128
                  Constant Bit Rate: 144 Kbps
                  -m 144 -M 144
                  Constant Bit Rate: 160 Kbps
                  -m 160 -M 160
                  Constant Bit Rate: 192 Kbps
                  -m 192 -M 192
                  Constant Bit Rate: 224 Kbps
                  -m 224 -M 224
                  Constant Bit Rate: 256 Kbps
                  -m 256 -M 256
                  Constant Bit Rate: 320 Kbps
                  -m 320 -M 320
                  Constant Bit Rate: 400 Kbps
                  -m 400 -M 400
                  Constant Bit Rate: 500 Kbps
                  -m 500 -M 500
                  [/sliderend]
                  
                  [label]
                  10
                  44
                  low quality (smaller file)
                  808080
                  
                  [label]
                  216
                  44
                  high quality (larger file)
                  808080
                  
                  
                  [clistring]
                   -p 1 - -o "[outfile]"
                  
                  [minfreq]
                  8000
                  
                  [maxfreq]
                  96000
                  
                  [maxchannels]
                  6
                  
                  [helpbutton]
                  283
                  0
                  Help\Codec\CLI Encoder\Help.htm
                  Last edited by LtData; May 20, 2008, 12:40 PM. Reason: added

                  Comment

                  • Launfal

                    • May 2005
                    • 12

                    #10
                    Re: Why doesn't constant bitrate work with Ogg?

                    Originally posted by JonP01

                    My main reason for wanting to do this in the first place is that in my own blind (ABX) listening tests, I have formed the opinion that a true constant bitrate 500 kbps Ogg file is the most faithful of all the lossy compressions to the original WAV file.
                    Except wavpack lossy at the same bitrate. Wavpack -b500x gives a faster encode and is a technically superior rip. You may have your reasons for using OGG in such an unusual way, and I won't argue against them. I'm just saying that your above statement isn't empirically true, and wavpack lossy has the added benefit of being a good source for transcoding.

                    YMMV,

                    Launfal

                    Comment

                    Working...

                    ]]>