View Full Version : All Around Help Needed
EpheMeroN
19th August 2004, 07:49
I have a captured AVI file that I'm trying to encode to 1/2 D1 NTSC MPEG-2 via AviSynth and QuEnc. The resolution is 560x420 and I captured it using the Huffyuv Codec (CCESP Patch v0.2.3 ver of Huffyuv if anyone has viewing issues). It's Pure NTSC and contains no FILM content whatsoever so I'm trying to leave it interlaced for quality purposes.
Download A Raw Sample Below
http://users.adelphia.net/~l337/Sample.avi
I need help with Levels for starters because my monitor is ancient and messed up as it is. Secondly, I think I have the denoising looking good (opinions please) but the picture seems to be slightly blurry, or out of focus. I'd like to sharpen it up without introducing artifacts into the picture. I'm also skeptical about my resizing. I've read past posts dealing with pure interlaced resizing and how complicated it is. Also, is there a better way to insert a blank clip than by taking part of the first clip and making it black? I've wondered about that for a while.
Here's the script I've used so far:
#Last Comic Standing Winner, John Heffron, 08-16-2004, Regis & Kelly
LoadPlugin("C:\Video Apps\AviSynth v2.5.4\Plugins\PeachSmoother.dll")
LoadPlugin("C:\Video Apps\AviSynth v2.5.4\Plugins\UnDot.dll")
LoadPlugin("C:\Video Apps\AviSynth v2.5.4\Plugins\UnFilter.dll")
LoadPlugin("C:\Video Apps\AviSynth v2.5.4\Plugins\SimpleResize.dll")
Clip_01 = Trim(AVISource("C:\Windows\Desktop\noname76.avi"),388,824).FadeIn(25).FadeOut(12)
Clip_02 = Trim(AVISource("C:\Windows\Desktop\noname77.avi"),0,3536).FadeIn(25).FadeOut(12)
Clip_03 = Trim(AVISource("C:\Windows\Desktop\noname78.avi"),0,5745).FadeIn(25).FadeOut(45)
Intro = AVISource("C:\Windows\Desktop\untitled.avi").ConvertToYUY2(Interlaced=True)
Blank_1 = BlankClip(30, 560,420, Color=$000000, Pixel_Type="YUY2", FPS=30000, FPS_Denominator=1001, Audio_Rate=44100, Stereo=True)
Blank_2 = BlankClip(60, 560,420, Color=$000000, Pixel_Type="YUY2", FPS=30000, FPS_Denominator=1001, Audio_Rate=44100, Stereo=True)
AlignedSplice(Intro,Blank_1,Clip_01,Blank_2,Clip_02,Blank_2,Clip_03,Blank_2)
DelayAudio(-0.2)
SSRC(48000)
AssumeTFF()
SeparateFields()
PeachSmoother(NoiseReduction=52, Stability=25, Spatial=60)
UnDot()
UnFilter(15,15)
Weave()
InterlacedResize(352,480)
ConvertToYV12(Interlaced=True)
EpheMeroN
20th August 2004, 05:37
Since no one replied, I'm thinking it's due to the codec I used. I took some picture samples from the original sources and after they've been processed from AviSynth. Here they are below:
01 - Original Source
http://users.adelphia.net/~l337/01 - Original Source.bmp
01 - Processed
http://users.adelphia.net/~l337/01 - Processed.bmp
02 - Original Source
http://users.adelphia.net/~l337/02 - Original Source.bmp
02 - Processed
http://users.adelphia.net/~l337/02 - Processed.bmp
EpheMeroN
20th August 2004, 23:44
The sample is back up and ready for download.
stickboy
21st August 2004, 09:10
Well, gee, be patient.
I guess you don't want help since you removed the sample...?
Also, is there a better way to insert a blank clip than by taking part of the first clip and making it black?That's the best way to do it. Is there something you dislike about it?
EpheMeroN
21st August 2004, 17:56
Well, what I dislike about the BlankClip is that it adds the audio to the blank, black video. If there was a way to stop that, it would be perfect. The only way I can fix this that I know of is to add KillAudio() to the script.
As for the samples and pics, I'll re-post them in a bit. I was being a little impatient, sorry guys.
stickboy
21st August 2004, 18:52
Originally posted by EpheMeroN
Well, what I dislike about the BlankClip is that it adds the audio to the blank, black video. If there was a way to stop that, it would be perfect. The only way I can fix this that I know of is to add KillAudio() to the script.BlankClip doesn't add audio. It uses the input clip as a template; if you give it a clip with audio, BlankClip will generate silence with the same sampling rate, number of channels, bits-per-sample, etc.
If BlankClip didn't do this, then you wouldn't be able to splice the clips together. (You can't splice a clip with an audio track to one that doesn't.) It's doing the Right Thing.
So if you don't want an audio track, do KillAudio on the template clip first.
FuPP
21st August 2004, 21:01
you can also try to use :
Blank_1 = BlankClip(60, 560, 420, color=$000000, pixel_type="yv12", fps=25,audio_rate=44100)
Rem : no template clip is used here.
Replace Pixel_type, Fps, and audio_rate with the correct ones if needed.
Didn't test it but should work.
FuPP
EpheMeroN
21st August 2004, 21:39
Okay guys. The sample's back up, and I also re-posted sample pictures for comparison. Thanks!
EpheMeroN
22nd August 2004, 08:21
Originally posted by FuPP
you can also try to use :
Blank_1 = BlankClip(60, 560, 420, color=$000000, pixel_type="yv12", fps=25,audio_rate=44100)
Rem : no template clip is used here.
Replace Pixel_type, Fps, and audio_rate with the correct ones if needed.
Didn't test it but should work.
FuPP
How can I find out the EXACT fps of my input AVIs? I ran a simple script with just Info() and VirtualDub reported back "29.9700" as the fps, but when I entered that as the fps info for the BlankClip, VirtualDub still told me "Video framerate doesn't match".
FuPP
22nd August 2004, 09:58
In virtualdub use : File / File information to get the frame rate.
For 29.97, you have to use the following :
Blank_1 = BlankClip(60, 560, 420, color=$000000, pixel_type="yv12", fps=30000, fps_denominator=1001, audio_rate=44100)
FuPP
EpheMeroN
22nd August 2004, 10:08
Well, that surely fixed the FPS issue. Unfortunately, now all that's left to fix is the "Audio_Rate=44100" which I have no idea how to do because my source captures all have 44100Hz audio, yet VirtualDub doesn't seem to think so "Sound formats don't match". We're getting closer ;)
FuPP
22nd August 2004, 10:15
Try to add stereo=true in the blankclip command. You can check the sample rate of your clips in File Information too.
FuPP
stickboy
22nd August 2004, 10:22
... or you can just pass the clip as the template to BlankClip, as you did originally. What problem are you trying to solve? This stuff about matching the audio rate, frame dimensions, fps, etc. yourself is just unnecessary hassle.
FuPP
22nd August 2004, 10:32
No problem to solve. Simply another way to do things.
FuPP
Wilbert
22nd August 2004, 11:58
How can I find out the EXACT fps of my input AVIs?
FrameRateNumerator(clip)
FrameRateDenominator(clip)
or just FrameRate(clip).
from http://www.avisynth.org/ClipProperties
EpheMeroN
22nd August 2004, 17:44
Stereo=True fixed it! Thanks a bunch FuPP.
Why was I looking for another method for a BlankClip? Simple, I wanted a BlankClip that had no audio. When I would use one of the source videos in my script as a BlankClip, it would have audio and that would throw off the entire point of having just a nice, black video in-between commercials of shows I captured.
Now let's move onto levels, and the filtering ;) hehe. I still don't know what to do about that.
stickboy
22nd August 2004, 20:11
Originally posted by EpheMeroN
Why was I looking for another method for a BlankClip? Simple, I wanted a BlankClip that had no audio. When I would use one of the source videos in my script as a BlankClip, it would have audio and that would throw off the entire point of having just a nice, black video in-between commercials of shows I captured.But as I said, BlankClip produces silent audio when given a template clip. You're doing the same thing as you were doing before, except you're doing the unnecessary step of setting the audiorate, channels, etc. manually. The end result still will be the same!
If you don't want audio tracks at all (which is different from having a silent audio track), you need to use KillAudio on the result, KillAudio on the template clip, or use audiorate=0 as the argument to BlankClip. But this probably isn't what you want if you're splicing it to clips that do have audio tracks.
EpheMeroN
30th August 2004, 11:28
Based on my script... am I using the Peach correctly? I know some smoothers have to be used differently w/ interlaced material.
Also, I'd like to add GuavaComb into the mix. Where is the best placement in the script for Guava?
EpheMeroN
31st August 2004, 00:12
Someone, anyone, calling all AviSynth scripters! :)
Isn't there anyone that has some input on this?
JuanC
31st August 2004, 01:16
Originally posted by EpheMeroN
Based on my script... am I using the Peach correctly? I know some smoothers have to be used differently w/ interlaced material.
Also, I'd like to add GuavaComb into the mix. Where is the best placement in the script for Guava? Before any resizing, deinterlacing, or ivtc. You can crop to a horiz. resolution multiple of 8 to get rid of black borders (and leave less work to the filters) someway like this: crop( .... )
someother fast & not very strong denoiser (probably using YV12 colorspace ?)
ConvertToYUY2(interlaced=true)
SeparateFields()
GuavaComb( ... your settings here ... )
PeachSmoother( ... your settings here ... )
Weave()
... deinterlace / ivtc ? ...
... resize / addborders ...
tweak( bright ... contrast ... saturation ... hue ... ) This is pretty much what I've been using for my analog TV captures with fairly good results.
tedkunich
31st August 2004, 01:51
Originally posted by JuanC
snip....
SeparateFields()
GuavaComb( ... your settings here ... )
snip....
@Juan
You do not want to disturb the the field order prior to Guava (or an other dotcrawl/NTSC filter for that matter) as they rely on a specific pattern to be effective. Guava (or your other fav NTSC fixer - I like DeDot the best) should be one of the very first filters in your filter chain.
T
JuanC
31st August 2004, 04:12
@Ted:
I understand your point, but after some tests I found it more effective to use Guava after a smoother. This is from the GuavaComb help file: Where should I put it in my script?
In general, it is best to run comb filtering immediately after any smoothing filters. The exception to this is the Peach Smoother, which works best right after the comb filter. That’s because the Peach will otherwise interpret color crosstalk as noise, preventing smoothing around it.
Comb filtering should definitely be run before any inverse telecine steps. Color crosstalk can badly mislead inverse telecine, so it is worth cancelling it out before trying to figure out the pulldown pattern. Hope this helps.
EDIT: About your concern on disturbing the field order of the clip: Separating fields won't hurt your field order unless you purposedly change it. Also, somewhere around this forum the author of the filter posted about Peach and Guava being able to handle and deal better with separated fields video clips.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.