Quantcast KVCD Scripts and Runtime? - digitalFAQ.com Forums [Archives]
  #1  
03-04-2004, 12:11 AM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
Enocded my first kvcd , all attempts at getting a better cq had failed. With the optimum script i was getting cq of 40-.
I picked up a script in on of the forums where they had fit a 3 hr movie, which even i want to do.
It would be very helpfull if we could have a collection of scripts with runtime and the settings for tmpgenc.

This is what i made it with.
Used Tok for prediction and encoding, if i use bilinear sizes CQmatic not working for me.
Min Bitrate - 300
Max Bitrate- 800
Cq - 56.58
Mpeg1 -VCD.
Source - DVD
Runtime - 179m39s


Script

## DLL Section ##
#

#

## Defined Variables and Constants ##
#
MaxTreshold = 1.55
scd_trigger = 30 # Scene change trigger value.
nf = 0 # Current frame.
#
####

Mpeg2Source("D:\Encoded\Namak Halal\nh.d2v")

Undot()
Limiter()
asharp(1.5,4)
BilinearResize(272, 238, 0, 4, 720, 472)
STMedianFilter(8, 32, 0, 0 )

MergeChroma(blur(1.55))
MergeLuma(blur(0.025))

## Dynamic Linear Adaptive Filtering and Scene Change Detection ##
#
# ( 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,5,2) ")

#
# Scene change detection ( kwag ) - If a scene change is detected, we
# blur heavily. This affects the scene before and the one after the
# scene change, thus providing a softer transition for the encoder instead
# of a sharp "spike".
# If it's not a scene change, then we just blur dynamically, depending on
# the action.

ScriptClip("nf > scd_trigger ? asharp( -2,0) : asharp(0,0) ")

#
#
#
BlockBuster(method="noise", detail_min=1, detail_max=10, variance=0.6, seed=5823 )

#Letterbox(0,0,14,14)
AddBorders(40, 1, 40, 1)

Limiter()

#
#
## Functions ###

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

#
####

We could actually make it very simple to make kvcd's by sharing scripts , i have no idea of the commands in the script, but it helped me in increasing the quality of output of my encode.

Thanks!
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  
03-04-2004, 04:39 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
This script is very very old ! Use the last optimal one that you can find in the optimal script section.

What you have there is the first MA script we did 6 ou 8 monh ago. And it was enhanced 12 time after that.
Reply With Quote
  #3  
03-04-2004, 07:05 AM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
I tried the new ma script to the same video i did before but increased the resolution to 704x480.
Min Bitrate= 300
MaxBitrate= 1500
Video Time= 180mins
Mpeg2 Svcd.
Sound Mp2 = 123mb.

Tried the prediction with Tok to fit it in 2 cd's , the cq prediction was 53.

Now what can i add/remove for more compression to get higher CQ.
I would not mind reducing the resolution and would prefer to fit it one cd.

Here is the script.

## DLL Section ##
#
#
####
## Main section and static filters ###
#
Mpeg2Source("D:\Encoded\Namak Halal\nh.d2v")
#

GripCrop(704, 480, overscan=2,source_anamorphic=false,dest_anamorphic =false)
GripSize(resizer="BicubicResize")
FluxSmooth(7, 7)
TemporalCleaner(5,10)
Undot()
DCTFilter(1,1,1,1,1,1,0.5,0)


#
ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")
#
## Adding Borders & Letterboxing
#

GripBorders()
LetterBox(0,0,0,0)


#
#
## Functions ###
#
function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}

The quality is allright but i thought i could get this in one cd, 2 cd version was expecting to a CQ of 70+.
Gonna try a few options with bitrates and rsolutions and see.
Reply With Quote
  #4  
03-04-2004, 07:18 AM
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 kev23m
INow what can i add/remove for more compression to get higher CQ.
I would not mind reducing the resolution and would prefer to fit it one cd.
704x480 is, IMHO, for KDVD only. Prefer to not go above 544x480 on KVCD.
For your job, in order fit 180 min on a single CD, there is no other choice than using 352x240 ! 352x480 can be tried also.

Note : are you sure your source in non_anamorphic ? Is it fullscreen or do you have black borders ?

