Quantcast Avisynth: Getting CQ Under 40? - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Avisynth Scripting

Reply
 
LinkBack Thread Tools
  #1  
06-26-2003, 03:42 AM
kinggee kinggee is offline
Free Member
 
Join Date: Feb 2003
Location: Queensland, Australia
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to 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.

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.

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

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!
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
06-26-2003, 09:06 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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

-kwag
Reply With Quote
  #3  
06-26-2003, 12:28 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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=
Reply With Quote
  #4  
06-26-2003, 08:57 PM
kinggee kinggee is offline
Free Member
 
Join Date: Feb 2003
Location: Queensland, Australia
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kinggee
hey guys, sorry for double posting

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?

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

thanks for your help
Reply With Quote
  #5  
06-26-2003, 09:10 PM
ovg64 ovg64 is offline
Free Member
 
Join Date: Jan 2003
Location: Puerto Rico
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ovg64
Hi Kingee, go back to the optimal script, try using the newest script line n the settings for tok here http://www.kvcd.net/forum/viewtopic....=asc&start=128
Reply With Quote
  #6  
06-27-2003, 12:40 AM
kinggee kinggee is offline
Free Member
 
Join Date: Feb 2003
Location: Queensland, Australia
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kinggee
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

much better than 40

sample video looks very good

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 , so many thanks too all of you who have helped me

cheers
Reply With Quote
  #7  
06-27-2003, 12:45 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #8  
06-27-2003, 01:17 AM
kinggee kinggee is offline
Free Member
 
Join Date: Feb 2003
Location: Queensland, Australia
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kinggee
thanks for the explanation kwag

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
Reply With Quote
  #9  
06-27-2003, 01:22 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #10  
06-27-2003, 06:25 AM
kinggee kinggee is offline
Free Member
 
Join Date: Feb 2003
Location: Queensland, Australia
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kinggee
thankyou for clearing all that up for me

now i can continue to encode happily
Reply With Quote
  #11  
06-27-2003, 11:19 AM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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)?
Reply With Quote
Reply







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