VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Member
    Join Date
    Nov 2002
    Location
    Toronto
    Search Comp PM
    Hi,

    For some reason, I want to encode MPEG-2 video for DVD in Constant Quality mode. I know that CQ in general may produce out-of-spec videos if the rate happens to grow above the 9.8Mbps limit, BUT:

    I thought that rate-constrained CQ is legal for DVD. However, someone from the MainConcept team told me otherwise:

    http://forum.mainconcept.com/viewtopic.php?t=2539

    Given their authority, I guess this ought to be true. Yet, TMPGEnc offers it, and I heard of noone complaining about it. Does it mean that the DVD players accept rate-constrained CQ streams, although they're out of spec?

    But first of all, although I know a few (more) basics about MPEG-2 encoding, I cannot understand how can CQ be illegal in a context where VBR is legal.

    Your answer will be very appreciated.
    Cosmin
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    [From what I know]
    In a way both you and he are right.

    CQ and VBR are two different ways of working on difficult encoding sequences.

    True CQ doesn't have any constraints on bitrate, and so is likely to peak past the DVD video max bitrate spec.

    The way I read that interchange, they "won't work on an encoder" that wouldn't be DVD compliant, so that won't include CQ.

    TMPEGEnc, on the otherhand, doesn't specifically have a "DVD-legal" encoder, they have an "MPEG2-legal" encoder. As long as it is set within the correct DVD-spec parameters, it should output a stream that is legal and decodeable by standard decoders and therefore, usable in DVD authoring.
    Thing is, it could be that TMPEGEnc's "constrained CQ", by nature of being constrained, is really no longer worthy of being called CQ and is more of an automatic VBR. The Mainconcept engineers are being literal in their interpetation of the CQ concept, the TMPEGEnc engineers are letting the marketers provide a more "user-understandable" interaction at the expense of technical correctness.

    Either way, a valid stream is a valid stream. Once it's encoded, as long as it's valid, any decoder should blindly decode it correctly.
    Now, it's possible that TMPEGEnc's constrained CQ has something else about it besides bitrate that makes it not valid for DVDs. Maybe it's quant matrixes are "out of bounds" or something.

    Personally, I just use 2-pass VBR, with occasional recode of sections, and find that more than acceptable on any material I work with.

    Scott

    >>>>>>>
    edit: Why don't you just try it (with TMPGEnc), make a DVD and see...
    Quote Quote  
  3. Member
    Join Date
    Jan 2005
    Location
    North America
    Search Comp PM
    Originally Posted by cosmin
    Hi,

    For some reason, I want to encode MPEG-2 video for DVD in Constant Quality mode. I know that CQ in general may produce out-of-spec videos if the rate happens to grow above the 9.8Mbps limit, BUT:

    I thought that rate-constrained CQ is legal for DVD. However, someone from the MainConcept team told me otherwise:

    http://forum.mainconcept.com/viewtopic.php?t=2539

    Given their authority, I guess this ought to be true. Yet, TMPGEnc offers it, and I heard of noone complaining about it. Does it mean that the DVD players accept rate-constrained CQ streams, although they're out of spec?

    But first of all, although I know a few (more) basics about MPEG-2 encoding, I cannot understand how can CQ be illegal in a context where VBR is legal.

    Your answer will be very appreciated.
    Check out Section 3.4 in DVD Demystified
    http://www.dvddemystified.com/dvdfaq.html#3.4

    MPEG.org
    http://www.mpeg.org/MPEG/DVD/Book_B/Video.html

    BTW
    CQ == CBR
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    MPEG1 is CBR and it is NOT Constant Quality.

    CQ ~= VBR

    Scott
    Quote Quote  
  5. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    Compliant vcd mpg1 is cbr,mpg1 can be cq.
    I think,therefore i am a hamster.
    Quote Quote  
  6. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You're right, I was thinking VCD and its Constrained Parameters Bitstream requirements.

    Scott
    Quote Quote  
  7. Member
    Join Date
    Nov 2002
    Location
    Toronto
    Search Comp PM
    Originally Posted by Cornucopia
    CQ and VBR are two different ways of working on difficult encoding sequences.
    Video sequences don't have to be difficult. The difference between CQ and VBR is that, in CQ mode, the user has control over the amount of incurred distortion (which translates more or less directly to the perceived quality), whereas, in VBR mode, the user has control over the bitrate. In CQ mode, there is a fixed parameter which is directly related to the quantization scale code (which oscillates around it); in VBR mode, there is a fixed average rate (and the actual rate oscillates around it). There are other differences as well. In DVD, there is an upper bound on bitrate, but (thanks, God) there is no upper bound on distortion: this is why there are, in fact, user-specified rate bounds in VBR mode, but there are no user-specified quality bounds in CQ mode.

    Originally Posted by Cornucopia
    True CQ doesn't have any constraints on bitrate, and so is likely to peak past the DVD video max bitrate spec.
    True. My very question is not about true CQ, but about rate-constrained CQ. In rate-constrained CQ mode, the quantization scale code remains at the factor determined by the user, as long as the achieved bit rate is below the user-specified upper bound: as soon as the encoder notices that the achieved bit rate grows beyond the upper bound, the quantization scale code is correspondingly increased until the rate decreases to the constrained limit.

    Originally Posted by Cornucopia
    TMPEGEnc, on the otherhand, doesn't specifically have a "DVD-legal" encoder, they have an "MPEG2-legal" encoder. As long as it is set within the correct DVD-spec parameters, it should output a stream that is legal and decodeable by standard decoders and therefore, usable in DVD authoring.
    Thing is, it could be that TMPGEnc's "constrained CQ", by nature of being constrained, is really no longer worthy of being called CQ and is more of an automatic VBR.
    My point exactly! I mean, this is what I thought it happens, until the MainConcept team responded that CQ-encoded streams, even when they stay within the acceptable rate bounds, they are not DVD-compliant.

    Now, the video may be unsophisticated, which means that the rate stays naturally within the limits (that is, CQ in the purest sense); or, the video may be complex, which means that the rate has to be chopped so that it artificially stays within the limits. I expected both situations to yield DVD-compliant streams as long as the upper limit is equal to or smaller than 9.8Mbps. My confusion lies in the response given by the MainConcept team: none of the two situations yield DVD-compliant streams. (Or, at least, this is how I interpreted the statement "... a CQ stream even if it would stay within the max bitrate limit would still not be DVD compliant."

    Originally Posted by Cornucopia
    Either way, a valid stream is a valid stream. Once it's encoded, as long as it's valid, any decoder should blindly decode it correctly.
    A valid stream is indeed nothing but a valid stream, but that doesn't make it automatically DVD-compliant. Not if the bitrate is above 9.8Mbps; not if the VBV buffer size is greater than 224KB; not if the DC precision is 11; not if the GOP structure is greater than 18 (or 15 in PAL countries)... and so on.

    Originally Posted by Cornucopia
    Now, it's possible that TMPEGEnc's constrained CQ has something else about it besides bitrate that makes it not valid for DVDs. Maybe it's quant matrixes are "out of bounds" or something.
    If one tells me what is that "something else" (if such a "something else" really exists), then one can say that he (or she) has answered my question.

    Originally Posted by Cornucopia
    Personally, I just use 2-pass VBR, with occasional recode of sections, and find that more than acceptable on any material I work with.
    This is why I like CQ so much: I noticed that I am generally satisfied with a quantiser scale code equal to 6 (equivalent to "70" in TMPGEnc), so I leave it up to the encoder to take care of the rate and deliver me the quality that I desire, without needing to view the entire movie just to decide if I need "more" or "less" quality here and there and spend extra time recoding those sections. Besides, by its very nature, CQ always requires a single pass - and it does the best job in that single pass!

    edit: Why don't you just try it (with TMPGEnc), make a DVD and see...
    I tried, thanks for the suggestion. It works. (Both with the streams produced by TMPGEnc, and the streams produced by MainConcept.) This is why, I don't know: does my DVD player (Panasonic RV-32) accept out-of-spec MPEG-2 streams?... or... the MPEG-2 streams are compliant, and the MainConcept developers are just talking crazy!
    Cosmin
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    I think we are both agreeing but coming at it from different points. Me, I don't mind 2 passes, etc.; then I know I have complete control over quality, bitrate and thus filesize. I work on another machine/project while that's doing it's thing.

    When I said "valid" before, I mean DVD-legal. As MPEG is a "Decoder-Centric" model, if it works in the decoders then what you've done is fine.

    I think Mainconcept guys weren't saying "that stream won't work", they were saying "(unrestricted)CQ streams won't work". The parentheses was because that's their literal way of thinking--CQ to them is ALL unrestricted. If it's restricted to them, it's not CQ anymore, it's some form of VBR.

    See how I made it so that everybody's right?!!

    Scott
    Quote Quote  
  9. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    The way I see it, they all equal the same thing, as long as
    the "bitrate values" are within "those ranges" that the specs
    goverened by the santdards(s) So, for instance, if your final
    project is to be VCD, your bitrate (among other things) should
    be the following:

    * 1150 -- can be (CBR; VBR; or CQ)

    I put CBR first, because that will give you *closest* to spec
    possible. But, the Encoder will yield the closest match to
    a given end product depending on it's capabilites and features.
    Its not uncommon that other encoders (given 1150 CBR bitrate)
    will fluctuate above/below 1150 bitrate for what is considered
    the standard for VCD.
    You can use VBR or CQ, when making so called, standard VCD's,
    but bare in mind, that it's not more accurate (or in-accurate)
    than CBR 1150 bitrate for a standard VCD.
    One would conclude that CBR 1150 is the spec for standard VCD,
    and use that process to keep w/in that spec. But, those that
    have been working w/ VCD's (and other formats) will have long
    ago, concluded that:

    * Its not all that possible to keep *perfect* spec, even when the
    ... proper params are used

    * That, it all boild down to the encoder, and just how much it
    ... keeps within the spec for a given standard.

    * Then, there is the factor to include in this equation.. the
    ... DVD player. How well, will it handle a given (so called)
    ... standard spec project.. (ie, VCD; SVCD; DVD)

    As long as you maintain a good "range" (bitrate 'wise) you should
    have no trouble w/ your dvd player following the given spec.
    And, there si no reason to fluctuate above or below such specs,
    as long as you know how much your dvd player will handle before
    it chokes (or show signes thereof)

    There is nothing wrong with using CQ in any MPEG project. But,
    as was indicated in so many words, you have to know (learn) how
    to balance the bitrate control mechanism for CQ. And, likewise,
    ths CQ of things, will vary from Encoder to Encoder. So, don't
    go standardizing Encoder A to Encoder B, in this respect. In any.

    -vhelp 3269
    Quote Quote  
  10. An MPEG decoder has no idea what the picture looked like before it was encoded. As long as the bitrate doesn't exceed valid DVD rates (and otherwise not out of spec) a constrained CQ encoded MPEG file is perfectly valid for DVD.

    With a 9.8 Mbps limit, the portions of a video that require more than 9.8 Mbps will look the same in 2 pass VBR and CQ -- both will be encoded at 9.8 Mbps.
    Quote Quote  
  11. Originally Posted by vhelp
    So, for instance, if your final
    project is to be VCD, your bitrate (among other things) should
    be the following:

    * 1150 -- can be (CBR; VBR; or CQ)
    Actually, VCD only supports CBR bitrates upto 1150, VBR or CQ would be out of spec and so XVCD. Having said that, most VCD compatible DVD players would not have a problem with them.

    As to the original quaestion, I can't get the mainconcept forum page that was linked to to load for some reason, but I have great difficulty understanding how a bitrate constrained CQ may not be DVD compliant. Basically it is just a 1-pass VBR using a CQ value as the main control point but with max and min limits on bitrate.
    There are 10 kinds of people in this world. Those that understand binary...
    Quote Quote  
  12. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    Actually, IMO.. CQ is a quality mode. Geared by means of a merchanise
    algorithem based on quality.

    It does not matter what you set your min/max bitrates to, but that the
    CQ of things, will be the quality based on *those* min/max settings.

    So, in other words, if you set the following:

    Scenario A:
    * MIN: 300
    * MAX: 6000
    * Q: 40

    Scenario B:
    * MIN: 300
    * MAX: 6000
    * Q: 75

    For Scenario A..
    In short, the quality will be constricted to the 300-6000 bitrate range
    w/ a level 40 leaning towards the LEAST amount of bitrate to obtain
    maximum quality.. whatever the weight machanism is. That 40 is saying
    to spend lesser time in the area of 6000 bitrate, and more time in the
    area of 300 bitrate, again.. leading to maximize quality with the Q of 40
    for quality. Again, everything in the name of quality. Even if you
    such a low value for quality ( ie, the 40 ) it will try it's utmost,
    to obtain maximum quality. And, the final results will vary, from
    source to source. IE, VHS vs. DVD for instance.

    For Scenario B..
    In short, the quality will be constricted to the 300-6000 bitrate range
    w/ a level 75 leaning towards the highest amount of bitrate to obtain
    maximum quality.. whatever the weight machanism is. That 75 is saying
    to spend more in the area closer to -6000 ( up too 6000 ) bitrate, hence
    leading to maximize quality.

    But, just to note, several users have developed a machanism to caluclate
    at best (roughly-to-closely) obtain maximum usage out of CQ. It is
    possible, to calculate such scenarios, though roughly. And, the results
    always reflect variance, thanks in part, to source types.. IE. VHS vs. DVD
    vs. other source types, etc.

    -vhelp 3271
    Quote Quote  
  13. The Old One SatStorm's Avatar
    Join Date
    Aug 2000
    Location
    Hellas (Greece), E.U.
    Search Comp PM
    Just to add some TMPGEnc-ology here:

    CQ = Rise over the minimum tab. That means that you set min at 2000kb/s and maximum at 4000kb/s. TMPGenc start to encode at 2000kb/s and each time it "feels" that more bitrate is needed, just through it without second thoughts. This became my favorite mode AFTER I bought a DVD recorder...

    CQ_VBR: "Guess" the average mode: You set a minimum and a maximum and TMPGenc tries to guess what it's best for each frame. This mode suppose to give better encodes on scene changes and overall smaller filesizes. In practice give worst picture and bigger filesizes. I don't like it.

    There is also the so called multipass CBR mode. We can emulate it by setting 2PASS VBR but with min/average and maximum at the same value. This mode suppose to give better results the typical CBR ( better pixel alocation per frame), and for "perfectionist" is the best mode for VCD projects.

    I just add those things for those interest
    La Linea by Osvaldo Cavandoli
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!