Log in

View Full Version : One-pass VBR or Multipass


luismota
19th November 2003, 23:53
Using the same average bitrate, and the same final file size, does the Multipass method achieve better quality than the One-pass VBR?

Thanks
Luis Mota

r6d2
22nd November 2003, 02:41
You may want to read the CCE manual. It is very illustrative.

DDogg
22nd November 2003, 16:05
Using the same average bitrate, and the same final file size, does the Multipass method achieve better quality than the One-pass VBR? Many of us now feel the quantizer based One Pass VBR (OPV) produces an equal or superior encode to that obtained via multiple bitrate based passes. Now that very accurate methods exist to predict finished filesize using OPV, IMO, it is the best way to go. An additional benefit is that you will know the quality of the encode for the given space allocated before you even do it.

bobwillis
24th November 2003, 19:24
Hi,

I tried D2SRoBa3 with CCE v2.50 and Private Ryan (Region 1).
I used Private Ryan because it produces easily visibly identifiable encoder artefacts.

I find the OPV result has significantly more 'mosquito' noise than 3 pass VBR. The other settings were identical (IQP=17, progressive, zig-zag, non-linear quant, Bitrate 900 min to 9000 max).

Bitrate Viewer confirmed my visual tests by showing an increased Q figure for OPV (9.53 for OPV, 8.82 for 3 pass VBR).

However, if I set D2SRoBa3 to do the additional resizing pass, output quality improved so that I was no longer visually able to tell the difference between 3 pass VBR (4 passes with .vaf) and OPV (which was really 2 passes). Bitrate viewer then stated that the OPV had a slightly smaller (8.61 v 8.82) Q factor.

IMHO, I'm not convinced OPV is the way forward for DVD (if true OPV is used without the resizing pass, it is certainly visually worse than conventional 3 pass VBR).

I would be interested in hearing about other people's tests using D2SRoBa3 for DVD purposes.

If you think I've screwed my settings up, or would require more info, please post.

Regards,
Bob

OPV without resizing pass D2SRoBa3 log (looked awful):
--------------------------------------------------------

D2SRoBa v3.0 RC3
- Author: Tylo
- System: WIN_XP, AutoIt: 3.0.74.0
--------------------------------------------------------
- 2003-11-24 09:08:38
--------------------------------------------------------
Settings:
- Output type : DVD
- CD size : 4480
- Number of CD's : 1
- Sample percent : 2.0
- Auto Q. (worst) : 40
- Maximum Q. : 50
- Adjust Q : 1.0
- Sizing pass : on=0 (-0.0 .. 0.0)%
- Audio after video : on=0 (% of video, 10%, min 128 kbps)
- Adjust max br : on=0 (total 2754 kbps)
- Batch prepare : on=0
- Crash recover : No
--------------------------------------------------------
- Waiting for CCE window ...
- Detected a CCE encode window
- Detected the CCE main movie encode window... trying to kill it.
- Finished shutdown of CCE and D2S
--------------------------------------------------------
- Movie length : 02:49:27 (243766 frames, 23.976 fps)
- D2S audio setting : (192 + 0) kbps
- D2S video estim. : 3152 kbps, 1 CDs
- Select Ranges : every 600, select 12 frames
- Sample frames : 4884
--------------------------------------------------------
Calculations:
- 1 CD: video_br=3216 (3216) audio1_br=128 video_sz=4087167668. fill=100.0% cbr=0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv BR : 3216 (max 9000) kbps, size=4087167668. bytes
--------------------------------------------------------
Search for Q:
- Estim. mpv BR : 6880 (Q=21, err=113.9%, size=8744546445., sample sz=175202304.)
- Estim. mpv BR : 2898 (Q=89, err=-9.9%, size=3683424446., sample sz=73799648.)
- Estim. mpv BR : 3040 (Q=84, err=-5.5%, size=3864094781., sample sz=77419488.)
- Estim. mpv BR : 3224 (Q=78, err=0.2%, size=4097737605., sample sz=82100664.)
- Determined Q : 77 = round(78 - 1.0 + (0.2)/1.0)
--------------------------------------------------------
- Encoding Movie
- 2003-11-24 09:35:13
- Actual mpv file size:
24/11/2003 11:12 3874521328 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 94.8% on target ( 3874521328 / 4087167668.)
--------------------------------------------------------
- Recover:
- 2003-11-24 11:12:51

