VideoHelp Forum




+ Reply to Thread
Results 1 to 21 of 21
  1. Member
    Join Date
    Aug 2008
    Location
    Europe
    Search Comp PM
    Could someone please advise on this issue - I'd be using VDub/VDubMod and Xvid.

    I have a single avi file that I want to edit with a fair amount of cutting out of 'chunks of frames' (so I'll really be reducing the size of the file by quite a bit). I've already done a 1st pass scan of the full (original) avi and saved the '1st.pass' file.

    Is it possible to now merrily chop out chunks of the video and then save the resulting (now much smaller video) using a 2nd pass, but still referring the 2nd pass to the original '1st.pass' file that was made from the full original file (before chopping out)?

    (I mean does/can VDub/VDubMod keep track of what is going on and relate that to the content of the 1st.pass file?


    Also, same issue, but this time I'm editing a 'wmv' in VDub/VDubMod and having the frames sent to them via AviSynth and its 'directshowsource("test.wmv")' capability?
    Quote Quote  
  2. The video has to be the same on the first and second passes. Xvid has no idea what VirtualDub is doing, and vice versa.
    Quote Quote  
  3. Member
    Join Date
    Aug 2008
    Location
    Europe
    Search Comp PM
    Argh... Do a 1st pass every time cutting out is done.

    Okay, then follow up question would be, is there any video editor (software) that would keep track of that kind of thing, allow making a 1st pass from a complete file, and then synchronize any 2nd pass of a (now) edited file with bits cut out against the 1st pass of the full, original, avi.

    (Hope that makes sense. Same question really, just is there any software that will manage that.
    Quote Quote  
  4. In theory you could edit the video.pass file (where Xvid keeps the information gleaned in the first pass, it's plain text) to reflect the cuts but I'm not aware of any program that does that.

    If you don't need a specific file size just use single pass target quantizer encoding (constant quality). In 2-pass bitrate encoding you pick the bitrate and the encoder delivers whatever quality it can for that bitrate. In target quantizer encoding you pick the quality and the encoder uses whatever bitrate is necessary to give you that quality.
    Quote Quote  
  5. Member
    Join Date
    Aug 2008
    Location
    Europe
    Search Comp PM
    Okay, I'll outright forget about trying to edit the 1st pass file.

    However, being a newbie, I'm a little confused by what I think might be the implications of your second suggested workaround.

    Are you saying that I can get an equivalent (high image quality) re-compressed file without even bothering to do 1st + 2nd pass compression?

    Mmm..... Like if I use 'Single Pass' and just bump up the bitrate there would be a point at which, if the bitrate were high enough, I'd get a resulting avi that, in terms of image quality, would be as good as the best I'd get using a 1st + 2nd pass compression route?

    Hope that makes sense.

    What I'm getting at is that I know that all uncompressing, editing and subsequent re-compressing of an existing avi leads to loss of image quality. But my tinkering with bitrates in the past seems to suggest that there comes a point at which using higher and higher bitrates doesn't produce a higher image quality than having used a lower bitrate - i.e. for any individual source file there is some kind of 'quality threshold' that can't be improved once you get beyond that threshold-bitrate. Is that right? Is that what you're saying?

    And, if it is, and you were doing this, are there any 'tricks' to establishing what that threshold-bitrate is?

    Hope that makes sense, too.
    Quote Quote  
  6. Yes, a single-pass can be as good or better than a 2-pass, for the price of a slightly larger file.

    Also Yes, there is a point with any source file such that re-encoding with a higher bitrate does nothing for further improvement.
    Quote Quote  
  7. 2-pass encoding doesn't assure you of quality. It only assures that you will get the best quality possible at the selected average bitrate.

    If you perform a single pass target quantizer (not single pass contant bitrate) encoding and happen to get a result with an average bitrate of 1000 kbps, then turn around and perform a 2-pass encode with a 1000 kbps average bitrate, the two files will look almost identical.

    The only reason to use 2-pass encoding is to achieve a particular file size (file size = average bitrate * running time). Like when you want to fit a 90 minute movie on a 700 MB CD.
    Quote Quote  
  8. Member
    Join Date
    Aug 2008
    Location
    Europe
    Search Comp PM
    Okay guys, that's excellent - I think the idea is starting to gel for me now.

    I'll go experiment and see how I get on.

    Very many thanks.
    Quote Quote  
  9. Originally Posted by Chakra View Post
    Mmm..... Like if I use 'Single Pass' and just bump up the bitrate there would be a point at which, if the bitrate were high enough, I'd get a resulting avi that, in terms of image quality, would be as good as the best I'd get using a 1st + 2nd pass compression route?
    They're not talking about doing single-passes for a fixed bitrate (aka Constant BitRate encoding, or CBR). They're talking about doing single-passes for a fixed quality or quantizer (or true Variable BitRate encoding, or VBR).
    Quote Quote  
  10. At the main Xvid config dialog press the button that says "Target bitrate (kbps):" -- it will change to "Target quantizer". Try quantizers around 2 or 3. The lower the quantizer, the higher the quality.
    Quote Quote  
  11. Member
    Join Date
    Aug 2008
    Location
    Europe
    Search Comp PM
    Ah... Just tried that out.

    Now I see it. That makes sense and is much easier (couple of clicks) than where my thinking was. So for x-years I've been struggling with something mostly unnecessary for my intended aims. Yipee! This will save me hours in future.

    Brilliant! Huge thanks guys.
    Quote Quote  
  12. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    What I'm getting at is that I know that all uncompressing, editing and subsequent re-compressing of an existing avi leads to loss of image quality. But my tinkering with bitrates in the past seems to suggest that there comes a point at which using higher and higher bitrates doesn't produce a higher image quality than having used a lower bitrate - i.e. for any individual source file there is some kind of 'quality threshold' that can't be improved once you get beyond that threshold-bitrate. Is that right? Is that what you're saying?

    And, if it is, and you were doing this, are there any 'tricks' to establishing what that threshold-bitrate is?
    As regards the above, I would like to get some detailed explanation like how to determine the correct bitrate for encoding. What are the factors to consider and arrive at the bitrate. Can someone elaborate on these lines.
    Thanks.
    Quote Quote  
  13. Originally Posted by shans View Post
    I would like to get some detailed explanation like how to determine the correct bitrate for encoding. What are the factors to consider and arrive at the bitrate.
    The only way to determine the right bitrate is to encode the video and see how it turns out. Some things that require more bitrate:

    1) more detail
    2) more motion
    3) brighter picture
    4) more noise
    5) flickering (strobe lights, unequal exposure from frame to frame, poor telecine)
    6) more pixels (larger frame size)
    7) higher frame rates
    8) interlaced video

    Basically the more details there are per frame, and the more the picture changes from frame to frame, the higher the bitrate you will need. You can't just look at a video and say what bitrate it will require with any precision. That's why you should use constant quality encoding.
    Quote Quote  
  14. Or run a compression test to determine the compressibility of the source (assuming it's for XviD/DivX AVI, as is the subject of this thread). The results can give you an idea of the resolution to use and the final size/bitrate you should aim for. Gordian Knot has one built into the program.

    Or, as jagabo suggests, just do a CQ encode for the quality you want and don't worry abot the file size.
    Quote Quote  
  15. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    [QUOTE=jagabo;2063555]
    Originally Posted by shans View Post

    You can't just look at a video and say what bitrate it will require with any precision. That's why you should use constant quality encoding.
    Hitherto, I used 2 pass encoding thinking that I would get a quality video. I would like to project a point at this juncture. My source video with AVI-XviD format compressed from dvd with say, 700 kb/s bitrate. Can I improve the video quality by encoding again in VDub or other programmes with constant quality encoding, 2 or 3 quantizer ( with highter bitrate than the source). If I am correct, I should choose a bitrate less than the source irrespective of the type of encoding.
    Quote Quote  
  16. Originally Posted by shans View Post
    Hitherto, I used 2 pass encoding thinking that I would get a quality video. I would like to project a point at this juncture. My source video with AVI-XviD format compressed from dvd with say, 700 kb/s bitrate. Can I improve the video quality by encoding again in VDub or other programmes with constant quality encoding, 2 or 3 quantizer ( with highter bitrate than the source).
    You cannot improve the quality of a poorly encoded video by reencoding it with a higher bitrate. If you go back to the original source and encode with a higher bitrate you will get better quality. Since there is no way of knowing what the quality your 700 kb/s encoding is, nobody can tell you if using a target quantizer of 2 or 3 will give you better or worse quality. What we can tell you is that using a quantizer of 2 always gives the same quality, regardless of the source video's properties -- a quality that's very close to the source video. A quantizer of 3 will be a little lower quality than the source but you probably won't notice unless you look at enlarged still frames.

    Originally Posted by shans View Post
    If I am correct, I should choose a bitrate less than the source irrespective of the type of encoding.
    No. Different codecs have different compression abilities. If you go from h.264 to Xvid you usually need a higher bitrate. If you go from MPEG 2 to Xvid you can usually use a lower bitrate. And the settings used within the codec can make a differences too.

    Once again, the only reason to use 2-pass encoding is to get a specific file size. Actually, there is one other reason. When using Target Quantizer encoding in Xvid doesn't pay any attention to the Min/Max bitrate settings. If you have a player with bitrate limitations (some older players are limited to a max of about 3000 kbps, most newer players can go much higher) you need to use 2-pass encoding to be sure the bitrate stays withing the range the player can handle.

    In the past a whole cult of Divx/Xvid encoders learned to use 2-pass encoding because they wanted to fit full movies on 716 MB CDs. Now that fitting movies on CDs is no longer an issue for most people there's little reason to use 2-pass encoding. Unfortunately, a lot of "scene" idiots are still hung up on 2-pass encoding.
    Last edited by jagabo; 10th Mar 2011 at 22:58.
    Quote Quote  
  17. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    Originally Posted by shans View Post
    If I am correct, I should choose a bitrate less than the source irrespective of the type of encoding.

    No. Different codecs have different compression abilities. If you go from h.264 to Xvid you usually need a higher bitrate. If you go from MPEG 2 to Xvid you can usually use a lower bitrate. And the settings used within the codec can make a differences too.
    This pertains to my requirement of re-encoding. I download movies mostly of 1 cd size with xvid format. I check the bitrate and 'Qf' factor. As I wanted to see the movies in my standalone dvd player, I re-encode them only adding borders at top and bottom to see them as 16/9 dar in my tv. Otherwise, it would get blown up to the tv screen.
    I use either VDubMod or Avidemux for this and I ensure the bitrate doesn't exceed the source with 2 pass encoding. I burn them as data files only. Can you please suggest any better method to suit my purpose with ideal settings.
    Thank you for sparing your time, jagabo.
    Quote Quote  
  18. Qf is nearly meaningless. Download the videos in this post:

    https://forum.videohelp.com/threads/295672-A-problem-for-video-experts?p=1811057&viewfu...=1#post1811057

    and check the Qf values. Which would you rather watch?

    Use Target Quantizer encoding with Q=2.
    Quote Quote  
  19. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    Originally Posted by jagabo View Post
    Qf is nearly meaningless. Download the videos in this post:
    Fantastic explanations. It took some time for me to understand. You have turned a new leaf to my learning.

    So, henceforth I will follow the constant quantiser mode only as you described., irrespective of the source. Size is immaterial for me, but I expect the same source quality.

    Thank you so much.
    Quote Quote  
  20. By the way, you might be able to avoid reencoding at all by setting your player to output 4:3 and your TV to display 4:3 by pillarboxing. That way 16:9 videos will be letterboxed in a 4:3 frame by the player then pillarboxed to a 16:9 frame by the TV.
    Quote Quote  
  21. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    Excellent tip. It worked. I could view not only the videos of 16:9 dar but also with 2.35:1.
    How much source and time were being wasted in adding borders all along. Thank you very much, jagabo.

    By the way, I copy and pasted VDubMod exe and connected files from one drive to another drive to another program. Now, none of them opens. I deleted all and downloaded the pack again. But, VdubMod doesn't open. Can you help me.
    Quote Quote  



Similar Threads

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