View Full Version : DVD->DivX best possible quality ?
JamesTKirby
4th January 2003, 12:46
Hello,
How do I get the best possible quality, ripping from a DVD and encoding to DivX (using Nandub) ? I don't care about the output file size, I just want the video quality to be the best possible.
First of all, I rip the DVD with SmartRipper. Then I use the DVD2AVI + VFAPI method to feed the video data to Nandub.
Questions:
1. Is the AVISynth method better ? Does it preserve the YUV (or whatever they are) components better than the VFAPI method ?
2. How about the interpolation in resizing, any difference between AVIsynth/VFAPI methods? I might skip resizing altogether, and have the video as 704 x something though.
3. How do I finally get the best possible DivX encoding? Should I just use Nandub with a bitrate of 6000 kbps (2-pass method) or use VirtualDub with the DivX Low-Motion Codec set to 6000 kbps (1-pass) ?
Any help appreciated :)
JTK
hakko504
5th January 2003, 15:09
Yes, AviSynth is better: Faster, less colorconversions. VFAPI always treats data in RGB, whereas AviSynth can use YUY2 (or in 2.5a YV12, the native format of DVD's)
The VFAPI method is probably a little more accurate when you resize, but since you have to reconvert the data to YV12 anyway you loose any advantage VFAPI may give you.If you intend to make a short RGB-based AVI available the you will probably get slightly better results from VFAPI. On the other hand the new Lancoz-resize (or something, I never remember the spelling) should be able to produce results just as good in AviSynth as with VFAPI.
Just run a single-pass at 6000kbps with the lowmotion codec. The extra time for nandub/2pass is again not worth it if you want best possible.
NeVeRLiFt
5th January 2003, 17:13
Originally posted by hakko504
Just run a single-pass at 6000kbps with the lowmotion codec. The extra time for nandub/2pass is again not worth it if you want best possible.[/list]
I disagree and cant believe you would say this. A proper 2pass enocde done with Nandub will kill a 1pass in quality and size ;)
Darksoul71
5th January 2003, 18:32
Heya Nellie :)
I disagree and cant believe you would say this. A proper 2pass enocde done with Nandub will kill a 1pass in quality and size
This was NOT about quality AND size but about quality only.
For max quality 1pass at max bitrate or 1pass 100% CQ will beat any 2pass encoding unless your up the average bitrate very much.
Happy new year,
D$
NeVeRLiFt
5th January 2003, 18:43
Originally posted by Darksoul71
Heya Nellie :)
This was NOT about quality AND size but about quality only.
For max quality 1pass at max bitrate or 1pass 100% CQ will beat any 2pass encoding unless your up the average bitrate very much.
Happy new year,
D$ I assume your talking to me??
Its NeVeRLiFt if you think can get that in your think head.
And a 2pass encode done with Max bitrate will still beat a 1pass.
manono
5th January 2003, 19:08
Hi-
And a 2pass encode done with Max bitrate will still beat a 1pass.
Sorry man, but that makes no sense at all. What's the point of running 2 passes if the whole thing is going to be at DRF 2 (or Quant 2 if DivX5 or XviD)? The whole point of 2 passes is to get max quality for a given file size. But the original poster said he doesn't care about file size. So you just save the first pass (which by definition is at a bit rate of 6000 or DRF 2).
Take it easy on him Darksoul71. This is the new and reformed NeVeRLiFt. In his latest incarnation he's been acting very reasonably and responsibly.
Darksoul71
5th January 2003, 19:13
@manono:
Take it easy on him Darksoul71. This is the new and reformed NeVeRLiFt. In his latest incarnation he's been acting very reasonably and responsibly.
Oh, thatīs fine ! I thought itīs the "old" NL who told me to "go back to the Nazis over at doom9 and lick their boots" over at rage3d.
But if heīs acting reasonably and responsibly Iīll relax ;)
cu,
D$
P.S.: NL, itīs good to have to back over at doom9 :D
NeVeRLiFt
5th January 2003, 19:13
Not only will the quality be good... but the size will be better and the fast motion scenes should do better while the low motion scenes are not overkill with bits that are not needed. If you dont care about the size then by all means do a 1pass. But the facts remains a 2pass will always beat a 1pass in quality and size.
NeVeRLiFt
5th January 2003, 19:16
Originally posted by Darksoul71
@manono:
Oh, thatīs fine ! I thought itīs the "old" NL who told me to "go back to the Nazis over at doom9 and lick their boots" over at rage3d.
But if heīs acting reasonably and responsibly Iīll relax ;)
cu,
D$
P.S.: NL, itīs good to have to back over at doom9 :D
Dont know what to say... I thank you and I'm glad to be back.
And if all the posts where not deleted you would see I where I was coming from and that I was indeed bone rushed and beat up :D
But its all water under the bridge.
JamesTKirby
5th January 2003, 19:42
@Hakko:
Thanks for the VFAPI vs AVISynth explanation. I'll start using AVISynth from now on I think. Last time I tried I had some problems with it, maybe this time it will work. I'm pretty sure the problem was between the monitor and my chair ;) - but don't tell anyone...
@all:
Yes should be DRF 2 all the way, I'm using Nandub, encoding to DivX (good old 3.11 alpha).
I think I'm gonna test it a bit and post some results here just in case someone else would be interested too. I'll let it crunch overnight, using two schemes:
1. Nandub with SBC 2-pass at bitrate 6000, with usual settings I use.
2. VirtualDub with DivX LM codec, bitrate 6000.
The problem is though that I don't think that VDub and Nandub both use the same algorithm for resizing, so I think I'm gonna crop to 704x??? and leave out resizing completely.
I have a feeling Nandub's 2-pass method will yield better results, though... it has the luma correction bit-boost stuff for example. Then again I don't know Nandub that well internally although I have made dozens of rips and fiddled around with most settings.
I'll post my findings tomorrow.
Thanks for the input guys,
JTK
NeVeRLiFt
5th January 2003, 19:47
Another example of this would be using say TMPGEnc and compare a 1pass CBR to a 2pass VBR mpeg2 SVCD encode and compare the size and quality.... 2pass has the chance to do better with fast motion scenes and scene changes and not waste bits.
hakko504
5th January 2003, 23:18
@JTK
AviSynth is not easy to understand when you start using it, but as you get into it you find you can't live without it: It's addictive, it's good, and it's fast.
@NeVeRLiFt
I actually agree with you: it probably is possible to get just a little bit extra quality from DivX3.11 by doing a 2pass encode in nandub at 6000kbps compared to a 1pass DivXLoMo in VirtualDub. I just said that it's not worth the effort.
JamesTKirby
6th January 2003, 20:09
Well, I decided to *use* resizing, although VirtualDub and Nandub use different algorithms. I used Precise Bilinear on both, though.
Results were not surprising:
VirtualDub LM Codec, 6000 kbps, KFs every 10 secs:
Perfect output, size 1,05 Gb.
Nandub SBC at 6000 kbps, DRF2-2:
Perfect output, size 1,04 Gb.
Nandub SBC at 6000 kbps, DRF2-16:
Output mediocre quality, size 473 megs.
So, it went as we expected, mostly. The only thing worth noting here is that Nandub uses weaker compression, if it's allowed by the DRF settings. That means even if I tell it to shoot for 6000 kbps or as high as it can, it often uses DRF8-10 and such. Luckily we have the option of setting the DRF range, I personally only use 2-5 or 2-4 as max-min factors.
Cheers all,
JTK
manono
7th January 2003, 13:52
So your Nandub tests were for 1-pass, and not 2-pass as you said you were going to do?
JamesTKirby
7th January 2003, 15:19
Originally posted by manono
So your Nandub tests were for 1-pass, and not 2-pass as you said you were going to do?
:confused:
Oh, yes both Nandub tests were 2-pass. VirtualDub LM Codec test was 1-pass. I don't think you can do single-pass in Nandub (?) or maybe you can but that's not what SBC was designed for... as you well know :)
Sorry if I was unclear in the first place,
Oh and I used precise *bicubic* on all tests, not bilinear... uhhh anyone got a good shop to get a brain ? :)
JTK
manono
7th January 2003, 15:41
Hi-
Then you didn't encode the second pass using the first pass stats file (or you used the default settings or something), because the results of that 3rd test were screwy. Also, it's perfectly possible to do a 1 pass encode in Nandub, and as I said before, the results are the best possible when setting the DRFs to 2. My results were somewhat different:
Source-1000 frames (41 seconds) of a DVD with an .avs. The same .avs was used in all tests.
Test 1. 1 Pass with VDub.
DivX3.11 Lo-Mo Codec.
KeyFrame Spacing=10 seconds.
Crispness=100.
Bitrate=6000.
Final Size=15,430 KB
Number of Keyframes=5
Test 2. 1 Pass with Nandub
Bitrate min/max=1000/6000
Max Keyframe Int.=10 seconds.
Internal SCD=96% (Default).
Space Keyframes=24.
No Anti-Shit.
MBCM=0.
CC=0%.
No Lumi.
Smoother=0.
Crispness Modulation=0.
Guage Tab=Default.
DRF Min/Max=2/2.
Keyframe Qual. Min/Max=2/2.
Any settings not mentioned were left at default.
Final Size=15,432 KB.
Number Of Keyframes=7.
Test 3. 2 pass with Nandub.
All settings for second pass same as above-encode using the first pass Stats file.
Final Size=15,436 KB.
Number of Keyframes=7.
Test 4. 2 pass with Nandub.
All settings same as above EXCEPT:
DRF Min/Max=2/16
Keyframe Qual. Min/Max=2/16
Final Size=15,418.
Number of Keyframes=7.
Note: When viewing this one in DBGView, the second and third frames were at DRF 4 and 3 respectively and all the rest were at DRF 2. I don't know why that happened, but it explains the slight difference in size.
Conclusions:
1. Don't use 1 pass in VDub as there is no scene detection.
2. If size is no object and you want the best quality, use 1 pass in Nandub with DRFs set to 2. You'll get the same quality and filesize as when doing a 2 pass encode.
NeVeRLiFt
7th January 2003, 18:37
Nice work and I think its good to point out that the Nandub samples where the same size as the Virtualdub sample even thou they ended up with two more keyframes.
manono
7th January 2003, 19:39
Damn NeVeRLiFt-you must be mellowing out in your old age. :) But thanks. I was all set to have to defend my settings. It turns out there's no way I could find to save the .avi at the same time I created the stats file. So, I disabled all the "psychovisual" stuff to make the 1 pass avi as close as I could to the way both VDub and a first pass .avi do it.
I think its good to point out that the Nandub samples were the same size as the Virtualdub sample even though they ended up with two more keyframes.
Yes, I noticed that but didn't know quite what to make of it. Does that mean that the same frame as a P-Frame at DRF 2 is virtually the same size as it would be as an I-Frame at DRF 2? The file had 2 extra KB, or 1 KB per each extra keyframe.
hakko504
7th January 2003, 19:50
Originally posted by manono
Does that mean that the same frame as a P-Frame at DRF 2 is virtually the same size as it would be as an I-Frame at DRF 2?At a scene change this is certainly the case, it might even be a larger size with a P-frame.
^^-+I4004+-^^
8th January 2003, 02:57
>1. Don't use 1 pass in VDub as there is no scene detection
320 has it,and it works without glitches.....
320 has excellent SCD if you ask me.....
(and you don't but it's still ok..LOL!)
i've read somewhere that 320 puts too mayn KF's,bu ti didn't saw that either.....it puts them on scene changes and on VERY hi-motion scenes pretty densely,but that's not bad thing to do.....
[although on bitrate that high who cares about SCD?i doubt he will
see problems on scene changes on 6000kbit/s...so that's no argument for or against ND.... ]
NeVeRLiFt
8th January 2003, 19:33
Not real sure on this, just I knew key-frames added to the file size some. Maybe something else happened and it just handled the bits better during certain scenes?
I try to be calmer now a days and just share some info and help if I can. Dont push others unless I'm pushed first.
Happy the way the New Year is starting off... dude was found not guilty :) and development on alot of stuff is going good and I learned new ways to videocapture with iuVCR and a certain filter(Cyberlink deinterlace filter) allows you to capture and deinterlace on the fly with some stunning quality.
But I ramble now :D take it easy
JamesTKirby
9th January 2003, 15:57
Originally posted by manono
Hi-
Then you didn't encode the second pass using the first pass stats file (or you used the default settings or something), because the results of that 3rd test were screwy.
Interesting, I wonder what made you think I didn't use the first pass stats file (?)... I sure did, and the results (test #3) we're not "screwy". Nandub just used all DRFs I allowed it to (read up, 2-16 was the setting). When set to 2-2 (test #2) it only used DRF 2, as should be. I don't think it's "screwy" in Nandub's part to use all DRFs the user allows, although it could have listenened to the target kbps parameter a bit more closely ;)
Originally posted by manono
Conclusions:
1. Don't use 1 pass in VDub as there is no scene detection.
2. If size is no object and you want the best quality, use 1 pass in Nandub with DRFs set to 2. You'll get the same quality and filesize as when doing a 2 pass encode.
Anyway, thanks for the 1-pass Nandub tips.
Sure there is scene detection in VirtualDub, if you use the correct DivX codecs with scene detection added. I used it myself back when we had no SBC and VKI-MM4 was "the" stuff. Worked fine, although, as we know, SBC is superior to that method.
Cheers,
JTK
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.