Avisynth: need some help with my first script
Hi, I'm new to this forum. I wasn't sure about what section I had to post my request, so please excuse me if this is not the right one (and sorry if my english is poor, I'm italian). By the way, here's the question:
My goal is to make a kdvd backup from my original Lost 1st season (PAL). I read in kdvd specification that it can fit up to 6 hrs in one single DVD-5, so that means I can put the entire season (17 hours and an half) into 2 DVD-9 or even just one DVD-9 (using the half resolution template). Then I'm gonna use DVDLab to author the dvd, which I CAN use so I won't bother you about that :wink:. I got three questions: 1 - The first, the most important: I got problems with avisynth. I have installed version 2.5x, and all the needed plugins, but when I try to open the script with wmp (classic), it seems like there's some missing codec: wmp tries a couple of times to connect to his server to download a codec, then after a couple of tries tells me he cannot play the file. Please note that wmp does not show any red message on black screen (I see that happens trying to play wrong scripts). 2 - I would like to keep the anamorphic aspect ratio. How can I do this? I read that FitCd can produce correct avs script, but I'm unsure about what parameters I have to feed it. And about avs script, is the one in the sticky post right for my purpose? 3 - The steps to follow. The kdvd template must be loaded before or after opening the source video in TMPEG? Is it the same or one step must be achieved before the other? I hope you can help me, thanks to you all |
Re: I need some help with my first script
Quote:
Quote:
Personnaly I put 8 episodes of Lost on a DVD-5 with the half template (two audio - one subtitle). That is 3 DVD-5 for the whole season. Quote:
Quote:
Concerninng the script : you will have to add a deinterlacing filter at top, but I will explain you that afterwards. Quote:
|
Re: I need some help with my first script
Ciao Phil!
Thanks for your help. I'll try to answer your questions :wink: Quote:
Quote:
Quote:
Quote:
I wanna thank you again for your help, I hope I gave you all the informations you need to help me. Now, here's my script as it is now: ## DLL Section ## # LoadPlugin("C:\Programmi\Avisynth 2.5\filters\MPEG2Dec3.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\DGDecode.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\GripFit_YV12.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\STMedianFilter.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\asharp.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\unfilter.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\undot.dll") # #### ## Main section and static filters ### # Mpeg2Source("E:\Lavoro KVCD\lost.d2v") LanczosResize(688,416,0,70,720,436) AddBorders(16,80,16,80) #Trim(0,62523).FadeOut(150) undot() asharp(1, 4) STMedianFilter(3, 3, 1, 1 ) MergeChroma(blur(1.5)) MergeLuma(blur(0.1)) # # ## Linear Motion Adaptive Filtering ## # # ( Portions from AviSynth's manual ) # This will apply variable temporalsoften # and variable blur. # Both filters are active at all times, and work inversely proportional to the # activity, measured from current frame to next frame. 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) ") # # # #GripBorders() #LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker! # # ## Functions ### function fmin( int f1, int f2) { return ( f1<f2 ) ? f1 : f2 } ConvertToRGB24() # For TMPGEnc or VFAPI # #### |
Re: I need some help with my first script
Quote:
http://www.kvcd.net/forum/viewtopic.php?t=15522 Else, as I used 3 DVD-5 for the season in 352*576 not anamorphic and you plan to use 2 DVD-9 to do the same in anamorphic, I would says that this is something that sounds possible. But remember that 1.77 anamorphic is actually like a 1.33 picture (anamorphic = the picture is stretched vertically). That means more pixel to encode so more space needed at the end. Quote:
http://avisynth.org/warpenterprises/...l_20060410.zip Note: your script produce a 704*576 non anamorphic target. Set correctly filtCD to obtain what you wants (ie a 352*576, anamorphic or not, target) |
Re: I need some help with my first script
Quote:
Quote:
AddBorders(16,80,16,80) is that to prevent that kind of errors? Thanks again :) |
I think that you miss how to use fitCD (look for a tutorial on the net) or better use Incredible's tool : Paranoia.
The tool : http://www.kvcd.net/forum/viewforum.php?f=93 A tutorial in flash done by Rui : http://www.kvcd.net/forum/viewtopic.php?t=16590 |
Quote:
edit: Nice tutorial. I'm right now trying encoding with the new script, I'll post later the results |
352x576 at 16:9 will look very bad I'm afraid. It'll be very blurry because it's stretched so much by the DVD player upon playback.
|
Yesterday I wasn't at home so I couldn't try, right now I'm at work but I left my pc with some homeworks to do :wink:, I'm trying both full resolution (CQ 60) and half resolution (CQ 100) to start a comparison. I took the resize script line from Paranoia, while the rest of the script is from Dialhot's suggested one: I'll let you know some impressions when I'll be home again
|
Quote:
|
Quote:
|
I advice you to use it. The problem is that the file size is increased about 10% or more when you use a sharpen line.
Anyway the optimal script already have a "asharp" line (I never used this script for my own usage). I would just suggest you to replace the "asharp" line by a "limitedsharpen" one. But this filter is a little bit more complicated to use. See there : http://www.kvcd.net/forum/viewtopic....asc&highlight= (you can jump to the last page if you need latest informations :-)). |
Ok, I just read the whole thread. I understood just some of the stuff posted there, since I'm almost a newbie to advanced encoding (but you've got to start somewhere, right :P?). BTW, here are my new questions (I hope I'm not bothering you, Phil).
Ok, so LimitedSharpen is a good thing, and, if I'm not wrong, since my source is a good MPG2 maybe it won't be TOO difficult to use that to have good results. I'll start copying what it seems to be a good generic script for clean sources: Lremovedust(4,1) limitedsharpen(ss_x=1, ss_y=1, smode=3, strength=50, soft=20) The first problem is: I read that LS can also be used to resize the video. Should I do so or simply add the above lines after (or before) the bicubicresize one? If the answer is to let LS do the resize, how can it be done? Second problem: the Lremovedust line. For clean materials like the one I have to encode, that line should be used before or after the LS one? Third (and last) problem: I read that there is another filter (LSFast) which is (let me guess...) faster than LS, so maybe I should use that one instead. Are his parameters the same as LS or is its usage different? |
To answer to all your questions is faster for me to give you the script that I used :
Code:
DGDecode_Mpeg2source("PATH\NAME.d2v",cpu=4,idct=7) Code:
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) ") Note : the parameter 17 for LRemoveDust is the mode, in other word, the denoiser that will be used. Perhaps 4 is better than 17, I confess that I did not compare really all the modes. Note2: yes, LSFaster is "just" a faster implementation of LS. Use it with the same parameters. |
Mode 17 in RemoveGrain should preserve thin lines better than mode 4 so it's recommended.
|
Thanks again guys. :D
So, after all your suggestions my script is at the moment like this (source: pal anamorphic, target: pal, half resolution, non anamorphic) *note: there's surely some unneeded plugin in the load section, but I think that's not harm, isn't it?: LoadPlugin("C:\Programmi\Avisynth 2.5\filters\MPEG2Dec3.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\DGDecode.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\GripFit_YV12.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\STMedianFilter.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\asharp.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\unfilter.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\undot.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\TDeint.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\mt_masktools.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\RemoveGrain.dll") LoadPlugin("C:\Programmi\Avisynth 2.5\filters\Repair.dll") Import("C:\Programmi\Avisynth 2.5\filters\LimitedSharpenFaster.avsi") Import("C:\Programmi\Avisynth 2.5\filters\LRemoveDust_YV12.avsi") dgdecode_mpeg2source("E:\Lavoro KVCD\lost.d2v", cpu=4, idct=7) BicubicResize(352,432,1./3.,1./3.,10,0,700,572) TDeint(order=1,tryweave=true) LimitedSharpenFaster() LRemoveDust_YV12(17,1) MergeLuma(blur(0.1)) MergeChroma(blur(1.58 )) 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) ") Letterbox(16,16,16,16) function fmin( int f1, int f2) { return ( f1<f2 ) ? f1 : f2 } Addborders(0,72,0,72) I unpacked both the removegrain (v 1.0) package and the masktool one (v 2.0a27) in my filters directory. For the LRemoveDust_YV12 function I found this one function LRemoveDust_YV12(clip input, int clmode, int "limit") { limit=default(limit,2) clmode=default(clmode,17) repmode = 2 clensed = Clense(input) rep = Repair(clensed, input, mode=repmode) rg = RemoveGrain(rep, mode=clmode) return LimitChange(rg, input, limit) } But the script doesn't work: a red message jumps up in wmp saying <There is no function named "limitchange"...>. Where's the bug :?: |
Quote:
Quote:
http://www.kvcd.net/forum/viewtopic....tchange#125123 |
Quote:
I'll start encoding with the above posted script, lets see what I'll get. I'll keep you informed as ever |
Prego :D
|
I'm so sorry to keep asking questions, but unfortunally I got antoher problem :oops: . I'm sure its solution it's easy, but I'm trying since yesterday and I still can't get over it: TMPEGEnc simply stopped working with avs scripts (even the simpliest ones). I tried to uninstall the program and reinstall other versions (even deleting the ini files), but the end is always the same: when I try to load my brand new avs script, TMPEG says something like "file type not supported". I even tried to reenter the avsreader key in the registry, but it doesn't work. The strange thing it's that I didn't do any change to the system since the last time TMPEG worked. And, of course, the script itself plays great with wmp. TMPEG still can accept d2v files. Maybe I should have this question posted in the TMPEG area, I eventually posted it here to keep a continuity with my whole "case". Where's the trick :??
|
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.