Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd December 2008, 03:26   #1  |  Link
NerdWithNoLife
Registered User
 
NerdWithNoLife's Avatar
 
Join Date: Jul 2007
Posts: 155
Noise Reduction/Deinterlacing/Upscaling advice

Noise reduction isn't my strong suit. Here's what I want to do: Take this NTSC DV footage, reduce noise and deinterlace it, scale to 1280x960, then crop to 16:9 1280x720. The reason is, this is an alternate camera to be cut with 30p HD footage.

I thought it wise to ask for help because of the multiple things going on here, and problems that can result if filtering is not done in the proper order. So far, I've come up with this strategy to be done in this order: 1. Denoising (like FFT3DFilter with interlaced=true) 2. Deinterlacing (Yadif perhaps?) 3. Resizing (Spline36?) 4. Cropping last. Does that sound right? I know the HD camera will still put this footage to shame, but I've seen some folks here do things that make me feel like a chimpanzee in calculus class, so please let me know if you have better ideas.
__________________
f=33
NerdWithNoLife is offline   Reply With Quote
Old 23rd December 2008, 05:46   #2  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Honestly, it would be better if you did:

1) deinterlace, 2) denoise, 3) resize/crop:
Code:
MPEG2Source("YourFile.d2v")
Yadif()
YourDenoiser()
Spline16Resize(1280,960).Crop(0,120,0,-120)
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 23rd December 2008, 10:10   #3  |  Link
thetoof
Sleepy overworked fellow
 
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
TempGaussMC uses mvdegrain in the bobbing process, so you may combine step 1 and 2 with it (and add additionnal denoising afterwards, but seeing your clip I don't think it's necessary)
Here's a modded version for the latest MVTools2 or the multithreaded build by josey_wells in which I added a bool "mt" parameter (true = mvtools 2.3.0.0, false = mvtools 1.9.7.7). Chroma shift correction has been disabled with MVTools2 since it has been corrected in MVTools 1.10.2.1.
http://www.mediafire.com/download.php?zjmtgc2qrzi
Code:
#compare the 3 edimodes... each has its pros and cons (they work better with different elements of the frame). Test and choose! tr2=3 = mvdegrain3 (2=mvdegrain2 and 1=mvdegrain1) You can (should) play with the other settings to see what leads to better results on the whole clip.
a=tempgaussmc_beta1mod(edimode="eedi2", tr2=3)
b=tempgaussmc_beta1mod(edimode="nnedi", tr2=3)
c=tempgaussmc_beta1mod(edimode="yadif", tr2=3)
interleave(a,b,c)
Dehaloing is also strongly recommended. I'd like to give you a good mt_convolution line for that, but unfortunately I don't fully understand how it works yet (help anyone?). In the meantime, you can look into dehalo_alpha, yahr and a few others.
http://forum.doom9.org/showthread.php?t=140623
http://forum.doom9.org/showthread.ph...53#post1205653

So, here's my workflow suggestion:
tgmc
if you want pc levels : smoothlevels(preset="tv2pc" (+ a bunch of other tweaks)) or ylevels or coloryuv
dehalo
color correction/enhancement
resize (could do it with lsfmod to sharpen)
crop
__________________
AnimeIVTC() - v2.00
-http://boinc.berkeley.edu/-
Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p)
thetoof is offline   Reply With Quote
Old 23rd December 2008, 22:24   #4  |  Link
NerdWithNoLife
Registered User
 
NerdWithNoLife's Avatar
 