Quote:
2 cd version was expecting to a CQ of 70+.
Not a this resolution ! And not if this is a fullscreen movie.
Remember that all stats we give here are supposed to be for a widescreen movie (ratio from 1.85 to 2.35 for 1). Movie in fullcreen are done with CQ at least 20% below !
Reply With Quote
  #5  
03-04-2004, 07:42 AM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
I see my problem clearly now , 90% of Indian Movies are done in Fullscreen not widescreen.

Yep non_anamorphic , Moviestacker says so after i provide the source, though moviestacker has never also given me right runtime for this movie.

What i shall do is try it on a widescreen dvd,

Thank You Dialhot!
Reply With Quote
  #6  
03-04-2004, 08:51 AM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
Just doing a few tests to see where i can get best CQ.

Did the same movie at 352x480 to fit in 1 cd
Min Bitrate- 300
Maxbitrate- 900
Mpeg-1 Vcd.
CQ Acheived 33.34

352x240
Min/Max Bitrate like above
Mpeg-1 VCd
CQ Acheived 59.786

This time i removed these filters ,

Limiter()
asharp(1.5,4)
MergeChroma(blur(1.55))
MergeLuma(blur(0.025))
STMedianFilter(8, 32, 0, 0 )
BlockBuster(method="noise", detail_min=1, detail_max=10, variance=0.6, seed=5823 )

CQ increased by 3 using the new script and removing these filters.
Can i add some filters to increase the quality without effecting the CQ.

Tried with these filters , same setting CQ down to 51.880, was 56.58 with the old script.

Wonders.
Reply With Quote
  #7  
03-04-2004, 09:28 AM
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 kev23m
Limiter()
asharp(1.5,4)
MergeChroma(blur(1.55))
MergeLuma(blur(0.025))
STMedianFilter(8, 32, 0, 0 )
BlockBuster(method="noise", detail_min=1, detail_max=10, variance=0.6, seed=5823 )
Asharp and BLockbuster are the two lines to remove if you want to avoid filters that make suffer the CQ.
All other lines actually raise the CQ so you should put them back.
Reply With Quote
  #8  
03-04-2004, 10:02 AM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
Removed the 2 filters , rest of the settings the same ,
CQ aheived 62.7.

But there is a line coming in the right end of the screen now.
Reply With Quote
  #9  
03-04-2004, 10:27 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
It's stange you didn't had it before as it is due to gripcrop generally.

Change the script as follow :

Code:
Mpeg2Source("D:\Encoded\Namak Halal\nh.d2v")
# 
GripCrop(704, 480, overscan=1, source_anamorphic=false, dest_anamorphic=false)
GripSize(resizer="BicubicResize")
FluxSmooth(7, 7)
TemporalCleaner(5,10)
Undot()
DCTFilter(1,1,1,1,1,1,0.5,0)

#
ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")
#
## Adding Borders & Letterboxing
#
LetterBox(8,8,8,8)
GripBorders()
It would correct the problem (but cut 8 pixels on each side of the source).
Reply With Quote
  #10  
03-04-2004, 02:21 PM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
How do i cut 8 pixels on each side?

I was trying the same script that i had on another movie, this it worked fine , no line and CQ acheived was 68 at resolution 352x480.
Min/Max Bitrate: 300/2500.
Runtime : 131mins.

I wanna remove the borders on the right and left , here is the pic of the encodev m2v file.

I tried this script but cos i could not cut the pixels the movie was getting cut.

Reply With Quote
  #11  
03-04-2004, 04:29 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 kev23m
How do i cut 8 pixels on each side?
I didn't ask you to cut it, I wanted to say that the script I was given cutS 8 pixel on the edges
Reply With Quote
  #12  
03-04-2004, 04:32 PM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
Ok i tried the script , made the changes

changed the size for gripgrop n letterbox.

I load the avs in tmpgenc and then the template , the movie is larger than screen size.

What did i do wrong.
Reply With Quote
  #13  
03-04-2004, 04:37 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 kev23m
I load the avs in tmpgenc and then the template , the movie is larger than screen size.
Load the template and then the avs. Look at the bottom of the screen of tmpgenc, what is the resolution it says ?

