Log in

View Full Version : Advice for deinterlacing/filtering a 'dual-format' show coming from vDub filters.


Vchat20
18th May 2007, 06:31
Hi there. Just want to say in a prologue that I'm new here but have done plenty of legwork and have some decent knowledge in the editing/encoding realm and, on top of that, generic computer usage knowledge. As well, I've done enough reading during my 5 day wait that I know the basics of avisynth and can get myself started.

But basically I wanted to get advice, as up to this point I have been using Virtualdubmod solely and it's built in/addon filters for my video cleanup/encoding. Here is my setup actually from video source to resulting video file:

I have an older Aimslab VHX capture/tv tuner card with a bt878 chipset installed with the btwincap drivers. Hooked up to it is my Scientific Atlanta Explorer 8000 DVR which gets a pristine MPEG2 stream from the cable company before it gets decoded and sent to the capture card via S-Video. Audio is sent via normal RCA cables to my sound card. Capture software of choice is iuVCR and I usually do either uncompressed video or MJPEG depending on the length of the recording. Always YUY2 720x480 NTSC-M, 29.97fps. No filters on the capture application, just the rar video pulled in from the bt878 chipset. As long as I give iuVCR a high process priority beforehand, I normally get 0 dropped frames during a full 30 minute tv show nonstop. And this is on a 2Ghz Celeron, 512MB ram, 60GB 7200RPM capture drive at UDMA5, and a fairly loaded down XP install.
Once captured, up to this point anyhow, it goes right into virtualdubmod where I insert filters in this order: 'DotCrawl Comb Filter by Scott Elliott' (Trellis correlation on temporal and precise 4-way on spatial) -> 'Smart Deinterlace by Dondald Graft' (Cubic interpolate, Motion Map denoising, motion threshhold: 8, scene change threshhold: 70). From that point on I just basically set the video to encode using xvid following a guide I actually got off this site sometime back. Audio I just let vdubmod do it via the Lame ACM codec at CBR rates.

Granted in the above situation I get fairly decent quality as-is especially overtop the last person who was doing this work before me who was stuck just capturing from a usb ati branded tuner from analog cable and just did a straight xvid/mp3 encode from the mpeg2 file given to him by the capture card.

This time around I'm wanting to bump up the quality a bit and have been looking over some of the listed filters for avisynth and one of the guides linked to on this forum for anime sources and think I'd be best to go with avisynth to filter it all for starters.

First as to identify the source material I'm working with: It's a show called 'Code Lyoko' that airs on Cartoon Network. The main thing with this show is due to the nature of it, there are two different actual sources throughout each episode. One is standard anime while in other parts it's done in full detailed 3D. I'll have a clip to post tomorrow afternoon to example this whilst being a basis for analysis on deinterlacing as I've yet to determine whether I truly need to deinterlace it or whether I need to use a bob filter instead. But I have a slight guess I could probably make good use of JDL_Applyranges to set up different filter settings for different parts of the video.

Now another thing that has really been bugging me is no matter what channel or show I capture from, I keep getting what I can only assume is dot crawl on my captures and hence me using the aforementioned filter in vdub. It shows up as an overall checkerboard pattern lightly overlaid on the rest of the video. Even though I'm using s-video which is supposed to get rid of dotcrawl altogether, that's what I'm getting. Once again, I'll have a sample clip tomorrow afternoon when this show returns to air.

Anyways, I appreciate all the help. Despite the length of my posting (one of my bad habits. :p ), I merely have a few things of concern here that I'm hoping could be answered. Once again, thanks for any help provided. :)

check
18th May 2007, 06:54
If the show has some parts that are 23.976 and some that are 29.97 you have two choices:
o convert the entire episode to one framerate and suffer jerky motion in scenes originally of the other framerate
o encode the video as vfr. This is done by correctly deinterlacing all sections, making note of when the framerate changes, and then muxing the video with a timecodes file into mkv or mp4.
There's some background info here: http://forums.animesuki.com/showthread.php?t=34738

foxyshadis
18th May 2007, 17:27
S-video only reduces (but doesn't eliminate like component) dot crawl when it's not present in the source, unfortunately it sounds like that's what happened here. Some DVDs suffer the same annoying problem, makes you wonder how professional the transfer was. TComb or FFT3DFilter should help remove the crawl.

Vchat20
19th May 2007, 11:22
Sorry for the late reply. Between of my DVR acting up and having a hard time getting iuVCR to capture using the mjpeg encoder in ffdshow (it absolutely refused. I finally ended up continuing to use uncompressed), I finally got a sample clip captured and uploaded here:

http://rapidshare.com/files/32148902/clip1.avi.html
(720x480 YV12, 29.97fps, uncompressed. Encoded back to huffyuv lossless for filesize.)

^ That clip shows what I'm getting raw off my capture card and also demonstrates somewhat what I was talking about with there being two different methods of animation in this show that goes back and forth. I'm still debating on the deinterlacing method on that one.

I've been trying to get some of this work in avisynth done on my own regardless the major headache I now have after virtualdub crashing on me a dozen times, losing my cropped commercials, trying to get vdub to decode the various ffdshow based codecs like mjpeg, ljpg, huffyuv, etc.. then finally figuring out how to get them working by finally enabling the codecs in ffdshow's VFW config and loading the avi's in an avisynth script.

So I'm pretty much set up to getting this filtering done in avisynth. Just need to sort out the best configuration of filters for this project and hopefully with as little 'begged' help from everyone else here.

But one LAST thing I gotta ask: I plan to do a 2-pass xvid encode as noted above: Would I be better off doing this filtering in avisynth and do an intermediary encode to huffyuv or another lossless codec with all the filtering done and THEN 2-pass that to xvid, or would I be safe to do the 2-pass xvid right off the avs script?

And for the last two posters, thanks. I will definitely keep those tips in mind.

Leak
19th May 2007, 17:20
Would I be better off doing this filtering in avisynth and do an intermediary encode to huffyuv or another lossless codec with all the filtering done and THEN 2-pass that to xvid, or would I be safe to do the 2-pass xvid right off the avs script?
Well, since AviSynth should produce the exact same output if you keep the input and the script the same you could of course do both passes straight from the AVS script, but it'll probably take longer unless your AVS script is lightning fast...

np: The Go Find - Kid OK (Stars On The Wall)

Vchat20
19th May 2007, 20:50
Ah. Yeah. I kinda sorted that one out on my own last night/early this morning. ^^ It worked just fine doing the 2-pass right off the avs script.

Needless to say the quality came out top notch imho. Better than what I was getting with vdub and it's filters alone. Not to mention even doing the 2-pass encode here on my 1.4g celeron m laptop only took like 3 hours combined whereas in the olden days it took just that alone for a 1-pass encode on my 2g P4 machine.

Now theres just one EEENSY issue I'm having here and that's the resulting video seems to be a bit choppy all over and I'm hoping someone can discern where my booboo is. Here's my AVS script:
AVISource("y:\cl_66_ljpg.avi")
tcomb(mode=0,fthreshL=5,othreshL=7)
LeakKernelDeint(order=1,threshold=11,sharp=true)
deen()
Letterbox(2,4,12)