DDogg
24th November 2003, 22:05
Determined Q : 77 Good clear post, bobwillis. I've never heard anybody say they could see a significant difference so I was puzzled at first by your post.

Then I saw the Q of 77. Wow! Just shows again what a beast SPR is to encode. Any Q over 40 is a no no with OPV. A Q32 or better is the desirable target. These are normally easily obtainable even on SVCD. Given the high bitrate you specified for DVD I am even more puzzled and wonder if the multi-pass has acceptable quality?

I wonder if you could do a similar test with just about any other source. I am assuming that the high Q you witnessed is just because of the odd nature of SPR and you would normally never see that on any other source. When I see something like that I would stop the encode, introduce a very light filter like fluxsmooth (5,5) perhaps or C3D preset movieHQ, and do a restart. I don't think you could possible notice any effect on the video with your eyes, but the encoder will sure respond much better to a source like SPR.

I'm still astounded by that high Q. I wonder if I missed something in your log. If you have it laying around, it would be great if you could post your script.

BTW, Did you have multiple audio tracks? An average BR of 3216 seems a bit on the low side, but I remember SPR is very long.

bobwillis
24th November 2003, 23:11
Thanks for the reply DDogg,

So the high Q of 77 is responsible; this makes sense. I only selected the standard DD 5.1 audio track. The total VOB file size is 6.65GB.

The 3 pass VBR encode does have defects; but they are less severe. You ask "Is the multi-pass acceptable"? It is certainly watchable and far better than DVDShrink v3b5 or ICv7/8; so I find it satifactory since I have nothing better to compare it with. How do I try a filter like you suggest? Do these filters come bundled with DVD2SVCD?

I will try another source sometime this week; and let you know the Q. For testing encoders or transcoders, I always use very long films (or very large films) that require high compression levels. The reason I do this is so I can visually see the defects. With 'average' length films (5-6GB) and 3 pass VBR, I cannot see any defects with my 32" television; thus they are not much use (to me) for testing.

Do you think the 2 pass (with D2SRoBa) is better quality than 3 (really 4) pass VBR - I couldn't discern any difference?

Here is the avisynth script file you requested:
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
mpeg2source("C:\ryan\source\DVD2AV~1.D2V")
BilinearResize(720,480)
Import("C:\ryan\video\ResampleAudio.avs")
ResampleAudio(44100)
ConvertToYUY2()
SelectRangeEvery(600,12)

I still have every file from this test; so if you require more info (or I have posted the wrong script file); please specify the filename and I will post it.

Thanks once again,
Bob

DDogg
25th November 2003, 00:09
If you can run the SPR test again, you might try checking "Edit script video Encoding" in the D2s frameserver tab. Before CCE starts, an edit window will pop up. Edit the script adding the line below. You will have to make sure you download and place these filters in your avisynth plugin directory. See Warpenterprises website for filters.

These are very light filters, but I think you will see a significant drop in "Q". Instead of just pressing OK in the edit window, press save instead. Now go to your working directory and make sure "AviSynth_Script_file.avs" will play in VDub or WMP. If not you may need to check your typing, or make sure the proper filter is in your plugin dir. If it "plays" ok, meaning you see video and not a red on black error, then press OK and the process will start.

LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
mpeg2source("C:\ryan\source\DVD2AV~1.D2V")
undot()
fluxsmooth(5,5)
BilinearResize(720,480)
TemporalSoften(3,5,5,10,2)
# The next three lines are automatically added after script editing
# so don't worry about them
Import("C:\ryan\video\ResampleAudio.avs")
ResampleAudio(44100)
ConvertToYUY2()
SelectRangeEvery(600,12) #This is from one of your sampling test scripts. This will not be in the script you edit.

