VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Member
    Join Date
    Jul 2009
    Location
    Morocco
    Search Comp PM
    Hi @all !

    I have some TV series (DVD or AVI (X264) source) and I would like to know if there is possibility to optimize the bitrate globally.

    Example:
    A TV series that counts 26 episodes total and I would like this to fit on a single 4.7GB DVD.
    Sure I can use always the same filesize for all files (eg. 172MB each) but it is not a well optimized method because some episodes will need more bitrate than some others.

    I would like to define a global target size (4.7GB) and tell the XviD encoder to make a global first pass (all episodes) and then a global second pass (by this way, we will obtain a globally managed bitrate priority).
    In that case, the episodes that doesn't need a high bitrate will weigh only ~150MB and other ones will weigh ~200MB, and the global target size will be kept.

    Is it possible to do that or is it an XviD needed feature ?

    Sorry but I don't speak english well, I hope you'll understand.
    Quote Quote  
  2. You want all the episodes to have the same quality, but with the constraint of having a fixed final total size. I can think of 2 ways to do this:

    1. Join them all and encode for the size you want, splitting them afterwards.
    2. Save the first passes and total them up, find the percentage of that figure that gives you the final size you want, and then make each episode's 2nd pass that same percentage of the first pass size.

    There is also the issue of the audio and muxing overhead, but that's not too difficult to figure. I've done this several times myself, using the second method, when fitting episodes to DVD
    Quote Quote  
  3. Member
    Join Date
    Jul 2009
    Location
    Morocco
    Search Comp PM
    Your first solution is exactly what I need but a bit difficult and time/disk space consuming.
    I would like to avoid using the same filesize for each episode because this will result a variable quality between episodes.

    What do you mean @ "total them up" ?
    I don't know what episodes needs more bitrate than what other, i think XviD has to determine that.

    So how can I find the correct percentage for each episodes ?
    Quote Quote  
  4. Originally Posted by saegeek
    What do you mean @ "total them up" ?
    I don't know what episodes needs more bitrate than what other, i think XviD has to determine that.
    During the first pass of a 2-pass encode the encoder is performing a constant quality encode to determine which parts of the video need more bitrate, which less. Adding up the size of all the first passes (you must disable the "Discard first pass" option so the first pass video is actually saved in the AVI file, otherwise you'll just get a tiny file full of black frames) is then the same thing that would have happened if all the episodes had been joined together before encoding. So now you know what the relative bitrate requirement of each episode is.

    For example, say you run all the first passes and the result is 10 GB total. If the first episode took 500 MB, you know that you should allocate 5 percent of the final file size to that episode. If the second episode took 1000 MB you know it should get 10 percent. Now when you perform the second pass on that first episode you give it 5 percent of the total disk (about 215 MB of a 4300 MB DVD). The second episode gets 10 percent (430 MB of a 4300 MB DVD). Etc.
    Quote Quote  
  5. Exactly. The XviD first passes (unless you mess around in the zones) are encoded at quant 2. Saving them as playable AVIs as jagabo described gives you all the episodes with the same quality. The first pass sizes will differ, sometimes considerably, depending on the complexity of the material in each episode. By then encoding each for its second pass at the same percentage of its first pass size you will wind up with each completed episode in very similar quality.

    I also was unhappy with encoding episodic DVDs giving each episode the same size because of the sometimes wildly varying quality results, and developed that way to do it for my own encodes. Not that the concept is all that difficult. It does take extra time to do, though, partly because of all the figuring and partly because you have to stop after the first pass and then set up all the encodes again for the second pass.
    Quote Quote  



Similar Threads

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