Join Date: Jul 2007
Posts: 155
Quote:
Originally Posted by thetoof View Post
So, here's my workflow suggestion:
tgmc
if you want pc levels : smoothlevels(preset="tv2pc" (+ a bunch of other tweaks)) or ylevels or coloryuv
dehalo
color correction/enhancement
resize (could do it with lsfmod to sharpen)
crop
Uh... thanks, I think. I did TGMC with NNEDI, then resized while using LimitedSharpFaster. It produces a frame about every 40 seconds on my computer. I tried playing with dehalo_alpha and yahr, but they made the video look like a cartoon (or GIMP's olify filter), even at low strength. Great for cartoons, bad for noncartoons. So I skipped it, but even with some halos it's still way better than what I was doing. Hopefully the 946 frames I need will be done by tomorrow.
__________________
f=33
NerdWithNoLife is offline   Reply With Quote
Old 23rd December 2008, 22:45   #5  |  Link
Nightshiver
Quality Freak
 
Join Date: Jun 2007
Location: Area 52
Posts: 597
You can always do a rendering pass to make things go faster.
Nightshiver is offline   Reply With Quote
Old 23rd December 2008, 22:46   #6  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
TGMC can be sped up quite a bit so it isn't so absurdly slow. Try tweaking the settings a bit to your taste. Otherwise, if speed is a huge concern still yadif + MVDegrain works pretty good IMO
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 23rd December 2008, 23:15   #7  |  Link
NerdWithNoLife
Registered User
 
NerdWithNoLife's Avatar
 
Join Date: Jul 2007
Posts: 155
Quote:
You can't call your encoding speed slow until you start measuring in seconds per frame.
I just got that Sagekilla, lol! Seconds per frame as opposed to frames per second. There's nothing like experiencing.
__________________
f=33
NerdWithNoLife is offline   Reply With Quote
Old 24th December 2008, 00:19   #8  |  Link
thetoof
Sleepy overworked fellow
 
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
Yeah, the approach *.mp4 guy used in the "right edge halos" thread is the way to go with real life footage... Tough I'd need an even more dumbed down explanation than the one at the bottom of the thread to understand how to create a mt_convolution line from scratch...
Help, mt2 pros?
__________________
AnimeIVTC() - v2.00
-http://boinc.berkeley.edu/-
Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p)
thetoof is offline   Reply With Quote
Old 8th January 2009, 17:19   #9  |  Link
NerdWithNoLife
Registered User
 
NerdWithNoLife's Avatar
 
Join Date: Jul 2007
Posts: 155
As an update, I found why it was going so slow for me. I wasn't using the MVTools 2 mod of TGMC from thetoof. After properly following the instructions, I got it to a much more tolerable one frame ever six seconds. Seems very reasonable in comparison to one frame every 40 seconds! Both CPUs were thinking a lot. But I'm not skilled enough to know for sure about all that multithreading stuff. Anyway. Success.

To follow rule 11, I waited until I had something else to say, but
__________________
f=33
NerdWithNoLife is offline   Reply With Quote
Old 8th January 2009, 21:06   #10  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
IIRC, M4G uses some tools to build the correct convolution. I'd have to go digging through search a bit for it, but he actually detailed the process he used once.

Note: 6 seconds per frame still seems a bit excessive (but still plausible). I was able to get much faster processing on -HD- material. What CPU do you have and are you using the defaults?
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 8th January 2009, 22:08   #11  |  Link
NerdWithNoLife
Registered User
 
NerdWithNoLife's Avatar
 
Join Date: Jul 2007
Posts: 155
Nothing impressive: AMD Athlon 64X2 Dual Core 3600+, 1.9GHz, 1GB RAM. I did use thetoof's mod of TGMC posted above and this line: tempgaussmc_beta1mod(edimode="nnedi", tr2=3)

I guess I could get more RAM (among other things) but right now I'm OK with waiting longer and having more money in my pocket. Maybe there is a faster way though; I'm just not smart enough to change the options, so I don't mess with what works.
__________________
f=33
NerdWithNoLife is offline   Reply With Quote
Old 8th January 2009, 22:24   #12  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
That's not much worse than my rig (equivelant to an Athlon 64 X2 4000+ w/ 2 GB of RAM).

But, now that you posted it I can see -why- it's so slow: nnedi I believe EEDI2 (which I used) has a speed edge over NNEDI. Likewise, I used a much smaller radius for tr2 (1 instead of 3), so that can explain things a bit. If you lower tr2 to 1 or 2, you might get a decent speedup.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 8th January 2009, 23:19   #13  |  Link
NerdWithNoLife
Registered User
 
NerdWithNoLife's Avatar
 
Join Date: Jul 2007
Posts: 155
Perhaps I'll try lighter settings if I'm in a pinch sometime then. One thing that really impressed me was that my laptop, running AviSynth through Wine on Ubuntu, was able to keep up at about the same rate as my desktop! I'm not sure I'd do it all the time for fear of cooking the chips though. But it does have more RAM, Ubuntu isn't a memory hog, and AviSynth is essentially a conduit that connects codecs to DLL's, is it not?
__________________
f=33
NerdWithNoLife is offline   Reply With Quote
Old 9th January 2009, 22:19   #14  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,350
Dehaloing this source will leave it extremely blurry. Sharpening it up later, without reintroducing halos will result in a very plastic/fake look. This isn't going to look good in HD, but I'll see if I can keep it from looking bad.
*.mp4 guy is offline   Reply With Quote
Reply

Tags
deinterlacing, denoising, upscaling

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.