bobwillis
25th November 2003, 00:39
Hi DDogg,

Thanks for the above. I will try sometime tomorrow evening. Do I just need the .dll file for each plugin in the plugin directory? - I'll try that.

Warpenterprises website claims that TemporalSmoother is now built into mpeg2dec.dll.

In the meantime, you were correct. I have just tried the film 'The ring'. This is 1 hr 55 mins long; source VOB size 6.57GB. D2SRoBa3 has determined an ideal Q of 9. That is a big difference from 77!

I will report later with SPR results.

Thanks again,
Bob

DDogg
25th November 2003, 01:15
Do I just need the .dll yep, in your plugins dirTemporalSmoother is now built into mpeg2dec.dll. Note the line is TemporalSoften which is built in to avisynth. BTW, that filter line alone will do quite a lot for you, but if you use it by itself you might want to put it before the resize line.D2SRoBa3 has determined an ideal Q of 9 I doubt you could ever tell the dif between OPV Q9 without a resizing pass, and any flavor of multipass (IMO).

bobwillis
25th November 2003, 02:02
Hello again DDogg,

Firstly thanks for all the newbie help. Sorry about the soften/smoother typo - it's getting late. I've copied your example script (added the additional 3 lines in the places you suggest). I've got the 2 plugin dlls in the plugin directory.

I couldn't play the avs file in Windows Media Player - it couldn't find or download a suitable codec. However, I continued by clicking ok after save and was able to play the resultant .mpv files in WMP after renaming them to .mpg. The CCE speed dropped from 1.7 to 0.55 (so I assume the filters are doing their job).

However, Q has only dropped to 66; still it is an improvement.

My script file:

LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
mpeg2source("C:\ryan2\source\DVD2AV~1.D2V")
undot()
fluxsmooth(5,5)
BilinearResize(720,480)
TemporalSoften(3,5,5,10,2)

Import("C:\ryan2\video\ResampleAudio.avs")
ResampleAudio(44100)
ConvertToYUY2()

--------------------------------------------------------
D2SRoBa v3.0 RC3
- Author: Tylo
- System: WIN_XP, AutoIt: 3.0.74.0
--------------------------------------------------------
- 2003-11-24 23:42:55
--------------------------------------------------------
Settings:
- Output type : DVD
- CD size : 4480
- Number of CD's : 1
- Sample percent : 2.0
- Auto Q. (worst) : 40
- Maximum Q. : 50
- Adjust Q : 1.0
- Sizing pass : on=0 (-0.0 .. 0.0)%
- Audio after video : on=0 (% of video, 10%, min 128 kbps)
- Adjust max br : on=0 (total 2754 kbps)
- Batch prepare : on=0
- Crash recover : No
--------------------------------------------------------
- Waiting for CCE window ..
- Detected a CCE encode window
- Detected the CCE main movie encode window... trying to kill it.
- Finished shutdown of CCE and D2S
--------------------------------------------------------
- Movie length : 02:49:27 (243766 frames, 23.976 fps)
- D2S audio setting : (192 + 0) kbps
- D2S video estim. : 3152 kbps, 1 CDs
- Select Ranges : every 600, select 12 frames
- Sample frames : 4884
--------------------------------------------------------
Calculations:
- 1 CD: video_br=3216 (3216) audio1_br=128 video_sz=4087167668. fill=100.0% cbr=0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv BR : 3216 (max 9500) kbps, size=4087167668. bytes
--------------------------------------------------------
Search for Q:
- Estim. mpv BR : 6314 (Q=21, err=96.3%, size=8025340516., sample sz=160792576.)
- Estim. mpv BR : 2853 (Q=79, err=-11.3%, size=3626831604., sample sz=72665776.)
- Estim. mpv BR : 3986 (Q=49, err=23.9%, size=5066231302., sample sz=101505024.)
- Estim. mpv BR : 3157 (Q=69, err=-1.8%, size=4012348830., sample sz=80389848.)
- Estim. mpv BR : 3188 (Q=68, err=-0.9%, size=4051616518., sample sz=81176600.)
- Estim. mpv BR : 3219 (Q=67, err=0.1%, size=4092167122., sample sz=81989056.)
- Determined Q : 66 = round(67 - 1.0 + (0.1)/1.0)
--------------------------------------------------------
- Encoding Movie
- 2003-11-25 00:48:32

