Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | Link |
|
Registered User
Join Date: Dec 2001
Location: Berlin
Posts: 100
|
1st pass bitstream = 2nd pass source -> alternative way for 2pass -> much faster
ChristianHJW posted his idea of making the 2nd pass out of the bitstream from the 1st pass in the videocoding.de-forum, which doesnīt seem to be online anymore.
![]() I made a rip (PulpFiction, 2cd, vbr-mp3) with this method Here are My results: 1. The final size was correct (I didnīt expect this) 2. The video is a bit noisy (I hope itīs because the DVD was) 3. Quality is good (no blocks, postprocessing needs deringing) 4. Speed: 1st pass: I used DVD2AVI 1.82 to read dirctly from the (unencrypted) DVD ~20 FPS -> 190 min (the movie has 148min) 2nd pass: Fast recompress with VDub ~30 FPS -> 120 min !!!! My solution: -Much faster way -quality is not bad |
|
|
|
|
|
#3 | Link |
|
Registered User
Join Date: Jan 2002
Posts: 331
|
I don't quite understand your post A_Pleite. What steps are you taking in DVD2AVI? Resizing and Cropping, that's it? And outputing an avi? But how does this speed things up? I understand that there might be a quality loss.
Just more specific info in this process would be more clear. Thanks, Dali |
|
|
|
|
|
#4 | Link |
|
Registered User
Join Date: Feb 2002
Posts: 60
|
I believe he refers to a similiar idea I had. My idea goes like this:
The 1st pass bit stream contains all or most of the final processing at max quality. So why go through all this processing twice? Use the 1st pass HQ bitstream as the *source* for the second stream. That should result in a big speed boost, since all the second pass processing would be doing is applying the bit distribution, and not say resizing + various filtering as well. Last edited by Synth; 15th March 2002 at 03:51. |
|
|
|
|
|
#5 | Link |
|
Registered User
Join Date: Mar 2002
Posts: 1,031
|
It has been compressed, it might be higher quality than the final bitstream but final quality will still be worse then when using the original in the second pass. Errors accumulate, larger errors in the second pass do not simply replace the one's from the first.
|
|
|
|
|
|
#6 | Link |
|
Registered User
Join Date: Feb 2002
Posts: 60
|
As far as I understand it is *compressed* but with max possible quality for xvid ie, quant 2 throughout. Thus, at best the 2nd pass is the *same* as the first pass since its reads and calculates the same.
I could be wrong though. Lets wait for some of the xvid experts to share their wisdom on the matter. |
|
|
|
|
|
#7 | Link |
|
Registered User
Join Date: Mar 2002
Posts: 1,031
|
It doesnt work that way, for one thing quantization noise would be additive even if you just consider image compression. With motion compensation its much worse though, say you change the quantizer for a MB ... that does not just affect that MB but also all the one's in subsequent frames touched by it through motion compensation.
The best you can do is reuse the motion vectors, and even those you should only use as seeds for the search really and not exactly as they were ... motion vectors do not represent true motion, they represent the vector which minimizes the residual error and the vector which does that can and will change if you change the quantization. Last edited by MfA; 15th March 2002 at 06:13. |
|
|
|
|
|
#8 | Link |
|
lurking linux luser
Join Date: Oct 2001
Posts: 12
|
Just tried it. I repeatedly encoded a clip at quantizer 2 and it shrank, repeatedly encoded it at quantizer 1 and it grew. Interestingly the degredation's not as pronounced differences as I'd expected. filesizes started at 608k (only 200 frames) and wound up at 256k after 20 reencodes at q2; I wouldn't say it was watchable after that, but not too much worse than the filesize difference would suggest. I started with kind of a crappy source though; I suspect you'd see much more difference between a first- and second-generation encode off a good dvd. I guess if it's worth it to you for the speed boost, it might not be too much of a sacrifice to go from one generation to two.
|
|
|
|
|
|
#9 | Link |
|
Ogg + Vorbis + XviD
Join Date: Dec 2001
Location: Singapore
Posts: 182
|
It is possible to speed up the second pass by reusing some of the information from the first pass, some of the information can be reused, some cannot. A simple example of what can be reused is the motion estimation vectors, and this method is used in DivX5. You might be able to skip the compression of frames which are supposed to be quantized at 2x in the second pass by simply copying the frame over (since it is already compressed at 2x for the first pass). And you might be able to speed up frames with even quantizers in the second pass by simple requantizing (works only for 4x, 6x, 8x, etc all even quantizer). I'm not an expert, so I'm not sure if there are complications (with future residue) in using this method for P-frames, while it should be trivial for I-frames.
|
|
|
|
|
|
#10 | Link |
|
Registered User
Join Date: Dec 2001
Location: Berlin
Posts: 100
|
The topic is there:
http://www.videocoding.de/forum/view...114&forum=2&17 @ Dali Lama I have done the first pass with DVD2AVI 1.82 which supports resizing, so I loaded the vobs in it and resized and cropped to 712x304, the output was an avi. I loaded this avi in VDub and made the 2nd pass using "fast recompress". The 2nd pass needed neither cropping, resizing nor mpeg2decoding which gives you a lot of extra-speed for encoding. I hope thatīs clear now. @MfA It is always quality versus speed. There was more noise than before (I think), but the size was pretty right. Itīs just A way, itīs not THE way ![]() @tangent good ideas , maybe this could be done. Then It is necessary to not dscard the 1st-pass stream and send it to the 2nd pass TOGETHER with the decoded vobs. Maybe it is possible to not decode the vobs, if a GOP is directly sent to the final avi. |
|
|
|
|
|
#11 | Link |
|
Ogg + Vorbis + XviD
Join Date: Dec 2001
Location: Singapore
Posts: 182
|
Just read the thread. -h confirmed in there the problem I thought might happen if we do simple requantisation.
Too bad most of us won't have the diskspace to keep a lossless post-filter+resize version of the video stream. |
|
|
|
|
|
#12 | Link |
|
Registered User
Join Date: Oct 2001
Location: Outside the Bush INSanatory - Lisbon
Posts: 329
|
For those thinking of 2nd generation encodes be very careful about cropping! Compression depends (more than you might think) on how you crop and (less than you might think) on whether you crop. Check this post:
http://forum.doom9.org/showthread.php?s=&threadid=18277 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|