View Full Version : A feature for 2pass mode for DVD-RW
serbersan
8th March 2002, 13:16
I've read in other threads that the quality/size of the 1 pass mode quality based isn't as good as the quality/size of the 2pass mode (I read this from a post of ChristanHJW about divx4, Sorry Christian if I've made a mistake).
I mean 600Mb of video with 2pass mode have better quality than 600Mb 1 pass quality based.
The problem is:
If I have a DVD-RW and I want to fit in a few movies, for me, It has no sense to use a 2 pass mode with a limit of 600-700Mb, or a fixed number. If I had a DVD-RW I will go with a 1 pass quality based mode (85%for example) but then final video stream won't be as good as the same of a 2 pass mode. And I think do first a quality based pass and then having the final size do a 2 pass it has no sense.
Why not an option in 2 pass mode to do the second pass with a quality mesure xx% instead/besides a final size. I think to scale the curve to use a % of visual quality instead of a final size has to be very very easy(final size of first pass x 0.xx = new file size, a silly aproximation), and could be great for those having DVD-RW, even for CD's in the case of difficult movies.
What about this????
Koepi
8th March 2002, 13:26
You misunderstood the 2 pass mode.
What you need is 1 pass quality.
Since you want to disable all mechanisms of 2 pass that's what is residue...
You can't take advantage of 2 pass mode without size restrictions (the aim of 2 pass is: best possible quality for a fixed size.)
Regards,
Koepi
Teegedeck
8th March 2002, 14:08
Hmmm... I guess serbersan wanted to use the advantages of keyframe-boost (errr, this doesn't work in quality-based encoding, or does it???) and the like... I'd say, you can just enter the same high bitrate in GKnot for every encoding you do (say, 3000 Kbps) and just calculate the filesize depending on the length of your current project. ...but that is of course a bit complicated and you were asking for a way to make it simpler. Well, if I were you and had such a nice toy, I'd just go for constant quantizer=2, all the time!! ;) No bargains, no compromises.
serbersan
10th March 2002, 15:30
well, the problem is that I've made some tests:
1.- Contant quality 9X% Mpeg quantizer
2.- 2pass mode with the size of above process same Quantizer
The 2º version it's more detailed and size is 10k less than the CQ version.
I don't understand so why koepi has discarded so easy this option.
I think to use a % of quality in 2º pass instead of final size as an option should be very easy to the encoder, it should be an easy calc.
And yes the quality of 2 pass mode it's better than CQ with the same size...why not to use always 2pass to store? And then what happens if you have a DVD-RW?
Do you have then to do a 1CQ and with the final size do a 2 pass encode. 3pass vs 2 pass encode. I'm sure this isn't a studid suggestion.
I think to use a % of quality in 2º pass instead of final size as an option should be very easy to the encoder, it should be an easy calc.
But..... how would the % of quality affect the desired frame size for the second pass? I'd try adding the feature if I knew specifically (mathematically) what it should do, but I don't :)
Do you have then to do a 1CQ and with the final size do a 2 pass encode. 3pass vs 2 pass encode. I'm sure this isn't a studid suggestion.
Ah OK. How about this. If you uncheck the "Discard 1st pass" option in XviD, the original quant=2 file will be stored on your hard drive somewhere, and it'll be huge. What you want to do is, get that file's size, divide it by 2, then enter that as your desired file size.
All the 1-pass quality mode does is decide on a constant quantizer for the whole movie, and the 1st pass has already done that step for you :) You can mess around a bit to find the multiple you're after (maybe half of the quant=2 file is too small for your liking), but this will achieve, in every way shape and form, what you are asking about.
This could be achieved in the codec by including a "manually set curve value" field into XviD - all the desired file size field does is say "how big was the 1st pass? 1 GB? And the desired size is 500 MB? Therefore the curve is 1 GB / 500 MB = 2".
-h
serbersan
10th March 2002, 17:01
But..... how would the % of quality affect the desired frame size for the second pass? I'd try adding the feature if I knew specifically (mathematically) what it should do, but I don't
I don't understand this answer. How the codec achieves a % of visual quality in 1 pass CQ? It isn't the same for the 2pass case that I've said? :confused: I suppossed the codec does some internal scaling.
Sorry -h I haven't understood very good your explanation, How do I do it in the case of I want to reach a 90% of visual quality?
For example I want 90% quality and the 2pass-first pass give me a final size of 3G, How do I do now the 2º pass to reach 90% and not do more than 2 passes finally. Could you explain me how to do it in this case, thanks.
Or Is this the relation:
But..... how would the % of quality affect the desired frame size for the second pass? I'd try adding the feature if I knew specifically (mathematically) what it should do, but I don't
you don't know?
Then, what do the codec to reach a % of visual quality?
I thought it was the same but for a 2 pass mode.
Thanks for the interest in answer my question -h?
I don't understand this answer. How the codec achieves a % of visual quality in 1 pass CQ? It isn't the same for the 2pass case that I've said? :confused: I suppossed the codec does some internal scaling.
The 1-pass quality mode selects a quantizer to use for the entire clip - every frame gets quantized the same, regardless of how much movement is going on. In 2-pass mode, we know how big every frame was from the 1st pass, then attempt to "scale" it to meet the desired file size. As a side effect (and curve compression in action), large frames (typically high motion) receive higher quantizers so that small frames can look better.
In order to have a % of visual quality in 2-pass mode, we'd just be setting the quantizers of every frame to be the same. In that case, you should just use 1-pass quality mode, since there will be no quantizer fluctuation which is 2-pass encoding's strength.
For example I want 90% quality and the 2pass-first pass give me a final size of 3G, How do I do now the 2º pass to reach 90% and not do more than 2 passes finally. Could you explain me how to do it in this case, thanks.
OK, here's what I'd do for this:
- Encode a clip with quant=2. Record the file size.
- Encode same clip wih quality=90% or whatever. Record the file size.
- Now, what is the size of quant=2, divided by the size of quality=90%? For this example, let's just say quant_size/quality_size=2. We can now say that, an encode with quality=90% will be half the size of an encode where quant=2.
Now the important part:
- Perform the 1st pass on your movie, but keep the 1st pass output file (should be huge, 2.5 GB or so).
- Divide 2.5 GB by the scale value we found before (2, in this case). Now we have 1.25 GB for the desired size.
- Perform 2nd pass, with 1.25 GB as the desired size.
See, we "know" that a quality=90% clip will be 1/2 the size of a quant=2 clip (of course it might not be in real life, I've just made up the numbers for this example). So instead of doing a quality=90% encode to find the "90% visual quality" size, we just perform the first pass which is quant=2, then use the ratio we calculated to *figure out* how big the 90% quality encode *would have* been.
Not sure how else I can explain it. I'm very tired though, not normally up this late.
-h
serbersan
10th March 2002, 18:00
Thanks very much -h¡¡¡
An excellent reply. Now I have very clear what to do. :D
Thanks again. :D
philippas
11th March 2002, 13:40
Check a bit similar answer here (http://forum.doom9.org/showthread.php?s=&threadid=19403)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.