Variable bitrate at different parts of a footage...

Discussion in 'Amateur Video Production' started by Leonid Makarovsky, May 15, 2004.

  1. Simple dumb question.

    I have a footage in form of Huffyuv AVI file. It's 80 minute long. I want to
    fit it on a DVD with uncompressed sound. It wouldn't fit at maximum bitrate
    of 8250kbs for video. Obviously not. I tried to compress the sound with
    toolame to .mp2 at 384kbs, but wasn't too happy with the sound. I also wasn't
    too happy with the video when I dropped an average bitrate to 6000kbs. Then
    something striked me. Some parts of the footage can be encoded with like 4000
    kbs and I can increase the more important parts. So the question is:
    Is there any way to tell TMPGEnc to encode at one bitrate from time point A
    to time point B and at the other bit rate from time point B to time point C.

    Another thing. I have the stereo WAV file. I was thinking if I could maybe
    compress it to Dolby Digital 2.0 and use that instead of MPEG-2 compression.
    How do I do that? And will TMPGenc DVD Author take Dolby Digital 2.0?

    Thanks.

    --Leonid
     
    Leonid Makarovsky, May 15, 2004
    #1
    1. Advertisements

  2. Leonid Makarovsky

    Nomen Nescio Guest

    C.

    I suppose you could use something like VirtualDUB to chop the AVI up into
    pieces that correspond to the various time points. Then encode the
    various pieces at the various bitrates and then MERGE the pieces.

    80 minutes of footage can be encoded at approximately 7300Kb/s MPEG-2
    video and 192Kb/s Dolby Digital (AC-3) audio and still fit on a 4.38GB
    DVD-R. There's not a whole lot of footage that doesn't encode well at
    such a high bitrate. Going up to 8000Kb/s, you run the risk of some
    players not being able to read DVD-R fast enough (not a problem with
    replicated discs).
    Get a Dolby Digital encoder, such as Sonic Foundry's SoftEncode, Surcode's
    Dolby Digital Encoders, Sony's Vegas+DVD, etc.
    I suppose since it has an (optional) Dolby Digital encoder plug-in, that
    it should.
     
    Nomen Nescio, May 15, 2004
    #2
    1. Advertisements

  3. Leonid Makarovsky

    Bariloche Guest

    Tmpgenc has Manual VBR mode, and "Force picture type setting" (vs
    "Detect Scene Change") which I understand allows you to use different
    bitrates for different scenes. But I have never used it, so don't ask
    me. And chopping the AVI looks a simpler way to accomplish the same.
     
    Bariloche, May 15, 2004
    #3
  4. : I suppose you could use something like VirtualDUB to chop the AVI up into
    : pieces that correspond to the various time points. Then encode the
    : various pieces at the various bitrates and then MERGE the pieces.

    Yeah, that was my initial idea, but I thought there was a way to simplify the
    process. Thanks though.

    : 80 minutes of footage can be encoded at approximately 7300Kb/s MPEG-2
    : video and 192Kb/s Dolby Digital (AC-3) audio and still fit on a 4.38GB
    : DVD-R. There's not a whole lot of footage that doesn't encode well at
    : such a high bitrate.

    My footage is taken from LaserDisc - so the quality is really really good.

    : Going up to 8000Kb/s, you run the risk of some
    : players not being able to read DVD-R fast enough (not a problem with
    : replicated discs).

    What do you mean replicated disc?

    : Get a Dolby Digital encoder, such as Sonic Foundry's SoftEncode, Surcode's
    : Dolby Digital Encoders, Sony's Vegas+DVD, etc.

    In general does Dolby Digital encoder give a better quality than MPEG-2 sound
    encoded with tooLame?

    :>And will TMPGenc DVD Author take Dolby Digital 2.0?

    : I suppose since it has an (optional) Dolby Digital encoder plug-in, that
    : it should.

    I didn't see optional DD encoder plug-in in TMPGenc. Should I download that
    plug-in?

    --Leonid
     
    Leonid Makarovsky, May 15, 2004
    #4
  5. : Tmpgenc has Manual VBR mode, and "Force picture type setting" (vs
    : "Detect Scene Change") which I understand allows you to use different
    : bitrates for different scenes. But I have never used it, so don't ask

    "Force picture type setting" allows you to insert I-frames at specific points,
    but doesn't allow you to choose a bit rate.

    : me. And chopping the AVI looks a simpler way to accomplish the same.

    Yeah, I guess that's the only way to go. I'm also a bit afraid that when
    I put pieces back together there might be some sound clicks.

    --Leonid
     
    Leonid Makarovsky, May 15, 2004
    #5
  6. Leonid Makarovsky

    Morrmar Guest

    of 8250kbs for video. Obviously not. I tried to compress the sound
    with
    wasn't

    That's very interesting. [email protected] _should_ be indistinguishable from the
    original wav file, even 224. What are you hearing that it making you
    unhappy. Sibilance, flanging... how does it sound different?
     
    Morrmar, May 15, 2004
    #6
  7. Leonid Makarovsky

    Nomen Nescio Guest

    If the quality is "really good", then it should encode well using the
    above parameters unless your MPEG encoder is garbage. TMPGEnc, while dirt
    slow, produces excellent quality.

    I've captured several laserdiscs via my Canopus ADVC-100 and converted
    them to DVD-Video with good results.

    I generally capture the disc and edit out the unnecessary parts. I then
    determine the length of the edited footage and pump it into a bitrate
    calculator such as Bearson's BitRate Calculator.

    Let's say I have 95 minutes of source material. I enter 1 hr and 35
    minutes as the length. I then enter the final filesize (~4420MB for a
    4.38GB DVD-R) and the audio bitrate as 192Kb/s (standard 2-channel Dolby
    Digital bitrate). That allows me to encode the video at around 6160Kb/s.
    I will use something like Canopus' ProCoder at 2-pass VBR with the
    average bitrate being the above with the maximum bitrate at 8Mb/s (the
    possible 8Mb/s "spikes" described below haven't caused me problems). If
    the footage is so long that the bitrate gets reduced to an uncomfortablty
    low level (<3Mb/s), then I will encode to half-D1 or just split in into
    multiple discs.
    <http://www.mediacopy.co.uk/cd_cdvcdr.htm>
    <http://www.absolute-disc.com/cd-duplication.html>
    <http://www.proactionmedia.com/replication_basics.htm>

    "Replicated" discs should be able to be encoded to the maximum allowable
    bitrate per the DVD-Video standard. "Duplicated" discs may have problems
    playing in standalone players when the overall bitrate 7-8+Mb/s.
    At the same bitrate, I think unquestionably it does.
    I would. It's probably the cheapest legitimate way for you to get a Dolby
    Digital (AC-3) encoder.
     
    Nomen Nescio, May 15, 2004
    #7
  8. Leonid Makarovsky

    Bariloche Guest

    This is what the help hint of the program say about Manual VBR (MVBR):
    "This is fixed bitrate which enable to set bitrate for each scene.
    Bitrate setting is done at force picture setting." But as I have never
    used that mode, that's all I know about it.
    1) Export the audio as Wav.
    2) Encode the Wav as Ac3 at 192 kbps (224 or 256 kbps if you really
    care for it).
    2) Cut the video in pieces, and encode each of them.
    3) Join the encoded video pieces.
    4) Mux the Ac3 audio.
     
    Bariloche, May 15, 2004
    #8
  9. : That's very interesting. [email protected] _should_ be indistinguishable from the
    : original wav file, even 224. What are you hearing that it making you
    : unhappy. Sibilance, flanging... how does it sound different?

    I do hear a tiny difference. A little sort of distortion. Tiny, but still
    noticeable if I listen carefully. I wouldn't care if the source was VHS. But
    the source was an LD and I was capturing the sound using S/PDIF out from LD
    into my soundcard - so the sound has no loss and I'd like to keep it that way.

    --Leonid
     
    Leonid Makarovsky, May 15, 2004
    #9
  10. : 1) Export the audio as Wav.
    : 2) Encode the Wav as Ac3 at 192 kbps (224 or 256 kbps if you really
    : care for it).
    : 2) Cut the video in pieces, and encode each of them.
    : 3) Join the encoded video pieces.
    : 4) Mux the Ac3 audio.

    Actually you gave me a good idea. I thought cutting audio and video and then
    join them all in the authoring program. But I guess I can just cut video in
    pieces and join them in TMPGEnc. Thanks.

    --Leonid
     
    Leonid Makarovsky, May 15, 2004
    #10
  11. : If the quality is "really good", then it should encode well using the
    : above parameters unless your MPEG encoder is garbage. TMPGEnc, while dirt
    : slow, produces excellent quality.

    I use TMPGenc.

    : <http://www.mediacopy.co.uk/cd_cdvcdr.htm>
    : <http://www.absolute-disc.com/cd-duplication.html>
    : <http://www.proactionmedia.com/replication_basics.htm>

    : "Replicated" discs should be able to be encoded to the maximum allowable
    : bitrate per the DVD-Video standard. "Duplicated" discs may have problems
    : playing in standalone players when the overall bitrate 7-8+Mb/s.

    I've never heard of it before. So all the DVDRs are duplicated and thus I
    shouldn't be using more than 8000kbs, correct? I wish I knew that before :)

    If that's the case, the problem is basically solved. I can just go with like
    7500kbs maximum and I'll be able to fit it pretty well.

    --Leonid
     
    Leonid Makarovsky, May 15, 2004
    #11
  12. Leonid Makarovsky

    Nomen Nescio Guest

    Well, here's the story:

    Replicated (= "pressed") discs need to be able to be read in EVERY
    standalone player up to the maximum bitrate allowed by the DVD-Video
    standard. So, as long as you obey the DVD-Video standards, you can encode
    at whatever bitrates you want and the disc should play. If the disc
    doesn't, and there isn't a physical defect on the disc, then you should
    blame the standalone player.

    With duplicated discs, the story is different:

    Duplicated discs (DVD-R/DVD+R, etc.) came out AFTER the DVD-Video standard
    was finalized IIRC. Some really old players will only play replicated
    discs. Anecdotally, quite a few knowledgeable people have discovered that
    if the bitrate on a DVD-R is "too high", the standalong readers' DVD-ROM
    drive cannot read the disc fast enough (probably due to reflectivity and
    other differences between a pressed disc and a burnt DVD-R) and the disc
    won't play properly.

    There is no hard and fast exact number, but most of the articles I have
    read have said to keep the overall bitrate UNDER 7 or 8Mb/s. Some
    standalone players will read up to the full 10.08Mb/s allowed by the
    DVD-Video standard -- others will barf at a bit over 8Mb/s -- some might
    crap out at 7.5Mb/s. But, as I stated, the consensus from what I have
    read is that if you want the disc to be widely compatible with the vast
    majority of DVD-Video players out there, then keep the overall bitrate
    under 7-8Mb/s.
    At full D1, with clean source material and an excellent MPEG encoder, it's
    very rare that 7.5Mb/s isn't adequate to maintain great quality. Watch
    commercial DVDs in a software player that shows the audio/video bitrate
    (such as PowerDVD XP v5.0) or Bitrate Viewer -- I rarely see the video
    bitrate go over 7Mb/s.
     
    Nomen Nescio, May 16, 2004
    #12
  13. : Well, here's the story:

    Thanks for shding the light.

    : At full D1, with clean source material and an excellent MPEG encoder, it's

    I use TMPGenc and it indeed does an excellent job. However, it doesn't do a
    good job on this particular footage that I recorded from a LaserDisc and
    previously from VHS. This is a live concert and there're some effects like
    changing cameras every split second. Also there's a smoke on the stage and
    during that time I see a lot of pixalization and blockiness. Even 8000mbs
    chokes on such scenes.

    : commercial DVDs in a software player that shows the audio/video bitrate
    : (such as PowerDVD XP v5.0) or Bitrate Viewer -- I rarely see the video
    : bitrate go over 7Mb/s.

    I know. Strangely enough their quality is better than higher bit rate going
    from VHS.

    --Leonid
     
    Leonid Makarovsky, May 16, 2004
    #13
  14. Leonid Makarovsky

    Nomen Nescio Guest

    I would consider, as an experiment, dropping the resolution to half-D1
    while keeping the bitrate the same as above.
    The luxury of using hardware based MPEG encoders such as those by Sonic,
    OptiBase or Sony.
     
    Nomen Nescio, May 17, 2004
    #14
  15. : I would consider, as an experiment, dropping the resolution to half-D1
    : while keeping the bitrate the same as above.

    I've done this in the past (with a different footage though). The theory that
    if I reduce to half D1 with twice as little bitrate is not working. I tried
    352x480 footage with 4000kbs and sure enough there was a lot of pixalization.

    One other thing is that I modified the TMPGenc original DVD templates. The
    standard GOP structure is:
    IBBPBBPBBPBBPBBPBB.

    I have it customized as IBPBPBPBPB. Do you think this could cause the
    pixalization problems?

    One other thing I thought I could save a bit rate is that my source video is
    letterboxed (widescreen within 4:3). If I crop (clip) the image in TMPGEnc,
    will bits NOT be allocated outside of the clipping area while encoding?

    :>I know. Strangely enough their quality is better than higher bit rate going
    :>from VHS.

    : The luxury of using hardware based MPEG encoders such as those by Sonic,
    : OptiBase or Sony.

    The software *postprocessing* compression theoretically should give a better
    quality than hardware compression on the fly, shouldn't it?

    --Leonid
     
    Leonid Makarovsky, May 18, 2004
    #15
  16. Leonid Makarovsky

    Nomen Nescio Guest

    Try encoding at half-D1 (352x480) res at **8000Kb/s** and check for
    pixellation is what I meant.
    Sure, since B frames generally require less bits than P frames. Your
    modified GOP could be a "bandwidth hog". In hard to encode scenes, which
    your source footage seems to have a lot of, that GOP could be "running out
    of bits" and cause your complaints.

    Try standard, or rather default, GOP settings for TMPGEnc's MPEG-2
    encoding for DVD-Video.

    Most MPEG encoder documentation I have seen has strongly encouraged users
    to NOT modify the GOP structure for encoding that comes with the templates
    unless there is a darn good reason.
    Sure. That could help too.
     
    Nomen Nescio, May 18, 2004
    #16
  17. : Try encoding at half-D1 (352x480) res at **8000Kb/s** and check for
    : pixellation is what I meant.


    You know what, I'll actually be encoding at half-D1. I noticed that these
    2 LDs were rather noisy and have some sort of their own pixelization.

    :>One other thing is that I modified the TMPGenc original DVD templates. The
    :>standard GOP structure is:
    :>IBBPBBPBBPBBPBBPBB.
    :>
    :>I have it customized as IBPBPBPBPB. Do you think this could cause the
    :>pixalization problems?

    : Sure, since B frames generally require less bits than P frames. Your
    : modified GOP could be a "bandwidth hog". In hard to encode scenes, which
    : your source footage seems to have a lot of, that GOP could be "running out
    : of bits" and cause your complaints.

    : Try standard, or rather default, GOP settings for TMPGEnc's MPEG-2
    : encoding for DVD-Video.

    I'll try that. Thanks.

    BTW, I think I'll be using AVISynth to resize.
    AVISource("Coroner_LiveInEastBerlin.avi")
    Trim(215,2015)
    Lanczos4Resize(352,480)

    Now, do I need SeparateFields command before Lanczos4Resize?

    --Leonid
     
    Leonid Makarovsky, May 18, 2004
    #17
  18. Leonid Makarovsky

    Bariloche Guest

    Rather, encode half-D1 at CQ 100%. That way, you have the guarantee
    that encoding shall not develop any artifact. If they show, then they
    must already come with the original video.

    Half-D1 at CQ 100% is almost always quite below 8000 kbps.
     
    Bariloche, May 18, 2004
    #18
  19. Leonid Makarovsky

    Bariloche Guest

    Indeed.
     
    Bariloche, May 18, 2004
    #19
  20. : Half-D1 at CQ 100% is almost always quite below 8000 kbps.

    I just encoded it with CQ 90% max 8250kbs. The average bitrate was 5836.50kbs.

    I'd like to boost it up but not more than like 7000-7500kbs. Will 100% do it?

    --Leonid
     
    Leonid Makarovsky, May 18, 2004
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.