And post the script, you perhaps did a mistake.
Reply With Quote
  #14  
03-04-2004, 04:44 PM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
Ok here is the script .

## DLL Section ##
#
#
####
## Main section and static filters ###
#
Mpeg2Source("D:\Encoded\Tere Naam\tn.d2v")

#
GripCrop(704, 480, overscan=1, source_anamorphic=false, dest_anamorphic=false)
GripSize(resizer="BicubicResize")
FluxSmooth(7, 7)
TemporalCleaner(5,10)
Undot()
DCTFilter(1,1,1,1,1,1,0.5,0)
MergeChroma(blur(1.55))
MergeLuma(blur(0.025))
#

LetterBox(8,8,8,
#
ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")
#
## Adding Borders & Letterboxing
#
LetterBox(8,8,8,
GripBorders()

#
#
## Functions ###
#
function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}
##

I loaded the template and then the avs , the resolution size below says(704x480) after that .

Do i resize it or the template will do it for me.

I want the output to be 352x480.

I save the project as text project and open the tpr file with cqmatic, it opens blank windows , done exactly as i mentioned above.

With tok the output is 704x480.

If i change to 352x480 in the script the line appears again.
Reply With Quote
  #15  
03-04-2004, 04:53 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 kev23m
LetterBox(8,8,8,
#
ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")
#
## Adding Borders & Letterboxing
#
LetterBox(8,8,8,
GripBorders()
Thanks to the you can easily see that you put 2 times the letterbox line ! Remove the first one.

Quote:
]I loaded the template and then the avs , the resolution size below says(704x480) after that .
Okay, no error there so : the res you obtain is the one you want to have.

Quote:
I want the output to be 352x480.
???
So put these values in the gripcrop line
The 2 first parameter of Gripcrop are the dimension of the target ! not the ones of the source
Reply With Quote
  #16  
03-04-2004, 04:59 PM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah had changed the gripgrop values to 352x480 but the line was coming.

Made a new script now it's fine.

this line
Letterbox(8,8,8,

If i reduce it the border on the left & right will reduce right.
Reply With Quote
  #17  
03-04-2004, 05:04 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 kev23m
If i reduce it the border on the left & right will reduce right.
Yes but the values should always be divisible by 8 as the mpeg codec works with 8x8 cells and it's better to have a cell completly dark or completly containing a picture information.
That's why we ofen use (8,8,8, or (16,16,16,16)....
Reply With Quote
  #18  
03-04-2004, 05:10 PM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
OK.

Thanks once again.

One more Q , lots of my desi friends from another forum also wanna learn how to make akvcd , they encoding into divx.

Is it allright if i use red's guide add some more stuff so they don't falter like i did and post it on our desi site.

I will be mentioning it's red's guide.

Or

I could just redirect them here.
Reply With Quote
  #19  
03-04-2004, 05:17 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 kev23m
I could just redirect them here.
Do that please.
Reply With Quote
  #20  
03-04-2004, 05:36 PM
kev23m kev23m is offline
Free Member
 
Join Date: Feb 2004
Location: India
Posts: 185
Thanks: 0
Thanked 0 Times in 0 Posts
Will redirect them here then.

Ok one problem now is movie is playing properly , changes from the script b4.

overburn=1 instead of 2
letterbox(8,8,8, was 0
St Medial Filter not there
Limiter() not there.

Just ran a prediction on Tok and now its predicting CQ of 53.

The Cq has dropped drastically , had got 68 b4.

???
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
TMPGEnc: changes the runtime of movie novagte Video Encoding and Conversion 1 02-21-2005 09:31 AM
Runtime Error que aparece no Diko 0.74 iachel Conversão e Codificação de Vídeo (Português) 6 08-20-2004 09:36 AM
Runtime error! fabiana Conversão e Codificação de Vídeo (Português) 18 01-13-2004 05:57 PM
Vsfilter giving me a runtime error? totonho03 Avisynth Scripting 9 08-04-2003 04:00 PM
KVCD: 1.14GB file created for movie with 2:40:53 runtime? Neo Video Encoding and Conversion 10 06-07-2002 05:42 AM

Thread Tools



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