digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Getting CQ under 40? (http://www.digitalfaq.com/archives/avisynth/4189-avisynth-cq-under.html)

kinggee 06-26-2003 03:42 AM

Avisynth: Getting CQ under 40?
 
hey guys i'm trying out the latest script for avisynth 2.5 and i am trying to fit a 100 minute movie onto on cd.

The problem is, when i load the script into Tok and predict the CQ i get around 37, and when i look at the sample video the quality is extremely blocky and blurry. 8O

compared to kwags 704x480-showoff.mpg mine is disgusting :oops:

here is my avisynth script and Tok log file:

## DLL Section ##
#
LoadPlugin("C:\Documents and Settings\Ben King\Desktop\kvcd encoding tools\filters25\MPEG2Dec3.dll")
LoadPlugin("C:\Documents and Settings\Ben King\Desktop\kvcd encoding tools\filters25\GripFit_YV12.dll")
LoadPlugin("C:\Documents and Settings\Ben King\Desktop\kvcd encoding tools\filters25\STMedianFilter.dll")
LoadPlugin("C:\Documents and Settings\Ben King\Desktop\kvcd encoding tools\filters25\asharp.dll")
LoadPlugin("C:\Documents and Settings\Ben King\Desktop\kvcd encoding tools\filters25\undot.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf = 0 # Current frame.
#
####

## Main section and static filters ###
#
Mpeg2Source("c:\movies\robin_hood.d2v")
#
undot()
Limiter()
asharp(2, 4)
GripCrop(528,576)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.2))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf > 2.5 ? asharp( -(fmin((nf/30), 1)), 0 ) : \
TemporalSoften(2,7,7,3,2) ")

#
#
#

GripBorders()
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()


#
#
## Functions ###

function fmin(float f1, float f2) {
return (f1<f2) ? f1 : f2
}

#
####

================================================== ===========
ToK Log: C:\Documents and Settings\Ben King\Desktop\kvcd encoding tools\robin_hood.avs
================================================== ===========

Resolution (fps):528x576 (25.000 fps)
Total Frames: 149831
Total Time : 01:39:53
-------------------------------------------------------------

Audio Size: 95,893,632
Required Video Size: 716,073,304

Factor: 60.000
Desired Sample Size: 11,934,556

-------------------------------------------------------------
New Faster Prediction
-------------------------------------------------------------

Full Sample
Next CQ: 70.000. Sample Size: 20,655,006
Small Sample
Next CQ: 70.000. Sample Size: 1,900,901
Predicting...
Next CQ: 40.446. Sample Size: 12,583,378
Next CQ: 29.568. Sample Size: 10,391,269
Next CQ: 36.117. Sample Size: 11,962,598

Exit Condition: 1.000 % reached ! yahoo !
Tries : 4


Final CQ: 36.117
Total Time For Predicition: 00:21:16

Total Time (all operations): 00:21:16

Finished

so any ideas as to why i am getting such poor quality??

thanks in advance! :lol:

kwag 06-26-2003 09:06 AM

Is your movie wide screen or full screen? If it's full screen, that could be the problem :!: , and you have to use a smaller resilution :roll:

-kwag

Dialhot 06-26-2003 12:28 PM

Re: !!Help!! Getting CQ under 40!!
 
Quote:

Originally Posted by kinggee
hey guys i'm trying out the latest script for avisynth 2.5 and i am trying to fit a 100 minute movie onto on cd

It is not necessary to duplicate the tread in more than one forum.

We already try to help you there :

http://www.kvcd.net/forum/viewtopic....651&highlight=

kinggee 06-26-2003 08:57 PM

hey guys, sorry for double posting :oops:

i am just frantically trying to work out what is going on here!!

the movie i am trying to encode is 16:9 wide screen, but do i need to change my line in avisynth to:
GripCrop(528, 576, overscan=2, source_anamorphic=false)

will this help anything? :roll:

i just think i should be getting a CQ of around 60 for a movie like this 8O , even after checking out the prediction problems of Tok with PAL and the ma script. :!:

thanks for your help :lol:

ovg64 06-26-2003 09:10 PM

Hi Kingee, go back to the optimal script, try using the newest script line n the settings for tok here :arrow: http://www.kvcd.net/forum/viewtopic....=asc&start=128 :)

kinggee 06-27-2003 12:40 AM

ok, i just did a prediction using the latest Tok 0.0.5.2 settings and with the latest script and my CQ ended up as 53 8O

much better than 40 :!:

sample video looks very good :D

i still wander how kwag got a CQ of 63 on his encode of K-19, which is 138 minutes long :!: Is it mainly because there is less action :?:

anywayz i'm finally happy with my sample :D, so many thanks too all of you who have helped me :!:

cheers :lol:

kwag 06-27-2003 12:45 AM

Quote:

Originally Posted by kinggee

i still wander how kwag got a CQ of 63 on his encode of K-19, which is 138 minutes long :!: Is it mainly because there is less action :?:

A couple of reasons. It's a movie that although has some action, it's mostly dark (in a submarine :) )
And the second reason is that it's a 16:9 wide screen movie. If you are encoding a full screen movie, you loose about 25% of your space! Also the new adaptive line, or may I say "corrected" line, uses heavier blurring with "unfilter" on high motion. This will give you a lot of compression on action scenes :)

-kwag

kinggee 06-27-2003 01:17 AM

thanks for the explanation kwag :D

but does my CQ sound about right to you :?:

the movie is 16:9 wide screen and is 100mins long with fair amount of action, and it is PAL

thanks mate :lol:

kwag 06-27-2003 01:22 AM

Yes it does :)
And remember, your frame rate is one fps higher that NTSCFilm, and your resolution is much higher :!: 528x576 is 304,128 pixels, but NTSC 528x480 is 253,440 pixels. So you have many more pixels to encode than us, and that's why your CQ is a little lower :)

-kwag

kinggee 06-27-2003 06:25 AM

thankyou for clearing all that up for me :lol:

now i can continue to encode happily :D

J-Wo 06-27-2003 11:19 AM

Just a followup to this post... I'm trying to encode a telescreener of definately not dvd quality and the first prediction I got a CQ of 35.917. After watching a sample the picture didn't look THAT bad, but it was a little blocky (however after taking another look at the source on my computer I realized that was pretty blocky too). On my TV screen the video looks *almost* full screen, so I changed my script from overlap=2 to resize=2. Confusingly enough, using gripfit moviestacker then adds the line
Code:

GripCrop(528, 480, overscan=2, source_anamorphic=false)
I can only assume that overscan=2 in the GripCrop line is the same as resize=2! Anyway making this one change, plus cutting out the first 3 minutes of the movie, raised the CQ to 44.771. The source resolution is 576x360 (PAL) which I'm encoding at 528x480. Even though I live in north america I'm not doing any PAL-->NTSC conversion because my DVD player can play kvcd's with vid+audio at 25fps. Any other tips for how I can raise my CQ on this encode?

P.S. My source is actually a telescreener of a cartoon, so should I shorten my GOP to 12 (PAL)?


All times are GMT -5. The time now is 05:27 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.