Avisynth: CQ Matic static script?
I saw you posted a static script in the CQ Matic section of the forum. To not be totally off topic I decided to post my questions here instead.
The script you posted was this: Quote:
Can't wait for your reply! :) P.S. I will be away for a couple of hours (cover band gig) but I will rejoin the forum after we're done. :wink: |
Sorry for the delay :-)
I also had good impact on the CQ for a couple of encoding a did with this script. The only fear I have is that usually a gain in CQ is the result of a loss in details. It seems in this case that it is not the case. So the script seems quite good. Now, if you had too much filter after that perhaps it will be "too much". I'm pretty sure you can had a blur on the chroma, but a blur on the luma... I don't know. That have to be tested :-) Note: you can also use BicubicResize insteed of LanczosResize. You will gain 1 or 2 point on your CQ. |
I'm back...
Okay, guess I will be up all night testing then :) Yes, I really think your static script preserves the details very well! Surprisingly well, in fact. I will try encoding with both MergeChroma and MergeLuma just to see how it turns out. While I'm at it, do you use 2000 for max. bitrate and 300 for min. bitrate with the script (480x576 resolution). And do you use CalcuMatic to get the average bitrate for CQMatic? Sorry to bother you with all these questions, but I got VERY excited when I tried the script. |
Hi audioslave,
I wouldn't use anything less that 2,500Kbps, if I'm not using the MA script. With a static script, you won't gain compresion on high speed scenes, and you will have some visible macro blocks if you use a MAX of 2,000Kbps. If you use the MA scrip, or a combination of dialhot's script with some MA lines included, then you can lower your MAX to 2,000Kbps. -kwag |
Good evening kwag! Glad to see someone else but me is awake at this late hour (03:02 in Sweden). Okay, then I have to change the bitrate coz I did a test encode with 2000 MAX and I did get some blocks. Not much, but they were clearly there.
|
Try something like this:
Code:
BlindPP(cpu=4) -kwag |
Great! Thanks a lot. Will try it right away. :wink:
|
Quote:
1 PAL 25fps 544*576 1h28 min=64 max=2300 CQ=79 (:!:) 1 NTSC 23.976fps 480*480 1h38 min=64 max=2200 CQ=71 (I used 3:2 pulldown while playback for this one) For both of them I used calcumatic for finding the average setting for an audio bitrate of 128 kb/s and a target size of 807 MB. CQmatic found the correct CQ and gave me two movie of 796 and 802 MB in near 5 hours for each movie (on a P4 1.3Ghz). Smart, quick and perfect :-) |
Hmmm, "Parse error: string missing closing quotation mark (line 11, column 46)"...???
Quote:
|
Quote:
Something like : Code:
STMedianFilter( 3, fmin(32,round(3/nf)), 1, 1 ) |
:oops: Sorry :!:
Wrong Cut&Paste :x Try this: Code:
## Test script ## |
Quote:
-kwag |
Quote:
Quote:
|
So, kwag, the script should look something like this?
Quote:
|
Yes. that should do it.
It's too much filtering for me :mrgreen: But if you really want to cram the most "Bang for the buck" ( :lol: ), that should squeeze the crap out of your movie :D -kwag |
Quote:
1/ C3D and STMedianfitler are quite the same filters. Really don't need both. 2/ try temporalcleaner insteed of temporalsoften. I find it faster and smarter. (use TemporalCleaner(round(5+nf), round(11+nf)) 3/ Normally the last converttoRGB24 is useless. Try without it and let see if TMPGEnc does not complain. All is matter of codecs installed on your PC. I never use it ! 4/ Your borders aren't block aligned : you aren't in the best configuration and your CQ suffer from this. EDIT: 5/ use Bicubic precise if you want to raise a little your CQ |
:D It might be too much for me too. But what the hell, that's a price you'll have to pay for squeezing The Matrix Reloaded (PAL) onto 1 CD-R! :wink:
|
You should also try a CD90min : 100 MB more for your movie :-)
|
Yes, that would be fantastic. But my burner doesn't support 90-99min CD-R's :cry:
|
Dialhot wrote
Quote:
What do you mean with "Your borders aren't block aligned : you aren't in the best configuration and your CQ suffer from this." How do I correct this? |
Quote:
The borders are not divisible by 16. Where did you get the 137 from :?: -kwag |
I loaded the d2v file into TMPGEnc and then went to clip frame. I cut the borders out and then entered the numbers in MovieStacker.
Kwag, what codec do I need to be able to run the script without having to use ConvertToX()? EDIT: Downloading FFdshow right now. Hopefully this codec will solve the issue. EDIT 2: Nope, didn't work... :cry: |
Can this thing be related to that I demuxed the VOB's in DVD2AVI as RGB? Shall I demux as YUV instead?
|
@ AudioSlave
To gain 2-3 CQ points try : min - 100 & and max - 2500 ( as DialHot suggested ) U'll get CQ close to 60 or even more :wink: :wink: :wink: !!! bman |
Okay, let see point after point.
1/ it is not possible you have error without the converts : - blindPP need to be in YV12 so you are in such colorspace when you reach this line - Convolutin3d has a YV12version called "Convolution3DYV12.dll". Do you have it ? - Undot also work in YV12 colorspace ==> no need to convertToYUY2 then back to YV12 :!: 2/ FFDshow is a DIRECTSHOWFILTER and whatever you set in it, it will never affect your encoding has avisynth use CODECS only ! (except if you use "directshowsource" in the script, or if you uncheck the ReadAVS.dll in tmpgenc and you work in DirectShow mode in it. But that i sHIGHLY recommended to not do that. 3/ for finding your borders, use moviestacker ! This tool is for that ! And more, with avs2.52, Moviestacker has only ONE purpose : to determinate the borders :-) 4/ yes, you have to demux as YUV. At least, that what I always do but I don't really know what is the impact there. |
I've just downloaded the correct version of Convolution3D (YV12) and it works like a charm :D No more color space errors. Thank you for your help. I'm also test encoding the script with MergeChroma and MergeLuma to see how much I gain in compression and to find out how the quality is effected.
I also re-demuxed the movie to YUV colorspace (instead of RGB), and got correct resizing values from MovieStacker (as far as I know). So, this is how my (Dialhot's) script currently look: Quote:
|
No, your borders are still not block aligned ! They must be divisible by 16 !
There is a slider in moviestacker to adjust how the margin are fixed : it seems that you choosed "centered" and that is not what you have to do. Choose "block aligned". PS: I did a test with the blurs and the CQ_VBR raised from 19.27 to 19.37. No a great gain. |
@Dialhot
Thank you for informing me. I'm not very used to MovieStacker, but thanks to you I think I figured it out. Now the script looks like this: Quote:
EDIT: Oh, I forgot. I also removed the MergeChroma/Luma lines. |
It seems perfect :-)
|
Phew. At last... :D
I used the script I posted in my lastest reply, and this is what I found out: (I ran prediction with CQMatic) * Without MergeChroma, MergeLuma I got CQ 57,43. * With MergeChroma, MergeLuma I got CQ 58,72. That's not bad for a 132 minutes PAL movie in SVCD resolution (480x576). :D Is it worth using MergeChrom/Luma to gain ~1.3 in CQ :?: My guess would be that it's better to use BicubicResizer than MergeChroma/Luma to gain a few CQ points, but I would like to know what you guys think. Thank you VERY much for all your help so far, Dialhot and kwag :!: :wink: Edit: I used 64 for MIN bitrate and 2500 for MAX bitrate. |
I think a raise in CQ than more than .5 point woths the work.
Using bicubic will affect the visual result more than using the mergechroma/luma blur. It's better to keep your script as it is now. |
Okay, then I guess the testing phase is over. :D Time for the real encode.
Thank you once again. :wink: |
Quote:
CAUSE! There seems to be a bug im TmpgENc refering to macroblock orientated border encoding. So as its shown above the perfect borders at top and bottom each should be a result devidable by 16 +1 In this thread I quoted a site where its very well explained and proofed :wink: http://www.kvcd.net/forum/viewtopic.php?t=6070 But I think woun't give you that amount of CQ advantage. |
Here we go again... My previous prediction was made with the intention of using 128kbps audio. I made a new prediction for 112kbps audio. And what do you know, the CQ jumped up to 62,55 and the quality of the movie is quite amazing if you consider it's 132 minutes long :!:
|
Quote:
When I first did this I recorded succesfully a 90 min cd which then played flawless on my dvd-player. The strange thing is that when I tried this second time Nero didn't accept the 90 min cd. Anyway a 90 min cd costs here as much as two 80 min cds so this is not a big problem:) |
Hi Edlund! No, I haven't tried your suggestion yet. But you can be sure I will. If this works I will be SO happy! Thanks for the tip. :wink:
|
Quote:
ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalCleaner( round(5+nf), round(11+nf)) ") Edit: oops - the big delay was due to my replacing of STMedianFilter with MipSmooth... That was way slow.. I replaced it back, and I'm using temporalcleaner now... it's fast again... |
note : I never tried to use temporalcleaner on the last version of MA script.
Before we had "unfilter ? temporalsoften", and now "Unfilter.temporalsoften". The results with temporalcleaner can be different. |
Quote:
I haven't made a comparison with both methods however... |
@ Dialhot
could you please post your script here that you use for dvd rips.there was too many different versions in this thread so i'm not sure which one you use now. Thanx |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.