Log in

View Full Version : What's a good way to enhance low-light high-grain movies


Zergrinch
26th September 2009, 17:11
Relative newbie here.

I have some movies captured using a compact digital camera, so the quality is not fantastic. Worse, it's indoors at night, and there was no way to adjust encode settings. It was either MJPEG or nothing.

So, I'm not expecting any miracles, since I know the source is crappy.

With that said, is there any combination of filters that can hopefully enhance a movie such as this? I re-encoded to h264 and uploaded a twelve-second snippet (http://upload.jetsam.org/movies/Sample.mkv) (1.5MB).

:script:
Thanks!

scharfis_brain
26th September 2009, 17:13
please do NOT recode.
upload the original file instead.
recomporession alters the original video a lot.

Zergrinch
26th September 2009, 17:21
Oh, okay.

The reason why I re-encoded this was to reduce file size, since my ISP throttles FTP uploads rather severely.

I'm uploading an unmolested (except for the snip) 12-second clip as we speak. When it is finished, it will be 15.3MB in size (http://upload.jetsam.org/movies/Sample - Orig.mkv).

poisondeathray
26th September 2009, 17:33
You can use a free hosting site (e.g. mediafire.com , megaupload.com) , so you only have to upload it once (1x bandwidth) instead of using your own isp to host, and if multiple people download, your isp might charge you if you exceed your bandwidth limit

Zergrinch
26th September 2009, 17:40
No, I'm uploading to my own web hosting, separate from my ISP. It's just that the ISP throttles ALL uploads severely, and loves to cut off transfers frequently. Using a free hosting site is worse than doing an FTP transfer, since I can't resume uploading.

7ekno
27th September 2009, 01:21
Link broken :(

Anyway, for low light, grainy MJPEG compressed digicam stuff I use:

QTInput("file.mov",mode=2,quality=100)
SetMTMode(2)
ConvertToYV12()
SmoothLevels(gamma=1.5, RGMode=11, Lmode=3, Ecurve=1)
MCTemporalDenoise(settings="high", GPU=false)
#Adjust Colors manually (+v is more Red, -u is more yellow, +y is more bright/white)
ColorYUV(off_v=-7, off_u=9, off_y=0)

QTInput using the alpha version of the filter (it's in a thread here somewhere) with Quicktime Alternative ... SmoothLevels and MCTemporalDenoise are Lato filters (search by user/function name to find) ...

QTInput can be swapped for any filter that will read your file ...

SetMTMode will only work in MT versions of Avisynth (so remove if not using an MT version) ...

Adjust the "gamma" value in SmoothLevels to more accurately reflect what you need ....

MCTemporalDenoise has lottsa lottsa options, on "high" most are invoked, but if you want to fiddle, try playing with "sigma" values, chroma=true, flat=true and/or edgeclean=true ...

With ColorYUV find a reference object in your video that you know the color of, and play with offsets until said object matches said color (I always try to find a white object and make it white with v & u offsets) ...

7ek

Nightshiver
27th September 2009, 01:47
And your original sample should not be in MKV format....

Zergrinch
27th September 2009, 04:49
Yeah, the original is in AVI format. I did use MKVmerge to cut it, but I guess there won't be any recompression done.

I fixed the link now:

http://upload.jetsam.org/movies/Sample%20-%20Orig.mkv

7ekno
27th September 2009, 05:33
Source:
http://www.teknosrealm.com/examples/Source.png

PostProcess:
http://www.teknosrealm.com/examples/PostProcess.png

As stated above, script:

SetMTMode(2)
FFVideoSource("X:\Users\Desktop\Sample - Orig.mkv")
ConvertToYV12()
AssumeFPS(30)
SmoothLevels(gamma=1.2, RGMode=11, Lmode=3, Ecurve=1)
MCTemporalDenoise(settings="high", GPU=false)
#Adjust Colors manually (+v is more Red, -u is more yellow, +y is more bright/white)
ColorYUV(off_v=-7, off_u=3, off_y=0)


As above, you can play with other settings of MCT to tweak the final result (it will look even more impressive on the video because it will remove 90% of the random "grain" motion!) ...

7ek

Zergrinch
28th September 2009, 18:28
Wow, that's quite impressive! I'm probably going to adjust the red a bit more (probably crank it up to -20 or greater). But color me impressed. Thanks, man!

Just curious, is there any advantage/disadvantage to applying the manual color adjustment after smoothing and denoising?

7ekno
29th September 2009, 01:08
Just curious, is there any advantage/disadvantage to applying the manual color adjustment after smoothing and denoising?

Yeah, the Smoothlevel and denoise routine can alter "color" slightly, so manual correct at the end is a more linear method (changes are visible and predictable, doing it before either routine you need to understand what the routine does to predict how it will alter your colors) ...

Although with that said, it's probably more academic then practical (meaning I doubt you could visually tell the difference using the manual correction before or after), but it never hurts to try :P

7ek