View Full Version : Low Bitrate MAF Encodes using CCE and Tylo's 1 pass Plug-in
Barker
16th August 2003, 18:18
So other than the compressibility being bad, there is no other reason why I am getting really low Q factors on a 1:25 length film? And why does it look acceptable at that Q? I've seen Q32's that looked awful, even at higher bitrates.
Thanks for the tip, and the index DDogg.
Regards,
Barker
DDogg
16th August 2003, 19:26
So other than the compressibility being bad, there is no other reason why I am getting really low Q factors on a 1:25 length film? You are not, you are getting a real High Q factor. Was that a typo? I am surprised a Q 64 looks good to you, but I don't know your viewing setup. Also, I don't know the size of the Q32 pass. Would you still have that laying about? If not could you do a Q32 pass and report the size? I would be interested.
It may be that the source is dark and has a directors blur for a soft artistic look which would help a lot in sustaining a higher Q (IMO), or it may be that I am full of beans. Dunno yet. Maybe I can rent a copy to test with to find out more.
Barker
16th August 2003, 19:49
Yes, that was a typo, I meant high Q. Anyhow, the Q32 was 28,843 KB, but I was using a sample size of 3 which when you mentioned your sizes, I assume you were using lower. I actually got a Q 62 on an encode without the MAF, however, without the filters in the script, it seemed a lot blockier (more artifacts). Dunno, I'm new to this MAF method, so I may need to do more tests to get the big picture. It seemed to do the job well on this movie though, I wouldn't have thought I would ever get this on 1 CD.
Regards,
Barker
DDogg
16th August 2003, 19:56
Ah, heck, thanks for the prompt about the sample size. It was 1%. I edited that in on my post.I wouldn't have thought I would ever get this on 1 CD. Me neither :)
[/add] Barker, you may like the result of using the standard SemiAuto script with a few extra filter inserted. Turn on script editing and right before the import line towards the bottom add undot() and Deen() [edit: also add undot() after the import line] like this:
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
mpeg2source("C:\usual\DVD2AV~1.D2V")
DetectedTop=0 DetectedHeight=480
BlocksToCropHorizontal=2 BlocksToCropVertical=2 BlockOptimization=16
ResizeMethod=3 Bicubic_b_Value=0.0 Bicubic_c_Value=0.6
GammaCorrection=1.0 Hue=0 Saturation=1.0 Brightness=5.0 Contrast=1.0
DebugMode=0
DestinationWidth=480
DestinationHeight=480
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SimpleResize.dll")
Undot()#add this
Deen() #and this
Import("C:\Program Files\AviSynth 2.5 plugins\autocrop\SemiAutoCropAndResize.avs")
undot() #add this
Barker
17th August 2003, 16:03
Yeah, the Undot, Deen brought my Q value down to 56, Ill try encoding that, and compare the 2. Thanx for the tip.
Regards,
Barker
DDogg
17th August 2003, 16:45
I would be interested in your comparison. As Kwag and R6D2 discussed, the MAF may work better on hard high action while having the filters in place for all video (as above) may work better for slower paced source. I'm particurlly interested in how you gage the amount of contour noise on flat walls, sky and such.
fastchef
18th August 2003, 02:35
As Kwag and R6D2 discussed, the MAF may work better on hard high action
i'd agree with that 100%, as i encoded a high action movie, xmen and came out with a low Q . i used mpeg2dec version 1.10 lanczos resize
Settings:
- CD size : 800
- Number of CD's : 1
- Worst Q. factor : ---
+ One pass VBR Robshot/Bach : 1
- Sample percentage : 2.5
- Sample GOPs : 1
- Adjust Q. : 0.8
- Safety Zone : 34
- Q Weight : (714988777. / 39.8573705179283 - 17287296) / (18291600. - 17287296)
- Adjust Q : (27 + 1.0 - 0.64859649607761 - (0.8)) = 26.5514035039224
- Determined Q. : 26
Barker
19th August 2003, 00:40
I was suprised to see that undot and deen actually outperformed maf on this movie. It compressed better, had less artifacts (blockyness) and not as much halo effect in the sky compared to the maf script. It was a definate visual difference though(even on a TV screen), and i'm pleased with the outcome of using these 2 filters. I will try to get my hands on a noisier, high motion flick and give maf another shot soon.
Regards,
Barker
Holomatrix
19th August 2003, 12:33
Originally posted by DDogg
Ah, heck, thanks for the prompt about the sample size. It was 1%. I edited that in on my post. Me neither :)
[/add] Barker, you may like the result of using the standard SemiAuto script with a few extra filter inserted. Turn on script editing and right before the import line towards the bottom add undot() and Deen() like this:
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
mpeg2source("C:\usual\DVD2AV~1.D2V")
DetectedTop=0 DetectedHeight=480
BlocksToCropHorizontal=2 BlocksToCropVertical=2 BlockOptimization=16
ResizeMethod=3 Bicubic_b_Value=0.0 Bicubic_c_Value=0.6
GammaCorrection=1.0 Hue=0 Saturation=1.0 Brightness=5.0 Contrast=1.0
DebugMode=0
DestinationWidth=480
DestinationHeight=480
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SimpleResize.dll")
Undot()#add this
Deen() #and this
Import("C:\Program Files\AviSynth 2.5 plugins\autocrop\SemiAutoCropAndResize.avs")
So you've decided to do filtering before resize. Is this a quality or compressibility decision? Would you pull the same stunt with the MAF script?
DDogg
19th August 2003, 13:47
Is this a quality or compressibility decision? Both, in my mind. It is one of those things where, "I have always done it that way". It always made sense to me to apply filters to the source before it had been adulterated although it is certainly slower. My present machine is about equivalent to an XP 3200, so it does not hurt me as much as it would some.
Now that you mention it, when I get some time, I think I'll try filtering before resize in the MAF script. It can't hurt to try.
{/add: I edited in the second undot() after the import line in the script above. I normally do this and forgot to do so when I replied to Barker.)
Holomatrix
19th August 2003, 14:04
What do you do with noise added by the resizer, non-optimal filters and low bitrate encoding? Should we add more filters after resize as well?
DDogg
19th August 2003, 15:00
Frankly, I would ask Kwag and Dialhot's opinions on that as I know they have spent a tremendous amount of time on the subject. Ultimately it may well turn out that the optimum solution is a combination of Pre and Post filtering. Btw, r6d2, suggested an elegant way of setting this up in Gerti's semi-auto thread.
Now as to what those optimum pre and post filters are I haven't a clue yet. It may be that they have to be hand tailored for the individual source. If so, that is not very practical as it is too time consuming, except as an educational exercise in compression art.
DDogg
21st August 2003, 16:58
Advanced users only.
This script template is an odball combination of Gerti's Semi-Auto, HomiE FR's QMF and a few pre-filter settings from
the Kwag crew and a few other things I may have forgotten.
The template works for my 1 cd encodes very well and has dealt with some of my problem encodes and allowed
good quality on 1 cd. No guarantees or exorbitant claims. Try it, hope you like it, if not ...
As an example, on my present project Standard Semi-Auto and D2SRoBa gave me a final Q of 44. This script gave
me a Q31 and excellent video quality. See note below on CCE "flat image priority".
Btw, if you have installed the August 20 test build of Avisynth from CSV please go no further. Something is broken
when it comes to the Semi-Auto scripts or derivatives like this one.
To use this template you will need to get this file:
http://perso.wanadoo.fr/homie.fr/qmf-1.5b1.rar
from this thread:
http://forum.doom9.org/showthread.php?s=&threadid=56051&perpage=30&pagenumber=2
After you extract qmf-1.5b1.avs, you will need to rename it to qmf15b1.avs because of some kind of quirk in D2S. D2S does
not like the filename qmf-1.5b1.avs in a template.
Note that I saved qmf15b1.avs in C:\Program Files\AviSynth 2.5\plugins\QMF\
and I have SemiAutoCropAndResize.avs in C:\Program Files\AviSynth 2.5\plugins\autocrop\.
If you put it somewhere else, please remember to scroll down in the frameserver tab and change the path
to where you put it. While there, double check you have the correct path to SemiAutoCropAndResize.avs. If you get a picture
in the preview (conversion tab) you are good to go so exit D2S after the path changes so they will be changed. If you do not
have it setup correctly you will get a red on black error in preview.
IMO, raise the "flat image priority" to 25-30 in CCE (maybe even 40?). This better deals with
contour lines. I think this filter is already dealing with the mosquito noise pretty well.
[AVISYNTH_SemiAutoCropAndResize with HomiE FR QMF]
0=DetectedTop=^DetectedTop. DetectedHeight=^DetectedHeight
1=BlocksToCropHorizontal=^BlocksToCropHorizontal. BlocksToCropVertical=^BlocksToCropVertical. BlockOptimization=^BlockOptimization
2=ResizeMethod=^ResizeMethod. Bicubic_b_Value=^b_value. Bicubic_c_Value=^c_value
3=GammaCorrection=^GammaCorrection. Hue=^Hue. Saturation=^Saturation. Brightness=^Brightness. Contrast=^Contrast
4=DebugMode=^DebugMode
5=DestinationWidth=^TargetWidth
6=DestinationHeight=^TargetHeight
7=LoadPlugin(!SimpleResize.dll)
8=Import(!qmf15b1.avs)
9=Undot()
10=STMedianFilter(8, 32, 0, 0 )
11=# LOW MOTION FILTER FUNCTION
12=# -> STRONG TEMPORAL SMOOTHING (USING FLUXSMOOTH)
13=# -> SOFT SPATIAL SMOOTHING (USING UNFILTER)
14=function Low_Motion_Filter(clip c) { c = FluxSmooth(c,14,0) c = UnFilter(c,-10,-10) return c }
15=# MEDIUM MOTION FILTER FUNCTION
16=# -> MEDIUM TEMPORAL SMOOTHING (USING FLUXSMOOTH)
17=# -> MEDIUM SPATIAL SMOOTHING (USING FLUXSMOOTH AND UNFILTER)
18=function Medium_Motion_Filter(clip c) { c = FluxSmooth(c,7,7) c = UnFilter(c,-20,-20) return c }
19=# HIGH MOTION FILTER FUNCTION
20=# -> NO TEMPORAL SMOOTHING
21=# -> STRONG SPATIAL SMOOTHING (USING FLUXSMOOTH AND UNFILTER)
22=function High_Motion_Filter(clip c) { c = FluxSmooth(c,0,14) c = UnFilter(c,-30,-30) return c }
23=# APPLYING ADAPTATIVE SPATIO-TEMPORAL SMOOTHER (USING QMF)
24=QMF()
25=Import(!SemiAutoCropAndResize.avs)
26=undot()
27=Temporalsoften(2,3,3,mode=2,scenechange=6)
^DetectedTop.=6
^DetectedHeight=468
^BlocksToCropHorizontal.=2
^BlocksToCropVertical.=2
^BlockOptimization=16
^ResizeMethod.=2
^b_value.=0.0
^c_value=0.55
^GammaCorrection.=1.0
^Hue.=0
^Saturation.=1.0
^Brightness.=0.0
^Contrast=1.0
^DebugMode=0
!SimpleResize.dll=C:\Program Files\AviSynth 2.5\plugins\SimpleResize.dll
!qmf15b1.avs=C:\Program Files\AviSynth 2.5\plugins\QMF\qmf15b1.avs
!SemiAutoCropAndResize.avs=C:\Program Files\AviSynth 2.5\plugins\autocrop\SemiAutoCropAndResize.avs
Holomatrix
21st August 2003, 17:30
Just a quick note (2 cents), that using Bilinear resize seems to drop Q a few points as well, not sure if by doing so will blur the video to much but does give smaller file sizes. :)
DDogg
21st August 2003, 18:56
Yeah, I know, but I personally don't like the softer look it gives. It is almost fuzzy to me. Maybe for really worst case I would use it. People ought to try it to see if it fits their tastes. I noticed r6D2 has said he likes it.
Reader reference:
You would change it by setting ResizeMethod to 1 in the scrolling box in the Frameserver Tab.
ResizeMethod:
1 = Use BilinearResize
2 = Use BicubicResize with Bicubic_b_Value and Bicubic_c_Value
3 = Use LanczosResize
4 = Use SimpleResize
Anything but 2 disregards the Bicubic_b_Value and Bicubic_c_Value
r6d2
21st August 2003, 19:58
Originally posted by DDogg
[B]Yeah, I know, but I personally don't like the softer look it gives. It is almost fuzzy to me.
I really envy your eyes. I cannot tell the quality difference. Abiding KISS, just UnDot() and Deen() before Bilinear resize keeps my 1 CD encodings within reasonable time and quality limits.
How about speed with this one? About the same as MAF?
Holomatrix
21st August 2003, 20:16
seems to drop my speed about .32 CCE points :(
r6d2
21st August 2003, 20:44
Originally posted by Holomatrix
seems to drop my speed about .32 CCE points :(
From what value (unfiltered source)?
Holomatrix
21st August 2003, 21:25
I was just compairing the SemiAuto+MAF script (.66) to this SemiAuto+QMF script (.34)
DDogg
21st August 2003, 21:44
I get about 1.0 real time with this script on a 4:3. But I have a hopped up XP 1700 T-BRED-B JIUHB 0312 running a close equivalent to a XP 3200 (183x12)(not bad for a 48 dollar chip!) Eeek! Now I realize why you don't want an extra pass.
fastchef
22nd August 2003, 06:25
i've played a bit with HomiE FR's QMF on my athlonxp 2100, but doing 3 or 4 passes was a bit much(time factor and cpu usage)
so i'm definately up for a test of this QMF using the D2SRoBa plugin :)
DDogg
22nd August 2003, 14:12
fastchef, let us know what you find. I may be full of beans yet again, but it seems to work well for me.
fastchef
22nd August 2003, 15:41
it worked very well, looks good to my eye and low Q of 20. again, used mpeg2dec version 1.10
========================================================
D2SRoBa v2.4.4 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-08-21 22:37:40
--------------------------------------------------------
Settings:
- CD size : 800
- Number of CD's : 1
- Worst Q. factor : ---
+ One pass VBR Robshot/Bach : 1
- Sample percentage : 2.5
- Sample GOPs : 1
- Adjust Q. : 0.8
- Safety Zone : 34
+ Do credits bitrate tweak : 0
- Start time : 0:00:00
- Bitrate : 1000
--------------------------------------------------------
- Movie length : 01:37:12 (139848 frames, 23.976 fps)
- Audio size est : 93325326. bytes (128 + 0 kbps)
- CD user data size : 834286496. = (800 - 4)*1024*1024 - 380000
- SelectRangeEvery : every 600, select 15 frames
- Num. sample frames : 3510
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 721805594. (989 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 543591965. (Q=32, 745 kbps, 13643440 sample sz)
- Estimated mpv size : 821816972. (Q=16, 1127 kbps, 20626520 sample sz)
- Estimated mpv size : 645931218. (Q=24, 885 kbps, 16212020 sample sz)
- Estimated mpv size : 717959392. (Q=20, 984 kbps, 18019832 sample sz)
- Computed mpv size : 769888182. (Q=18, 1055 kbps, (Q20+Q16)/2)
- Estimated mpv size : 740233553. (Q=19, 1015 kbps, 18578884 sample sz)
--------------------------------------------------------
- Q Weight : (721805594. / 39.842735042735 - 18019832) / (19323176. - 18019832)
- Adjust Q : (20 + 1.0 - 7.40668545227281e-002 - (0.8)) = 20.1259331454773
- Determined Q. : 20
--------------------------------------------------------
Replace values in ecl file:
- opv_q_factor : 20
- opv_brate_max : 983 ==> 2530
- vbr_brate_avg : 6000 ==> 989
--------------------------------------------------------
- Encoding Movie
- 2003-08-21 23:18:02
--------------------------------------------------------
- Actual mpv file size:
08/22/2003 02:19 AM 699584772 Encoded_Video_CCE_NTSC.mpv
--------------------------------------------------------
jsquare
22nd August 2003, 16:32
The QMF script gives better results than MAF:
I just tried the QMF+D2SRoba 1-CD method with ST-Nemesis(Q=36) and DareDevil(Q=26) with very good image compared to MAF. There are only a couple of things that I don't like: CCE encoding speed dropped by .30 and it looks kind of blurry in some scenes, it needs more sharpness.
DDogg
22nd August 2003, 16:51
and it looks kind of blurry in some scenes, it needs more sharpness. Well you could easily alter or remove the temporalsoften statement, or maybe change to LanczosResize. If you do, let us know what that does to your encode. I expect your Q would go up a bit.
DDogg
22nd August 2003, 20:01
I just finished my 1cd test (problem) encode, The Usual Suspxts. Maybe all the study and 50 test encodes are a charm because it is close to perfect in all respects. No contour lines, no blocks, no mosquito noise. Encoding Q was 35 (down from 56) and the resulting VAF shows the average Q is under 6 with the max as 7.56. :cool:
Here are some settings to try if you want to play. They go against some of the common wisdom, but seem to work pretty well for this type of one CD encode, at least they did for me and are the result of a LOT of time spent trying to figure this out.
D2S settings:
Audio 128 Stereo
Semi-Auto with HomiE FR QMF
Matrix - CCE 2.62 Ultra Low Bitrate (we shall see)
Bias - 26 (odd, I know)
Max 2616 Min 300 (since you are using 128 audio)
CCE settings - Change "flat image priority" to 30
If you give these settings try, please let us know the results.
fastchef
23rd August 2003, 00:40
oh i forgot to say, i was getting speeds of .02 with cce 2.67 so i deleted this line:
10=STMedianFilter(8, 32, 0, 0 )
after that, speed was back to .50
also, i used the cce 2.6x standard matrix
jsquare
23rd August 2003, 00:53
Originally posted by DDogg
Well you could easily alter or remove the temporalsoften statement, or maybe change to LanczosResize. If you do, let us know what that does to your encode. I expect your Q would go up a bit.
Had the IQ Priority too high (45), took it back to 17 and it looks sharper, Lanczos increases Q and removing TemporalSoften makes people's faces like they have "rosacea"
My seetings:
CCE 2.67
Audio = 128kb Stereo
Semi-Auto with HomiE FR QMF
Matrix = CCE 2.50 Standard
Bias = 20
IQ Priority = 17
Max = 2500 Min = 300
r6d2
23rd August 2003, 01:27
I just finished a 1 CD encode of MIB with QMF stuff.
D2S settings:
Audio 96 Stereo
Semi-Auto with HomiE FR QMF (Bicubic)
Matrix - CCE 2.62 Standard
Bias - 20
Max 2530 Min 300
CCE settings - "flat image priority" to 25
Results: Q=32, CCE Speed 0.25
Previously, with KISS UnDot() & Deen() + Bilinear:
Q=35, CCE Speed 0.7
Visual quality comparison... Sorry, cannot tell a difference by just looking, even in full screen (and it's a 10% Q delta!)
DDogg
23rd August 2003, 06:26
r6d2,
1> Can you give us the what the Q would have been using straight Semi-Auto on MIB? (No filters). I suspect it might have already been fairly low to begin with. If so I don't think you would get a lot of additional help. Dunno for sure. I've only done two encodes with this setup.
2> I'm curious why you are using 2530 with 96 audio? 2646 might work better and give you more headroom?
r6d2
23rd August 2003, 07:43
Originally posted by DDogg
1> Can you give us the what the Q would have been using straight Semi-Auto on MIB? (No filters). I suspect it might have already been fairly low to begin with.
I knew you'd ask for that... So, it is ready ;) Q=39, speed 1.1
2> I'm curious why you are using 2530 with 96 audio? 2646 might work better and give you more headroom?
Sometimes when Audio and Video have a ratio too lower than 10% I get muxing errors or an image only my standalone can play, not PowerDVD.
I've left 2530 as my "default" attempting to fix that. No space is wasted, anyway, because the second pass uses it. I guess my bitrate curve is just a little flatter, like yours with that magic 26 bias parameter ;)
Regarding this QMF stuff, I tried it on a cartoon and it really improved it. I had given up with my standard KISS filters and had turned to CVD resolution. I tried QMF and kept the Q but with SVCD!
jsquare
23rd August 2003, 16:35
Bias=26 lowers the Q from 39 to 34 on VIKINGS at CVD resolution and using 128k Audio D2SRoBa SAmple=2.5% GOPs=3 Adj.Q=1 I got exactly 813MB, same as 2-Pass VBR but in 1/2 the time.
I removed the Undot, STMedianFilter and TemporalSoften lines and my speed went up from .67 to 1.07, I think QMF does a good job without those filters.
On the BlockOptimization settings if a choose 16 the preview on D2S seems to move towards the bottom, but if I choose 8 it aligns at the center, this is a wide screen movie and AutoDetectBorders reports Top=58 Height=362, if using CropH/V=2 then both Top=56 Height=360 are divisible by 8 but not by 16, don't know if this is correct but it looks logical to me.
r6d2
23rd August 2003, 16:44
Originally posted by jsquare
Bias=26 lowers the Q from 39 to 34 on VIKINGS at CVD resolution and using 128k Audio D2SRoBa SAmple=2.5% GOPs=3 Adj.Q=1 I got exactly 813MB, same as 2-Pass VBR but in 1/2 the time.
Which bias value gave you Q=39? If it was, for instance, 10, would you try something like bias=40?
I have the suspicion that increasing bias is just like lowering the Max, so you lower Q but artificially.
jsquare
23rd August 2003, 17:31
[QUOTE]Originally posted by r6d2
Which bias value gave you 39? If it was, for instance, 10, would you try something like 40?
BIAS=17/Q=39 and BIAS=26/Q=34 on Vikins, I'll try a higher BIAS on my next encode(TopGun) but I want to play with BlockOptimization settings and see if has anything to do with encoding speed and Q value.
r6d2
23rd August 2003, 17:36
Originally posted by jsquare
BIAS=17/Q=39 and BIAS=26/Q=34 on Vikins, I'll try a higher BIAS on my next encode(TopGun) but I want to play with BlockOptimization settings and see if has anything to do with encoding speed and Q value. [/B]
OK, please report the effect of bias on Q. I'd bet the higher you set it, the lower the Q. But you know, Q enforced by lower BR limits is not actually better quality, but exactly otherwise.
DDogg
23rd August 2003, 19:48
I don't yet understand what bias is really doing. DOes anybody have a good explanation?... so you lower Q but artificially. ???
r6d2
23rd August 2003, 21:04
Originally posted by DDogg
I don't yet understand what bias is really doing. DOes anybody have a good explanation? ???
AFAIK, bias is sorta "CBRness" slider. When close to 0, VBR is allowed to be loose and change rapidly from one frame to the next. When close to 100, output more like CBR is produced.
@DDogg, you remember the case of low Qs obtained by lowering the Max? Well, I think these two effects may be related. If CCE receives a high bias, it will not feel free to use all the variability available in VBR, producing more "forget Q" frames and making you believe the Q is low when actually is not.
homerjay
24th August 2003, 00:01
hi ddog & anyone else who might be reading
i have copied the [AVISYNTH_SemiAutoCropAndResize with HomiE FR QMF] and pasted it into my dvd2svcd.ini file
added all the loadplugin commands which i seem to need each time
but keep getting an error
i dont know what "ResizeMethod" means
E:\DVD2SVCD\Avisynth2.5 Plugins\autocrop\SemiAutoCropAndResize.avs, line82)
E:\DVD2SVCD\TEMP\preview.avs,line34
line 82 from SemiAutoCropAndResize.avs reads ( think might be out by a line or two )
(ResizeMethod == 4) ? SimpleResize(NewDestinationWidth, NewDestinationHeight) : NOP()
line 34 from preview.avs reads as below
Import("E:\DVD2SVCD\Avisynth2.5 Plugins\autocrop\SemiAutoCropAndResize.avs")
i did try to simplify by changing the resizemethod to 3 thinking it would eliminate two of the following parameters but it comes up with the same error so if anyone has any ideas why this is coming up with an error i would appreciate it
thanks
hj
DDogg
24th August 2003, 00:34
As said at the beginning of this thread, it is for advanced users and you must have Semi-AutoResize installed and working before trying ANY of this stuff (or posting in this thread). So let's find out if it is.
First, in the conversion tab load a source, go to the frameserver tab and select autodetectborders, go back to the conversion tab and do a preview. Do you see a picture with numbers on it? If not go to Gerti's thread and follow the installation instructions exactly and to the letter.
If you do have a preview picture, now select the standard Semi-autoResize in the Frameserver tab, go back to the conversion tab and see if you have a picture in preview. If not do as above.
Make sure you do the path in autodetect as instructed, and then exit dvd2svcd as instructed so that the path is saved. Do the same thing for the Semi-autoresize and exit again.
ONLY when you have verified you have Semi-Auto intalled properly should you attempt to add the QMF script. No shortcuts, ok? :) Oh, and BTW, don't think so much. There is not an error except in your installation. If you verify you have Semi-auto working properly, please come back and let us know how the QMF script worked for you. See you then.
jsquare
24th August 2003, 05:25
Originally posted by r6d2
OK, please report the effect of bias on Q. I'd bet the higher you set it, the lower the Q. But you know, Q enforced by lower BR limits is not actually better quality, but exactly otherwise.
I tried BIAS=1,25,50 and 100 on a testrun file from D2SRoBa just changing the BIAS value on the .ecl file, all tests came out with the same file size. So like you said "..lower Q but artificially" and in my case got it to work only once. I also tried lowering the OPV range from 300-2530 to 0-1850 and Q went down a bit but I didn't like the results.
Don't know about your guys, but as much as I want these 1-CD methods to work always get disappointed with the results, maybe because I keep comparing them with DVD or DivX quality, or most of my tests are played on a 55" HDTV and not on a standard TV. That's why I'm moving towards the idea of XSVCD(720x480) with 2-CDs, already encoded 4 titles using D2SRoba and BiCubicResize with very impressive results and they played fine on my home DVD player, only had one problem with sound when I increased the max bitrate to 3,500 and it went higher than 2,756(SVCD Standard) in some scenes. If your desktop DVD plays most of the formats and tests discussed on this forum it should have no problems with XSVCD.
homerjay
24th August 2003, 10:46
tiniest bit offended by your advanced user comment as i have been following the maf progress and posted in these threads previously but good advise so i will follow it through...
1 autodetect borders = working
2 standard semi autocrop and resize = working
3 MY_Semiautocropandresize_MA script(2.5.2) = working
4 SemiAutoCropAndResize with HomiE FR QMF = i get the same error as reported above
so without thinking ( i was going to remove script and re cut and paste) what should i do now
thanks
DDogg
24th August 2003, 13:57
homerjay, I did not mean to offend, just did not want this thread to become tech support. Tell you what, PM me the avs D2S generates that is giving you the problem. It has to be something simple. Assuming you downloaded the QMF script and removed the hyphen by renaming it and you have the right paths to it and to the semi-auto script and autocrop, it should give you no problems. I am sure we will be able to see it in your script.
homerjay
24th August 2003, 14:39
no offence was taken - i just thought you might have recognised me by now and your right it was slightly off topic so sorry ;)
but my solution which was odd was to include the loadplugex.dll at the begining of the script which i think means ive got a 2.0 plugin somwhere where i should have a 2.5
i will post a separate thread once ive found the original material regarding avisynth not needing to have loadplugin commands anymore that i thought i saw somewhere as i clearly have something set not quite right
thanks as always for looking and replying
hj :D
DDogg
24th August 2003, 15:09
I fixed the link on page one to Avalon's filter package or, better yet, go to WarpEnterprises great filter page and get 'em. http://www.avisynth.org/users/warpenterprises/
Oh, yeah, just for clarity's sake for anybody reading this, you do not need loadplugex.dll to do anything in this thread. If you do happen to use loadplugex.dll for anything else, make sure it is NOT in your 2.5 plugin directory. It has to reside in a separate directory and be hand loaded in the script. If not, all kinds of strange crashes and not so wonderful things will happen to CCE, VDub, MPlayer, etc.
http://forum.doom9.org/showthread.php?s=&threadid=49492&highlight=loadplugin+juanc
DDogg
27th August 2003, 23:31
Here is another set of params and a script to play with if anybody
is still interested (using CCE 2.67.00.1x:
CCE settings:
Video Button -
Lum - 16-235
Matrix - MUST! Either KVCD-Notch or CCE very low (Not ultra low - it seems to cause mosquito noise even though it
definately DOES make file size and Q lower (with CCE 2.67.00.11). Some may want to experiment)
Quality Button -
Quantizer Characteristics (flat panel Priority) - 30
IntraBlock DC precision - 10
Zigzag and progressive - Appropriate for your source. Both checked
if progressive.
D2S:
bitrate: Bitrate Min 0 Max 2616
Audio: Audio 128 Stereo
Encoder: Bias 20 (play with lower like 6 if you want)
http://nic.dnsalias.com/MPEG2Dec3v110.zip
Script (same as before except has BlindPP() I put it here to save you all having to renumber the script.
Hey, new version of D2S will do that automatically for you. Yeah!:
[AVISYNTH_SemiAutoCropAndResize with Homie FR QMF BlindPP]
0=BlindPP()#assumes you have Nic's mpeg2dec.dll v 10.0 See Avs devel forum
1=DetectedTop=^DetectedTop. DetectedHeight=^DetectedHeight
2=BlocksToCropHorizontal=^BlocksToCropHorizontal. BlocksToCropVertical=^BlocksToCropVertical. BlockOptimization=^BlockOptimization
3=ResizeMethod=^ResizeMethod. Bicubic_b_Value=^b_value. Bicubic_c_Value=^c_value
4=GammaCorrection=^GammaCorrection. Hue=^Hue. Saturation=^Saturation. Brightness=^Brightness. Contrast=^Contrast
5=DebugMode=^DebugMode
6=DestinationWidth=^TargetWidth
7=DestinationHeight=^TargetHeight
8=Import(!qmf15b1.avs)
9=Undot()
10=STMedianFilter(8, 32, 0, 0 ) #You may be able to rem this out for slower machines
11=# LOW MOTION FILTER FUNCTION
12=# -> STRONG TEMPORAL SMOOTHING (USING FLUXSMOOTH)
13=# -> SOFT SPATIAL SMOOTHING (USING UNFILTER)
14=function Low_Motion_Filter(clip c) { c = FluxSmooth(c,14,0) c = UnFilter(c,-10,-10) return c }
15=# MEDIUM MOTION FILTER FUNCTION
16=# -> MEDIUM TEMPORAL SMOOTHING (USING FLUXSMOOTH)
17=# -> MEDIUM SPATIAL SMOOTHING (USING FLUXSMOOTH AND UNFILTER)
18=function Medium_Motion_Filter(clip c) { c = FluxSmooth(c,7,7) c = UnFilter(c,-20,-20) return c }
19=# HIGH MOTION FILTER FUNCTION
20=# -> NO TEMPORAL SMOOTHING
21=# -> STRONG SPATIAL SMOOTHING (USING FLUXSMOOTH AND UNFILTER)
22=function High_Motion_Filter(clip c) { c = FluxSmooth(c,0,14) c = UnFilter(c,-30,-30) return c }
23=# APPLYING ADAPTATIVE SPATIO-TEMPORAL SMOOTHER (USING QMF)
24=QMF()
25=Import(!SemiAutoCropAndResize.avs)
26=undot()
27=#Deen() #Maybe for certain types of source.
28=Temporalsoften(2,3,3,mode=2,scenechange=6) #Need to check out dif settings
^DetectedTop.=0
^DetectedHeight=480
^BlocksToCropHorizontal.=2
^BlocksToCropVertical.=2
^BlockOptimization=16
^ResizeMethod.=2
^b_value.=0.0
^c_value=0.55
^GammaCorrection.=1.0
^Hue.=0
^Saturation.=1.0
^Brightness.=0.0
^Contrast=1.0
^DebugMode=0
!qmf15b1.avs=C:\Program Files\AviSynth 2.5\plugins\QMF\qmf15b1.avs
!SemiAutoCropAndResize.avs=C:\Program Files\AviSynth 2.5\plugins\autocrop\SemiAutoCropAndResize.avs
DDogg
29th August 2003, 01:21
I wanted to add a few points of clarification for any readers of this thread. What we are trying to do is trade
off a little sharpness and some quality to allow a 90 encode on 1 80 min CDr, but still get a pretty good looking encode. The
goal is to try to get Q into the low 30s with 30-32 being judged optimum.
If any of these scripts drop your Q way under 30 then you should probably remove some of the heavier filtering as
an argument could be made that A Q 20 with all these filters would NOT look better than a Q30 without them. The Q30 would
nearly certainly look crisper/sharper and better, but it is a subjective area and ultimately has to be judged by the
eyes of the beholder.
In the script above, for example, you might want to comment out (#) or remove the Stmedian and the
Temporalsoften filters. The QMF is still actually pretty heavy stuff and does a fair bit of softening itself.
Alternately you may want to try the MFA script at the start of this thread. It works hard to keep up a crisp look.
Another couple of scripts you may find to your liking:
(this one is pretty good - LOTR 2Twrs on 2 cds @Q31)
[AVISYNTH_SemiAutoCropAndResize BlindPP with ATC]
0=blindpp()
1=DetectedTop=^DetectedTop. DetectedHeight=^DetectedHeight
2=BlocksToCropHorizontal=^BlocksToCropHorizontal. BlocksToCropVertical=^BlocksToCropVertical. BlockOptimization=^BlockOptimization
3=ResizeMethod=^ResizeMethod. Bicubic_b_Value=^b_value. Bicubic_c_Value=^c_value
4=GammaCorrection=^GammaCorrection. Hue=^Hue. Saturation=^Saturation. Brightness=^Brightness. Contrast=^Contrast
5=DebugMode=^DebugMode
6=DestinationWidth=^TargetWidth
7=DestinationHeight=^TargetHeight
8=MergeChroma(blur(^blur_chroma))
9=MergeLuma(blur(^blur_luma))
10=undot()
11=Import(!SemiAutoCropAndResize.avs)
12=ATC()
13=undot()
^DetectedTop.=60
^DetectedHeight=354
^BlocksToCropHorizontal.=2
^BlocksToCropVertical.=2
^BlockOptimization=16
^ResizeMethod.=3
^b_value.=0.0
^c_value=0.6
^GammaCorrection.=1.0
^Hue.=0
^Saturation.=1.0
^Brightness.=0.0
^Contrast=1.0
^DebugMode=0
^blur_chroma=1.58
^blur_luma=0.1
!SemiAutoCropAndResize.avs=C:\Program Files\AviSynth 2.5\plugins\autocrop\SemiAutoCropAndResize.avs
or one of r6d2's favorites slightly modified - remove Deen() if too strong but leave the other stuff. Should be one of the faster ones
[AVISYNTH_SemiAutoCropAndResize KISS plus]
0=DetectedTop=^DetectedTop. DetectedHeight=^DetectedHeight
1=BlocksToCropHorizontal=^BlocksToCropHorizontal. BlocksToCropVertical=^BlocksToCropVertical. BlockOptimization=^BlockOptimization
2=ResizeMethod=^ResizeMethod. Bicubic_b_Value=^b_value. Bicubic_c_Value=^c_value
3=GammaCorrection=^GammaCorrection. Hue=^Hue. Saturation=^Saturation. Brightness=^Brightness. Contrast=^Contrast
4=DebugMode=^DebugMode
5=DestinationWidth=^TargetWidth
6=DestinationHeight=^TargetHeight
7=MergeChroma(blur(^blur_chroma))
8=MergeLuma(blur(^blur_luma))
9=undot()
10=Import(!SemiAutoCropAndResize.avs)
11=Deen()
12=undot()
^DetectedTop.=60
^DetectedHeight=354
^BlocksToCropHorizontal.=2
^BlocksToCropVertical.=2
^BlockOptimization=16
^ResizeMethod.=3
^b_value.=0.0
^c_value=0.6
^GammaCorrection.=1.0
^Hue.=0
^Saturation.=1.0
^Brightness.=0.0
^Contrast=1.0
^DebugMode=0
^blur_chroma=1.58
^blur_luma=0.1
!SemiAutoCropAndResize.avs=C:\Program Files\AviSynth 2.5\plugins\autocrop\SemiAutoCropAndResize.avs
or, second in size reduction only to Qmf in post above with Deen()IN. Remove Deen() for a very fast script[AVISYNTH_SemiAutoCropAndResize KISS plus W BlindPP]
0=BlindPP()
1=DetectedTop=^DetectedTop. DetectedHeight=^DetectedHeight
2=BlocksToCropHorizontal=^BlocksToCropHorizontal. BlocksToCropVertical=^BlocksToCropVertical. BlockOptimization=^BlockOptimization
3=ResizeMethod=^ResizeMethod. Bicubic_b_Value=^b_value. Bicubic_c_Value=^c_value
4=GammaCorrection=^GammaCorrection. Hue=^Hue. Saturation=^Saturation. Brightness=^Brightness. Contrast=^Contrast
5=DebugMode=^DebugMode
6=DestinationWidth=^TargetWidth
7=DestinationHeight=^TargetHeight
8=MergeChroma(blur(^blur_chroma))
9=MergeLuma(blur(^blur_luma))
10=undot()
11=Import(!SemiAutoCropAndResize.avs)
12=Deen()
13=undot()
^DetectedTop.=60
^DetectedHeight=354
^BlocksToCropHorizontal.=2
^BlocksToCropVertical.=2
^BlockOptimization=16
^ResizeMethod.=3
^b_value.=0.0
^c_value=0.6
^GammaCorrection.=1.0
^Hue.=0
^Saturation.=1.0
^Brightness.=0.0
^Contrast=1.0
^DebugMode=0
^blur_chroma=1.58
^blur_luma=0.1
!SemiAutoCropAndResize.avs=C:\Program Files\AviSynth 2.5\plugins\autocrop\SemiAutoCropAndResize.avs
manolito
19th November 2003, 23:41
It seems noone is interested in low bitrate encodes anymore. R6D2 calls himself a "Quality Guy", and DDogg hasn't posted anything about the latest filtering tricks for some time.
I have to admit that I am mainly a "Size Guy", I always try to squeeze a DVD to one CDR. I recently did some tests mainly with Avisynth scripts from DDogg's posts in this forum. Basically the results were as expected: More filtering, less crispness, lower Q, slower speed with one exception.
In one of his latest posts DDogg explained that he abandoned the QMF stuff in favor of just using the FACAR Preresize and Postresize functions with Undot, Asharp and Fluxsmooth in Preresize and Temporalsoften in Postresize. This really works very well, but I found one other filter setting that works even better for me.
I use the QMF functions of the latest FACAR with two modifications. The first modification is that I use Bilinear resize in all three motion bands in the QMFFunctions.avs. The second modification is that I changed the thresholds in the QMF15B1.avs according to a post by Jsquare.
----------------------------------------------------------------------
Changed Thresholds for QMF.AVS (by jsquare)
# SETTING MOTION LEVELS THRESHOLDS
threshold_lm = default(threshold_lm,(chroma == true) ? 1.0 : 2.0)
threshold_hm = default(threshold_hm,(chroma == true) ? 5.0 : 8.0)
# SETTING MIN/MAX SCENE CHANGE THRESHOLDS
threshold_sc_lm = default(threshold_sc_lm,(chroma == true) ? 10.0 : 20.0)
threshold_sc_mm = default(threshold_sc_mm,(chroma == true) ? 20.0 : 35.0)
threshold_sc_hm = default(threshold_sc_hm,(chroma == true) ? 35.0 : 50.0)
--------------------------------------------------------------------------
With these modifications my Q dropped by 5 compared to DDoggs Pre-and Postresize filters, and contrary to what I expected encoding speed was considerably higher. I did some test encodes with both filter settings, and the QMF encodes always looked a little better to me.
My other settings were according to DDogg's QMF Low Bitrate Benchmark post:
-----------------------------------------------------------------------------
D2S Settings:
Matrix - Bach1 (pasted in below)
Audio - 128 Stereo
Bias - 11
CCE 2.67 Settings (via Progressive template) If not mentioned then use default.
Video Tab:
M=3 N/M = 4
All unchecked except "Add sequence end code"
Luminance level 16-235
Quality Tab
All unchecked except zigzag, progressive, 10 bits, QC slider 28
-----------------------------------------------------------------------------
Maybe someone (DDogg ?) could do some tests with these settings and give me some feedback.
Another question: How good is the Bach1 (=God1) matrix compared to the KVCD notch matrix? I tried both, but I was unable to pinpoint any difference in quality.
DDogg
20th November 2003, 00:36
manolito, :goodpost:
I just got burned out and I think I burned out a lot of others :) It is good to see some of that stuff has helped somebody. I'm glad you mentioned jsquare's modification to the QMF thresholds. It was an area I had wanted to pursue when I had the energy again, but had forgotten. Seems like you have saved me a ton of digging!
OK, you got my compression juices juices going again. I'll give it a try next encode and report back to this thread. Just to save me more work, how about pasting in your Pre and Post scripts. Then I can really be lazy :)
As for as the Bach Matrix (he will kill me for even calling it that), it is all I use now for low bitrate stuff. I remember doing some freaking exhausting tests using 2% samples with nearly all the matrices. Of those, three emerged in my mind as contenders. JSquares, Kwag's Notch, and Bach's. JSquare's was a smaller file size by just a bit, but IIRC, there was something that I can't remember now that made me decide against it (for my use). Bach's was in the middle of the three size-wise and seemed the best compromise. Kwag's was good also, but filesize was slightly larger than Bach's on those test encodes.
One thing that emerged from those tests for sure was having the proper Matrix is absolutely needed for this low BR stuff (IMO). You can see that easily by doing a one or two percent sample at Q32 with all parameters exactly the same except the matrix. Then you can view each sample and make a quality judgment to compliment the filesize judgment. Smallest is not necessarily a better choice :rolleyes: You will see some fairly significant size variations. Even changing from 10 bits to 8 will cause a size variation as will the Q Characteristics.
r6d2
20th November 2003, 02:14
Originally posted by manolito
It seems noone is interested in low bitrate encodes anymore. R6D2 calls himself a "Quality Guy"
Just a precision: quality oriented guy ;) Me calling myself a "quality guy" would be presumptuous indeed.
and DDogg hasn't posted anything about the latest filtering tricks for some time.
Hehehe... He will now. The DVD2KVCD plugin got his fingers itching again :D:D:D
I am mainly a "Size Guy"
You're being presumptuous too ;)
jsoto
21st November 2003, 00:50
I am mainly a "Size Guy"
You're being presumptuous too :)
Funny.
For not Spanish speakers "manolito" means "Little Manuel"...
Sorry, we are in a serious forum.
@manolito
Wellcome to the forum. Only two until now, but very good posts.
jsoto
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.