View Full Version : Low bitrate Benchmark Template and settings
DDogg
6th September 2003, 01:22
Purpose of this is to establish a benchmark so that we can compare further work. At the time of post I believe
this represents the most efficient combination available for creating a high quality low bitrate encode in Dvd2SVCD using
CCE series 2.67. It balances compression, noise and block control, clarity, crispness, and as much
as possible, speed.
It would be great to be proven wrong and have a benchmark2 created! :)
To do that I would suggest you use this script and settings exactly as suggested in conjunction with the
D2SRoBa plugin one pass prediction for your first run. Set worse Q as 64 and then stop it after it finds the
final Q. This will leave you with a D2SRoBa Q32.mpv that you can rename so we can mutually compare and discuss.
Many factors intermix with one another in this setup, so any results will be invalid if you leave out
or change any settings for that first comparison run.
After that, knock yourself out and use that file to compare to as your benchmark. If you find something better
say how it is better in relationship to the Benchmark Q32 pass you kept and renamed from the first benchmark pass.
Use Nic's Mpeg2Dec3 v 10: http://nic.dnsalias.com/MPEG2Dec3v110.zip
Put in C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\Mpeg2dec directory
D2S Settings:
Matrix - Bach1 (pasted in below)
Bitrate - Min=0 Max=2616
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
Other Settings:
In frameserver tab set to edit script, always add IDCT=7 to the mpeg2source line.
Like this: mpeg2source("C:\rings\DVD2AV~1.D2V",idct=7)(I think this is ok for all CPUs)
Leave sizing method as bilinear as bilinear in combination with Asharp seems optimum and makes a smaller file
than other resizing methods without Asharp. Asharp helps both to fight macroblocks and gives a better level of crispness
and contrast (IMHO). It must be left this way for the benchmark Q32 file.
[AVISYNTH_Dvd2SVCD Low Bitrate QMF Benchmark-1]
0=#Now using r6d2's version of SemiAutoCropAndResize
0=#See SemiAuto Thread for details and new files
0=#Functions now are not on one line
0=#Changed ASharp params
0=DetectedTop=^DetectedTop. DetectedHeight=^DetectedHeight
1=OverscanH=^OverscanH. OverscanV=^OverscanV. BlockOptimization=^BlockOptimization
2=ResizeTo=^ResizeTo. 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=Import(!qmf15b1.avs)
8=Undot()
9=Asharp(1,4,2)
10=# LOW MOTION FILTER FUNCTION
11=# -> STRONG TEMPORAL SMOOTHING (USING FLUXSMOOTH)
12=# -> SOFT SPATIAL SMOOTHING (USING UNFILTER)
13=function Low_Motion_Filter(clip c)
14={
15=c = FluxSmooth(c,14,-1)
16=c = UnFilter(c,-10,-10)
17=return c
18=}
19=# MEDIUM MOTION FILTER FUNCTION
20=# -> MEDIUM TEMPORAL SMOOTHING (USING FLUXSMOOTH)
21=# -> MEDIUM SPATIAL SMOOTHING (USING FLUXSMOOTH AND UNFILTER)
22=function Medium_Motion_Filter(clip c)
23={
24=c = FluxSmooth(c,7,7)
25=c = UnFilter(c,-20,-20)
26=return c
27=}
28=# HIGH MOTION FILTER FUNCTION
29=# -> NO TEMPORAL SMOOTHING
30=# -> STRONG SPATIAL SMOOTHING (USING FLUXSMOOTH AND UNFILTER)
31=function High_Motion_Filter(clip c)
32={
33=c = FluxSmooth(c,-1,14)
34=c = UnFilter(c,-30,-30)
35=return c
36=}
37=# APPLYING ADAPTATIVE SPATIO-TEMPORAL SMOOTHER (USING QMF)
38=QMF()
39=Import(!SemiAutoCropAndResize.avs)
40=undot()
^DetectedTop.=60
^DetectedHeight=354
^OverscanH.=0.04
^OverscanV.=0.04
^BlockOptimization=0
^ResizeTo.=0
^ResizeMethod.=1
^b_value.=0
^c_value=0.6
^GammaCorrection.=1.0
^Hue.=0
^Saturation.=1.0
^Brightness.=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
Paste the matrix below in to bottom of matrices.ini in D2S directory
[Bach1 Matrix]
Intra=8,16,19,22,26,27,29,34,16,16,22,24,27,29,34,37,19,22,26,27,29,34,34,38,22,22,26,27,29,34,37,40,22,26,27,29,32,35,40,48,26,27,29,32,35,40,48,58,26,27,29,34,38,46,56,69,27,29,35,38,46,56,69,83
NonIntra=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44
fastchef
6th September 2003, 06:14
i think i got all the settings correct, the test was on a movie 152 mins long( a stretch for a 1 cd encode i know, but what the heck ;) )
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 2.5
- Adjust Q. : 0.8
- Sample GOPs : 1
- Safety Zone : 34
--------------------------------------------------------
- Movie length : 02:32:21 (219168 frames, 23.976 fps)
- Audio size est : 146258259. bytes (128 + 0 kbps)
- CD mpv data size : 764427928. (2007 kbps, 3 CDs)
- SelectRangeEvery : every 480, select 12 frames
- Num. sample frames : 5484
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 764427928. (669 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1000356768. (Q=32, 875 kbps, 25030828 sample sz)
- Estimated mpv size : 817369232. (Q=48, 715 kbps, 20452132 sample sz)
- Estimated mpv size : 759799026. (Q=56, 664 kbps, 19011616 sample sz)
- Computed mpv size : 788584129. (Q=52, 690 kbps, 19731874.=(Q56+Q48)/2)
- Computed mpv size : 774191577. (Q=54, 677 kbps, 19371745.=(Q56+Q52)/2)
- Computed mpv size : 766995322. (Q=55, 671 kbps, 19191681.=(Q56+Q54)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (764427928. / 39.964989059081 - 19011616) / (19191681. - 19011616)
- Adjust Q : (56 + (0.356765935949223) - (0.8)) = 55.5567659359492
- Determined Q. : 55
--------------------------------------------------------
Replace values in ecl file:
- opv_q_factor : 55
- opv_brate_max : 2616 ==> 2616
- vbr_brate_avg : 6000 ==> 669
--------------------------------------------------------
DDogg
6th September 2003, 15:49
Hey, fastchef, we have missed ya!
I was in a hurry yesterday and should have mentioned doing the first d2sroba run at 1%. This will give us a quick way to do the comparison. Also, as you said, that movie is a stretch as is a Q of 56.
Still, I wonder if you could take the time to do a couple of things. First is to report on the visual quality of the above encode when viewed on TV and the second is to do a CVD version and then compare the two for us. I doubt either will look great but that source of yours falls right at the far end of the equation and I would be very curious on how it looks. I think Q 40 is about the max for good quality and I tend toward the Q30-36 area for my stuff, but I noted some tests I did at higher levels were not all that bad.
I know this is a lot to ask, but it would help if you could do it.
/add:Gee, I just noted you said the source was 152 mins, not 1h52mins. Heck that is 2.5 hours! That is a little over the top, fastchef! :) 1h52mins would be a stretch by itself, much less 2.5 hours! But, 2.5 hours at a Q of 56 ain't bad at all and tells me the script is maximizing compression well. Now I would really be curious how it looks! Btw, to give you an idea of this scripts efficiency, lotr2t comes in on 2cds at Q21 and 1 cvd at Q47 although that would be a bit stupid :)
fastchef
6th September 2003, 20:27
Hey, fastchef, we have missed ya!
thanks Ddogg :)
it's totally watchable on the tv( the film is Harry Potter and the Philosopher's Stone). i went ahead and encoded the whole thing and it cut off the last 14 mins :/
so, i will try with cvd aspect ratio though i don't know if my player will play that format
edit:-
here's the log from the cvd encode, the Q is quite a bit lower @ 31. i'll find out in about 2 hours if the whole thing fits onto 1 cd or if it's over again
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 0.8
- Sample GOPs : 1
- Safety Zone : 34
--------------------------------------------------------
- Movie length : 02:32:21 (219168 frames, 23.976 fps)
- Audio size est : 146258259. bytes (128 + 0 kbps)
- CD mpv data size : 764427928. (2007 kbps, 3 CDs)
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 2196
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 764427928. (669 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 753447288. (Q=32, 659 kbps, 7549324 sample sz)
- Estimated mpv size : 1079836345. (Q=16, 945 kbps, 10819648 sample sz)
- Computed mpv size : 916641816. (Q=24, 802 kbps, 9184486.=(Q32+Q16)/2)
- Computed mpv size : 835044552. (Q=28, 730 kbps, 8366905.=(Q32+Q24)/2)
- Computed mpv size : 794245970. (Q=30, 695 kbps, 7958115.=(Q32+Q28)/2)
- Computed mpv size : 773846679. (Q=31, 677 kbps, 7753720.=(Q32+Q30)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (764427928. / 99.8032786885246 - 7549324) / (7753720. - 7549324)
- Adjust Q : (32 + (0.461717217709799) - (0.8)) = 31.6617172177098
- Determined Q. : 31
--------------------------------------------------------
Replace values in ecl file:
- opv_q_factor : 31
- opv_brate_max : 2616 ==> 2616
- vbr_brate_avg : 6000 ==> 669
--------------------------------------------------------
- Encoding Movie
- 2003-09-06 13:30:49 PST
homerjay
7th September 2003, 12:11
work in progress response
not to sure im doing the right thing to change cce settings set video as advised and on quality screen i have changed the following :
unticked low pass filter
left effect restricted vertical filter unticked
left dithered quantization unticked
changed Quantizer Characteristics to 28
changed intra block DC precision to 10
selected zig zag for block scanning order
progressive frame flag ticked
changed first line of your script to be
[AVISYNTH_Dvd2SVCD Low Bitrate QMF Benchmark-1]
set everything else as required
film duration 1hr53min27secs - might as well push this script ;)
source = PAL
skipped / canceled audio conversion to speed testing up
it started encoding - got to 6% droped out and d2sroba isnt kicking in :confused:
heres the created avs in case you can see something is missed
---AVS Begin---
LoadPlugin("E:\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL",idct=7)
mpeg2source("E:\DVD2SVCD\Movie\DVD2AV~1.D2V")
BlindPP()
DetectedTop=74 DetectedHeight=436
BlocksToCropHorizontal=2 BlocksToCropVertical=2 BlockOptimization=16
ResizeMethod=1 Bicubic_b_Value=0.0 Bicubic_c_Value=0.55
GammaCorrection=1.0 Hue=0 Saturation=1.0 Brightness=0.0 Contrast=1.0
DebugMode=0
DestinationWidth=480
DestinationHeight=432
Import("E:\DVD2SVCD\Avisynth2.5 Plugins\qmf15b1.avs")
Undot()
Asharp(1, 4)
# LOW MOTION FILTER FUNCTION
# -> STRONG TEMPORAL SMOOTHING (USING FLUXSMOOTH)
# -> SOFT SPATIAL SMOOTHING (USING UNFILTER)
function Low_Motion_Filter(clip c) { c = FluxSmooth(c,14,0) c = UnFilter(c,-10,-10) return c }
# MEDIUM MOTION FILTER FUNCTION
# -> MEDIUM TEMPORAL SMOOTHING (USING FLUXSMOOTH)
# -> MEDIUM SPATIAL SMOOTHING (USING FLUXSMOOTH AND UNFILTER)
function Medium_Motion_Filter(clip c) { c = FluxSmooth(c,7,7) c = UnFilter(c,-20,-20) return c }
# HIGH MOTION FILTER FUNCTION
# -> NO TEMPORAL SMOOTHING
# -> STRONG SPATIAL SMOOTHING (USING FLUXSMOOTH AND UNFILTER)
function High_Motion_Filter(clip c) { c = FluxSmooth(c,0,14) c = UnFilter(c,-30,-30) return c }
# APPLYING ADAPTATIVE SPATIO-TEMPORAL SMOOTHER (USING QMF)
QMF()
Import("E:\DVD2SVCD\Avisynth2.5 Plugins\SemiAutoCropAndResize.avs")
undot()
ConvertToYUY2()
Import("E:\DVD2SVCD\Movie\ResampleAudio.avs")
ResampleAudio(44100)
----AVS End----
13.29 think it didnt like the ,idct=7 retried without it and d2sroba started and then retried with it and stopped again - any suggestions ?
14.06 ok so not sure whether results are valid without idct=7 but my d2sroba log is included below
========================================================
D2SRoBa v2.5.1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-07 13:04:39
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 0.8
- Sample GOPs : 1
- Safety Zone : 34
--------------------------------------------------------
- Movie length : 01:53:34 (170371 frames, 25 fps)
- Audio size est : 327112320. bytes (384 + 0 kbps)
- CD mpv data size : 650817220. (1528 kbps, 2 CDs)
- SelectRangeEvery : every 1500, select 15 frames
- Num. sample frames : 1710
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 650817220. (764 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 430259507. (Q=32, 505 kbps, 4318480 sample sz)
- Estimated mpv size : 399. (Q=16, 4 kbps, 4 sample sz)
========================================================
D2SRoBa v2.5.1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-07 13:39:04
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 0.8
- Sample GOPs : 1
- Safety Zone : 34
--------------------------------------------------------
- Movie length : 01:53:34 (170371 frames, 25 fps)
- Audio size est : 327112320. bytes (384 + 0 kbps)
- CD mpv data size : 650817220. (1528 kbps, 2 CDs)
- SelectRangeEvery : every 1500, select 15 frames
- Num. sample frames : 1710
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 650817220. (764 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 709339559. (Q=32, 832 kbps, 7119584 sample sz)
- Estimated mpv size : 591766433. (Q=48, 694 kbps, 5939512 sample sz)
- Estimated mpv size : 639789933. (Q=40, 751 kbps, 6421520 sample sz)
- Computed mpv size : 674564746. (Q=36, 791 kbps, 6770552.=(Q40+Q32)/2)
- Computed mpv size : 657177339. (Q=38, 771 kbps, 6596036.=(Q40+Q36)/2)
- Estimated mpv size : 646717158. (Q=39, 759 kbps, 6491048 sample sz)
--------------------------------------------------------
- Q Weight : 1.0 - (650817220. / 99.6321637426901 - 6491048) / (6596036. - 6491048)
- Adjust Q : (39 + (0.60803139406411) - (0.8)) = 38.8080313940641
- Determined Q. : 38
--------------------------------------------------------
Replace values in ecl file:
- opv_q_factor : 38
- opv_brate_max : 2530 ==> 2530
- vbr_brate_avg : 6000 ==> 764
--------------------------------------------------------
- Encoding Movie
- 2003-09-07 14:00:56
--------------------------------------------------------
- Actual mpv file size:
07/09/2003 14:05 6201240 Encoded_Video_CCE_PAL.mpv
--------------------------------------------------------
- Estimation result: 9.e-003 ( 6201240 / 650817220.)
overall encoding time would have been 7 hours at a speed of 0.27 on my 1.2ghz athlon with 1% being 5,798 in size so well under requirement but on playback of the 32 and 39 both appeared on PC full screen to have slight fuzz around faces which was not present in my original convert using the [AVISYNTH_SemiAutoCropAndResize with HomiE FR QMF]script with resize method =3
have checked the scripts and the differences are
10=STMedianFilter(8, 32, 0, 0 ) instead of Asharp(1, 4)
and the addition of
27=Temporalsoften(2,3,3,mode=2,scenechange=6)
hope in the end this proves usefull
hj
jsquare
8th September 2003, 20:36
Hi DDogg,
Is there a particular reason why BlindPP is placed before the re-rizer, and not within the rest of the filters?
I can't see to find much info on BlindPP, but it does affect the value of Q a lot and even more so if placed at the end of the script.
DDogg
8th September 2003, 20:58
jsquare, actually I thought it had to be the next command after mpeg2dec as it is incorporated in mepeg2dec. Dunno why I did not think to try it elsewhere. Silly. Let me know what you find out. See if you can get a feel for how BlindPP is effecting quality on that big set of yours. Sometimes I think it makes no impact and sometimes I think it causes some grain.
I hope we can keep making progress toward that ultimate adaptive compression script. There are so may variables involved and it is SO time consuming, as I am sure you know :)
It is a shame Kiss can't handle motion artifacs as well as QMF as that would sure be a heck of a lot more simple. I wonder if incorporating Deen(xxxxx) into maybe the mid motion sector would be better or worse? Anyway, its your turn for a while, I am burned out a bit on the topic. Hopefully you can find the next progression.
jsquare
8th September 2003, 22:48
DDogg, I did tried BlindPP at different places on the script and also tested with Deen, but first here are my results using your script/settings, the only thing I changed was the bitrate to 0-2500 since my SA DVD has some audio issues with bitrates that peak above 2,750.
========================================================
D2SRoBa v2.5.1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-08 15:46:56
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 5.0
- Adjust Q. : 1.0
- Sample GOPs : 1
- Safety Zone : 34
--------------------------------------------------------
- Movie length : 02:16:21 (196155 frames, 23.976 fps)
- Audio size est : 130900901. bytes (128 + 0 kbps)
- CD mpv data size : 747566864. (1462 kbps, 2 CDs)
- SelectRangeEvery : every 300, select 15 frames
- Num. sample frames : 9810
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 747566864. (731 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 782931348. (Q=32, 765 kbps, 39155548 sample sz)
- Estimated mpv size : 652011302. (Q=48, 637 kbps, 32608044 sample sz)
- Computed mpv size : 717471325. (Q=40, 701 kbps, 35881796.=(Q48+Q32)/2)
- Estimated mpv size : 741397916. (Q=36, 724 kbps, 37078400 sample sz)
- Computed mpv size : 762164632. (Q=34, 745 kbps, 38116974.=(Q36+Q32)/2)
- Computed mpv size : 751781274. (Q=35, 735 kbps, 37597687.=(Q36+Q34)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (747566864. / 19.9954128440367 - 37078400) / (37597687. - 37078400)
- Adjust Q : (36 + (0.405881177009581) - (1.0)) = 35.4058811770096
- Determined Q. : 35
--------------------------------------------------------
Replace values in ecl file:
- opv_q_factor : 35
- opv_brate_max : 2500 ==> 2500
- vbr_brate_avg : 6000 ==> 731
--------------------------------------------------------
- Encoding Movie
- 2003-09-08 16:34:33
The Matrix is a highly compressible material as you already know since you tested and confirmed in another thread. It's also very flat as far as bitrate changes, I got exactly 813MB using Tylo's D2SRoBa and not the D2S internal RoBa. The video quality is fine as far as normal TVs goes and it's watchable on my 55".
jsquare
8th September 2003, 23:24
Now here are my other test-run results using a simple script with BlindPP, Deen and Undot, also used my "own" matrix (IntraShifted), which I don't know if I should call it my own, but for now until someone else claims their "copyright" it's free to use and modify by anyone.
Same material as before, The Matrix
QC=28
BIAS=30
Matrix=IntraShifted
The rest of the setings D2S default.
First script using LanczosResize, my favorite resizer as far as sharpness and clarity goes.
[AVISYNTH_LanczosResize with BlinPP UnDot Deen]
0=LanczosResize(^TargetWidth,^TargetHeight)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
2=UnDot()
3=BlindPP()
4=Deen()
5=UnDot()
D2SRoba log
========================================================
D2SRoBa v2.5.1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-08 13:54:54
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 5.0
- Adjust Q. : 1.0
- Sample GOPs : 3
- Safety Zone : 34
--------------------------------------------------------
- Movie length : 02:16:21 (196155 frames, 23.976 fps)
- Audio size est : 130900901. bytes (128 + 0 kbps)
- CD mpv data size : 747055533. (1461 kbps, 2 CDs)
- SelectRangeEvery : every 900, select 45 frames
- Num. sample frames : 9810
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 747055533. (731 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 699458178. (Q=32, 683 kbps, 34980932 sample sz)
- Estimated mpv size : 974306884. (Q=16, 952 kbps, 48726520 sample sz)
- Computed mpv size : 836882531. (Q=24, 818 kbps, 41853726.=(Q32+Q16)/2)
- Estimated mpv size : 746387891. (Q=28, 729 kbps, 37327956 sample sz)
- Computed mpv size : 791635211. (Q=26, 774 kbps, 39590841.=(Q28+Q24)/2)
- Computed mpv size : 769011561. (Q=27, 751 kbps, 38459399.=(Q28+Q26)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (747055533. / 19.9954128440367 - 37327956) / (38459399. - 37327956)
- Adjust Q : (28 + (0.970489219517577) - (1.0)) = 27.9704892195176
- Determined Q. : 27
--------------------------------------------------------
Replace values in ecl file:
- opv_q_factor : 27
- opv_brate_max : 2500 ==> 2500
- vbr_brate_avg : 6000 ==> 731
--------------------------------------------------------
- Encoding Movie
- 2003-09-08 14:15:32
--------------------------------------------------------
- Actual mpv file size:
09/08/2003 04:22 PM 728937872 Encoded_Video_CCE_NTSC.mpv
--------------------------------------------------------
- Estimation result: 0. ( 728937 / 747055533.)
Second test-run using Bilinear and BlindPP at the end of the script.
[AVISYNTH_BilinearResize with BlinPP UnDot Deen]
0=BilinearResize(^TargetWidth,^TargetHeight)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
2=UnDot()
3=Deen()
4=UnDot()
5=BlindPP()
D2SRoba log
Replace values in ecl file:
- opv_q_factor : 24
- opv_brate_max : 2500 ==> 2500
- vbr_brate_avg : 6000 ==> 731
--------------------------------------------------------
- Encoding Movie
- 2003-09-08 17:05:19
Third test-run using SACAR and Bicubic 0.6
[AVISYNTH_SACAR with BlindPP and Deen+Undot]
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(!SemiAutoCropAndResize.avs)
9=UnDot()
10=Deen()
11=Undot()
12=BlindPP()
^DetectedTop.=60
^DetectedHeight=360
^BlocksToCropHorizontal.=2
^BlocksToCropVertical.=2
^BlockOptimization=16
^ResizeMethod.=2
^b_value.=0.0
^c_value=0.6
^GammaCorrection.=1.0
^Hue.=0
^Saturation.=1.0
^Brightness.=0
^Contrast=1.0
^DebugMode=0
!SimpleResize.dll=V:\DVD2SVCD\Avisynth2.5 Plugins\SimpleResize\SimpleResize.dll
!SemiAutoCropAndResize.avs=V:\DVD2SVCD\Avisynth2.5 Plugins\AutoCrop\SemiAutoCropAndResize.avs
D2SRoba log
Replace values in ecl file:
- opv_q_factor : 26
- opv_brate_max : 2500 ==> 2500
- vbr_brate_avg : 6000 ==> 731
--------------------------------------------------------
- Encoding Movie
- 2003-09-08 17:37:31
Here is the ItranShifted matrix:
[IntraShifted]
Intra=8,16,19,22,26,27,29,34,16,16,22,24,27,29,34,37,19,22,26,27,29,34,34,38,22,22,26,27,29,34,37,40,22,26,27,29,32,35,40,48,26,27,29,32,35,40,48,58,26,27,29,34,38,46,56,69,27,29,35,38,46,56,69,83
NonIntra=16,19,22,26,27,29,34,37,16,22,24,27,29,34,37,38,22,26,27,29,34,34,38,40,22,26,27,29,34,37,40,48,26,27,29,32,35,40,48,58,27,29,32,35,40,48,58,69,27,29,34,38,46,56,69,83,29,35,38,46,56,69,83,99
DDogg
9th September 2003, 00:02
I wonder if you could state your conclusions on the test you made? My brain is a little fried.
but first here are my results using your script/settings, the only thing I changed was the bitrate to 0-2500 since my SA DVD has some audio issues with bitrates that peak above 2,750.This would be extremely valuable information, but you left out the exact same run but with your matrix. Without identical runs with only the matrices varied we don't get the data we need on the full effect of the different matrices. Scientific process and all that good stuff.
There is no doubt one can use filters such as Deen() to drop Q and filesize, however they can not deal with high action sequences the way an adaptive can. I don't think that fact can be argued with any merit as the nature of smoothing high action not only deals with blockage but also conserves bits for the lower action more important stuff like fleshtones and grey walls.
Something I am interested in and I think you would be too is below, but I do not yet know how to incorporate it into SemiAuto. Maybe r6d2 could help us. (this is from the avisynth docs)
# OPENING VIDEO SOURCE
mpeg2source("C:\rings\DVD2AVI_PROJECT_FILE.d2v")
# LOADING QUANTIFIED MOTION FILTER SCRIPT
Import("C:\qmf.avs")
# LOW MOTION FILTER FUNCTION
# -> SHARP RESIZING + TEMPORAL ONLY
function Low_Motion_Filter(clip c)
{
c = TemporalCleaner(c, 5, 10)
c = LanczosResize(c, 512, 272)
return c
}
# MEDIUM MOTION FILTER FUNCTION
# -> NEUTRAL BICUBIC RESIZING + TEMPORAL & SPATIAL
function Medium_Motion_Filter(clip c)
{
c = FluxSmooth(c, 7, 7)
c = BicubicResize(c, 512, 272, 0.00, 0.50)
return c
}
# HIGH MOTION FILTER FUNCTION
# -> SOFT RESIZING + SPATIAL ONLY
function High_Motion_Filter(clip c)
{
c = FluxSmooth(c, -1, 14)
c = UnFilter(c, -30, -30)
c = BilinearResize(c, 512, 272)
return c
}
# APPLYING ADAPTATIVE RESIZING FILTER (USING QMF)
QMF()
jsquare
9th September 2003, 00:44
WOW! That looks very promising, an adaptive script for both filters and resizers. If we(r6d2) manage to make it work it could be the ultimate script, no more "trial and error" test-runs and wasted CDs. I'm also getting a little burned-out too, but I keep coming back for more.
About my previous tests, my first post only included results from your original benchmark settings and Bach1 Matrix (Q=35). On the second post I used my own matrix plus D2S default settings except QC=28 and BIAS=30. As you noticed I placed BlindPP at different positions on the scripts, but I failed by not using the same resizer in more than one test therefore not showing the effects of BlindPP.
It's true Deen is not a good filter for fast motion scenes, it does help with lowering Q but that's about it, even using Undot the mosquito noise shows around people's faces and moving objects.
DDogg
9th September 2003, 03:03
Well it is not near as cool without SemiAuto, but it is a start.
[AVISYNTH_QMF SpecialResize]
0=BlindPP()
1=undot()
2=Import(!qmf15b1.avs)
3=# LOW MOTION FILTER FUNCTION
4=# -> SHARP RESIZING + TEMPORAL ONLY
5=function Low_Motion_Filter(clip c)
6={
7=c = TemporalCleaner(c, 5, 10)
8=c = LanczosResize(c,^TargetWidth,^TargetHeight)
9=return c
10=}
11=# MEDIUM MOTION FILTER FUNCTION
12=# -> NEUTRAL BICUBIC RESIZING + TEMPORAL & SPATIAL
13=function Medium_Motion_Filter(clip c)
14={
15=c = FluxSmooth(c, 7, 7)
16=c = BicubicResize(c,^TargetWidth,^TargetHeight,^b_value,^c_value)
17=return c
18=}
19=# HIGH MOTION FILTER FUNCTION
20=# -> SOFT RESIZING + SPATIAL ONLY
21=function High_Motion_Filter(clip c)
22={
23=c = FluxSmooth(c, -1, 14)
24=c = UnFilter(c, -30, -30)
25=c = BilinearResize(c,^TargetWidth,^TargetHeight)
26=return c
27=}
28=# APPLYING ADAPTATIVE RESIZING FILTER (USING QMF)
29=QMF()
30=undot()
31=AddBorders(0,^BorderTop,0,^BorderBottom)
!qmf15b1.avs=C:\Program Files\AviSynth 2.5\plugins\QMF\qmf15b1.avs
^b_value=0.0
^c_value=0.6
jsquare
9th September 2003, 03:38
DDogg, I guess we're working on the same thing mine looks like this:
[AVISYNTH_QMF]
0=Import(!qmf15b1.avs)
1=# LOW MOTION FILTER FUNCTION -> SHARP RESIZING + TEMPORAL ONLY
2=function Low_Motion_Filter(clip c) { c=TemporalCleaner(c, 5, 10) c = LanczosResize(c,^TargetWidth,^TargetHeight) c = AddBorders(c,0,^BorderTop,0,^BorderBottom) return c }
3=# MEDIUM MOTION FILTER FUNCTION -> NEUTRAL BICUBIC RESIZING + TEMPORAL & SPATIAL
4=function Medium_Motion_Filter(clip c) { c=FluxSmooth(c, 7, 7) c = BicubicResize(c,^TargetWidth,^TargetHeight,0.0,0.5) c = AddBorders(c,0,^BorderTop,0,^BorderBottom) return c }
5=# HIGH MOTION FILTER FUNCTION -> SOFT RESIZING + SPATIAL ONLY
6=function High_Motion_Filter(clip c) { c=FluxSmooth(c, -1, 14) c = UnFilter(c, -30, -30) c = BilinearResize(c,^TargetWidth,^TargetHeight) c = AddBorders(c,0,^BorderTop,0,^BorderBottom) return c }
7=# APPLYING ADAPTATIVE RESIZING FILTER (USING QMF)
8=QMF()
9=BlindPP()
!qmf15b1.avs=V:\DVD2SVCD\Avisynth2.5 Plugins\QMF\qmf15b1.avs
...but I noticed spikes on the birate while encoding, don't know how to debug these scripts yet(please let me know how),
so I decided to try Homies's original QMF, this one seems more stable. :
[AVISYNTH_QMF_Original]
0=Import(!qmf15b1.avs)
1=# LOW MOTION FILTER FUNCTION
2=function Low_Motion_Filter(clip c) { c = FluxSmooth(c,14,0) c = UnFilter(c,-10,-10) c = LanczosResize(c,^TargetWidth,^TargetHeight) c = AddBorders(c,0,^BorderTop,0,^BorderBottom) return c }
3=# MEDIUM MOTION FILTER FUNCTION
4=function Medium_Motion_Filter(clip c) { c = FluxSmooth(c,7,7) c = UnFilter(c,-20,-20) c = BicubicResize(c,^TargetWidth,^TargetHeight,^b_value,^c_value) c = AddBorders(c,0,^BorderTop,0,^BorderBottom) return c }
5=# HIGH MOTION FILTER FUNCTION
6=function High_Motion_Filter(clip c) { c = FluxSmooth(c,0,14) c = UnFilter(c,-30,-30) c = BilinearResize(c,^TargetWidth,^TargetHeight) c = AddBorders(c,0,^BorderTop,0,^BorderBottom) return c }
7=# APPLYING ADAPTATIVE RESIZING FILTER (USING QMF)
8=QMF()
9=BlindPP()
!qmf15b1.avs=V:\DVD2SVCD\Avisynth2.5 Plugins\QMF\qmf15b1.avs
^b_value=0.0
^c_value=0.50]
DDogg
9th September 2003, 04:22
Wilbert told me today that you can't have a function all on one line. I don't know what to think about that yet as I sure thought it was working ok. Gonna be REAL emabarrassing if it was not :)
jsquare
9th September 2003, 05:13
Not getting any errors so far, didn't know if by breaking the function into dif. lines it would work, so I left everything in one line.
Have you noticed one thing? on each function filtering is coming before resizing, don't you think it should be the other way around?
r6d2
9th September 2003, 21:03
Originally posted by jsquare
[B]WOW! That looks very promising, an adaptive script for both filters and resizers. If we(r6d2) manage to make it work it could be the ultimate script, no more "trial and error" test-runs and wasted CDs. I'm also getting a little burned-out too, but I keep coming back for more.
I have finished version 1.06.3 with QMF support. But my site is down. I'll come back with news as soon as I can.
DDogg
9th September 2003, 22:28
Looking forward to seeing it, r6d2! (although my tests with the basic version above did not show the results I expected)
jsquare, here is an interesting data point: lotr2t using a test filter all identical runs in CCE 2.67.00.11 with the exception of the matrix shift. I can't comment on video quality yet as this was a heavily filtered setup, but in a cursory inspection, could not see anything readily evident as to your matrix being inferior video wise.
D2SRoBa_Q32jsquare.mpv - 12,608 kb
D2SRoBa_Q32bach.mpv - 13,034 kb
D2SRoBa_Q32notch.mpv - 13,645 kb
/ADD: Here is something fun to play with. It is amazing how little is actually labeled as medium or high motion. It also proves the functions will work on one line:
mpeg2source("C:\rings\DVD2AVI_PROJECT_FILE.d2v")
Import("C:\test\myqms.avs")
function Low_Motion_Filter(clip c) { c = FluxSmooth(c,14,0) c = UnFilter(c,-10,-10) c = subtitle(c,"low") return c }
function Medium_Motion_Filter(clip c) { c = FluxSmooth(c,7,7) c = UnFilter(c,-20,-20) c = subtitle(c,"Medium") return c }
function High_Motion_Filter(clip c) { c = FluxSmooth(c,0,14) c = UnFilter(c,-30,-30) c = subtitle(c,"XXXXXXXX- High - XXXXXXXX") return c }
QMF()
converttoyuy2()
jsquare
10th September 2003, 01:14
@DDogg, that last script demonstrates that QMF is working but it seems like it's balanced to wards mid-low motion, and hardly uses the high motion function. As far as the resizing script, as you pointed out results were not as expected and is probably due to the fact that QMF's threshold may have to be adjusted.
r6d2
10th September 2003, 01:17
Originally posted by DDogg
Looking forward to seeing it, r6d2! (although my tests with the basic version above did not show the results I expected)
I mailed it to you. It will be long before I get a new site.
Keep on adjusting the thresholds!
Edit: If anybody else wants it, PM me indicating e-mail address.
r6d2
10th September 2003, 21:13
I found a bug in 1.06.3 (thanks DDogg).
I'll fix it and let you know.
(Sorry, folks, I e-mailed it to you with Bcc and I lost the e-mails (that's two bug in a row ;). I'll make it up to you.:D
r6d2
10th September 2003, 22:12
Originally posted by r6d2
I found a bug in 1.06.3 (thanks DDogg).
Fixed, FACAR 1.06.3a available.
To those interested: there was a problem with global variables.
PM me again with your e-mail. I promise not to delete the addresses this time ;)
Have to quit smoking.
Holomatrix
10th September 2003, 22:46
@r6d2 - check your PM :)
TRALALA
5th January 2004, 06:21
Originally posted by HomiE FR
What's this debug thing?
I have a few things to add about debug=true (a parameter which displays debug information over the video clip). When using debug=true, you should always look at the video clip (for instance inside VirtualDubMod) sequentially and in the right order (from past to future). Why? Because my scene change detection doesn't work on a 1-frame basis, but on a 5-frame basis. I won't go into the details here but if you want any information I'll be happy to answer.
@r6d2: what do you think about to add the debug to FACAR? Is it possible? For tests. :rolleyes:
Sorry my english. Thank :D
r6d2
5th January 2004, 11:59
Well, if Debug is a parameter of Homie's QMF, it should be straightfoward. Just edit the QMF files accordinly. Please report back if you run into trouble.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.