I'm leaving the process running overnight (I'm going to bed now). I will report tomorrow evening with my visual tests.

Thanks once again for all the help - much appreciated.

Regards,
Bob

DDogg
25th November 2003, 03:15
Your Q still sounds too high. SPR is difficult, but should not present a problem on a single sided DVD (I have not done it on DVD so that is just conjecture on my part). Maybe next week after Thanksgiving holidays I'll try it again.

Q66 will still be poor (but better than you had). I had hoped the filters would help more than that, but none of the rules apply to SPR. It is just a iron plated PITA. If you really want to try knocking it around, change the fluxsmooth line to Deen(). That's emergency strength stuff when you have no other option and its slooooowww.

yingx2
25th November 2003, 07:50
Hi, bobwillis

I don't use D2SRoBa3 so I'm not sure if I understand your log file correctly.
When you said your OPV encode "has significantly more mosquito noise", did you also find that it was much smaller than the 3-pass one?

If so, you don't have to worry too much about this because it simply means the Q factor predictability is not perfect(100% size predictability accuracy is not possible for 1-pass vbr or we don't need mutilpass) so the program may produce under or oversized files thus the quality varies.

The truth is, the multipass system always "tries" to generate a video stream of constant quality while repecting a given average bitrate. The more passes you run, the more contant the quality will be. And a true costant quality encode must be done within a fixed quantization scale, which is exactly what OPV does for you. Unless CCE implements a slower(more accurate) motion-search engine for its multipass encoding, you can always ecpect OPV and multipass to produce very similar results at the same bitrate. But theoretically an OPV encode should be more visually consistent, which is good.

bobwillis
25th November 2003, 13:52
Hi DDogg,

A Q of 66 has improved things slightly, but I still think there is a quality difference between it and 3 pass VBR. I'd be very appreciative if you would have a go with SPR (sometime after thanksgiving - have a nice holiday), and post your results / thoughts in this thread.

@yingx2.

The difference in size between OPV & 3 pass VBR was neglible (2.6% or 115MB). I don't think this difference accounts for the quality difference between the two.
Don't get me wrong, even though I haven't proven it, I believe in the theory of a single pass quantized based encode being better than a multi-pass VBR.

However, this experiment suggests that OPV will only be as good (or better) than multi-pass VBR if the determined Q-factor is low enough. If the Q-factor isn't low enough, then mult-pass VBR will yield better results. That shall be my conclusion (for the time being).

Regards,
Bob

r6d2
25th November 2003, 16:28
Originally posted by bobwillis
A Q of 66 has improved things slightly, but I still think there is a quality difference between it and 3 pass VBR.
n-pass VBR sort of converges to OPV. In tight BR situations (Q>40), more passes will have more time to spoil the encode where you won't notice.

It is always about bitrate. The higher the BR, the better the quality. Q=66 is bad indeed. You can compare the BR Viewer results and I guess you'll find that they are high in both encodes. I personally use a Q that yields at most 5 as average. (BR Viewer is not too precise, so don't consider a encode better than other based just on a simple average report).

If you don't want to use Q below 40 (30 to 35 are reasonable quality values), you will always find that multipass is better that OPV. See the CCE manual for details. Only with Q below 40 quality is really important to the encoder.

So, the problem is that SPR will not fit with low Q on 1 single sided DVD without cropping and filtering. You can try DDogg's suggestions, he has done some extensive research on the subject.

You might also want to try cropping the overscan with FACAR and save BR for more quality (You might use the preresize filtering defaults).

But don't blame it on OPV. It is the high Q the one that is spoiling your encode.

Hope this helps.