Hello. Seeking some advice in regard to cleaning up very old mpeg2 capture, via vapoursynth ...
Home Video Provenance:
The video is a hand-me-down from elderly relatives (and that takes some doing at my age ) who projected 2h worth of ageing Super8 stuff onto a projector screen and recorded that to a (non stabilized seated) camcorder and then recorded that to VHS tape. Some parts looks like VHS to VHS copy.
... Of which I have what looks there only remains a gen2-like copy.
The only hardware I have access to (being retired, no $ available) is the LG RC689D to copy the VHS tape to a DVD as an mpeg2 recording; the DVD Recorder is an old LG RC689D https://www.lg.com/au/support/manuals?csSalesCode=RC689D.BAUSLLK
Issues so far:
As one may well imagine, it's as blocky and dirty and noisy and spotty and as flickery and colour-faded as anything and the hand-held videoing rolls around a bit.
I could just leave it as-is ... but it contains the only known footage of my wife's relatives now deceased, so my goal is to clean it up as reasonably as is possible with what I have available.
I only have vapoursynth ... so I am attempting to cherry-pick and adapt bits of videoFred's script and some of DG's stuff like DGDecodeNV, DGDegrain, DGSharpen and PVBob.
So far I've managed to:
1 somewhat-deblock it
2 sort of denoise it
3 sort of sharpen it
4 begin to use that as a pre-filtered clip for input to Analyze and thence DepanStabilise, however my guess is the flickering will not help (I'll need heavy duty deflickering later anyway).
I've tried searching, but ...
Unfortunately vapoursynth appears not to have an updated Deflicker equivalent of https://github.com/pinterf/Deflicker (the avisynth x64 dll crashed vapoursynth when attempting to load it; I have all the the visual studio runtimes installed), which makes things fairly difficult.
Does anyone know of something or how to get Deflicker loaded into vapoursynth ?
Or, a reasonably equivalent Deflicker ?
Is there a vapoursynth equivalent of HDRAGC or perhaps autolevels or colorYUV which automatically tries to restore colours ?
Here's a downloadable 30 second 22Mb clip to show what I mean.
And a 71Mb sampler of items across the mpeg2 file
+ Reply to Thread
Results 1 to 15 of 15
Last edited by hydra3333; 12th May 2021 at 05:22.
Does the original Super 8 still exist? If so I'd spend the money and have it scanned at 2 or 4K. It will look like it was shot yesterday and save you a lot of hassle.
Thank you for your responses.
I suspect with up to ~2h, the $ will be well beyond our means (I looked at scanning our film slides recently, diy was ~$500 to buy an Epson v600 scanner whereas professional was circa $2k).
I also try not not install a lot of stuff which is why I'm running a portable version.
I have ubuntu in a VM mainly for cross-compiling ffmpeg with/without OpenCL and vapoursynth/avisynth+ support.
Running natively in Win10x64 with all cores available (a 3900X) would be faster than in a VM is my guess.
At the moment I have foregone OpenCL, preferring DG's tools which run in both avisynth+ and vapoursynth, hence atm I only use ffmpegx64 cross-compiled with avisynth+ and vapoursynth support enabled so as to have access to those tools.
Yes, it seems a range of plugins are unavailable under vapoursynth to use in running a mod of videoFred's and John Meyer's approach (eg defliker, hdragc), and other plugins are unavailable under avisynth+x64 (eg hrdagc).
I guess I'll try a mod of the Groucho's universall avisynth installer and try the avisynth+ x64 version and attempt to work around no hdragc. Advice welcomed about that.
Just on plugins, downloading a range of avisynth+ plugins based on the "avisynth external plugins" web page, there were half a dozen or so flagged by vitustotal as potentially compromised, most by unknown-to-me tools and a few by well-known ones eg microsoft, trend, etc; so I'm not yet sure what to think about those.
edit: in fact the universal installer was just flagged by virustotal as malwarebytes saying it had Malware.Heuristic.1001 ... no doubt a false flag (just to be clear, the files_only from github flags as the same).
edit2: virustotal (only "SecureAge APEX") flagged AVSPLUS370_x64 avisynth dll as "Malicious" which surely must be false, the x86 one came up ok. "SecureAge APEX" also flags some other individual files in the .7z
Last edited by hydra3333; 14th May 2021 at 23:49.
many thanks to Groucho for the universal installer !
in the end I only had to pop ffmpegx64 et al into the distribution folder and it picked up and used avisynth+ ok with manual loading of filters.
so, avisynth+ is working a treat ... now on to try to do something with the source available to me ...
VirtualDub's deflicker filter in AviSynth:
Mpeg2Source("family-sampler_2.d2v", CPU2="xxxxxx", Info=3) # deblocking and deringing filters enabled LoadVirtualDubPlugin("g:\Program files\VirtualDub\plugins\deflick.vdf","DeFlick") ConvertToRGB32(interlaced=true) SeparateFields() DeFlick(4, 20, 0, 50, 0) # window size, softening, interlaced, scene change threshold, show scene change Weave() ConvertToYV12(interlaced=true) QTGMC() SRestore(frate=16)
It is possible DeFlick may be x86 only, I hope this http://avisynth.nl/index.php/DeFlicker for avisynth x64 is close enough
Ah, and the inimitable QTGMC as well
And it seems Srestore will be useful on the Super8 segments !
I must gives these a try.
Last edited by hydra3333; 15th May 2021 at 21:50.
I've only seen a 32 version of Donald Graft's Deflicker for VirtualDub. I used in with 32 bit VirtualDubPlus.
I just verified that you can use it with 64 bit AviSynth (and editor/encoder) with mp_pipeline():
MP_Pipeline(""" ### platform: win32 Mpeg2Source("family-sampler_2.d2v", CPU2="xxxxxx", Info=3) LoadVirtualDubPlugin("g:\Program files\VirtualDub\plugins\deflick.vdf","DeFlick") ConvertToRGB32(interlaced=true) SeparateFields() DeFlick(4, 20, 1, 50, 0) # window size, softening, interlaced, scene change threshold, show scene change Weave() ConvertToYV12(interlaced=true) #if necessary ### ### """) QTGMC() SRestore(frate=16)
Thank you for your guidance !
I experimented and found avisynth+ x64 DeFlicker was "close enough" equivalent given the nature of the source. https://github.com/pinterf/Deflicker/releases
There is a little progress, a few of the "spots" are gone however a lot remain. Most of the blocking is gone.
So far, the script zooms along at ~6 fps on a 3900X, avisynth+ x64, ffmpeg x64 ... and it can only go down from there.
While it is a long way from good, it does look a tad better. It has "character".
The result is very soft, still has a lot of dirt/spots, however may appear a little more pleasing to some eyes than the original especially with that blocking.
Needed to play with levels/coloryuv2 (per videoFred's script) as something caused roofs to gain blue patches and blue skies made scenes more red.
Ended up using AutoAdjust; it had the same issues but appeared (perhaps wrongly interpreted) to be slightly "better", oh well.
Depan motion compensation not in place yet.
Some parts of the video seem amenable to it, others jump around and blur the result terribly.
I suppose I'll need to look for parts that seem amenable and apply it just to those.
Oh. I didn't do so well on the colours jumping around on the original clip, something to work on I guess.
Still, the horrible block are gone and the chroma noise seems somewhat soothed.
Still tinkering with Spotless.
Last edited by hydra3333; 16th May 2021 at 23:10.
Well, in the end I wasn't willing to invest more time given the nature of the source ... a video camera recording of super8 projected into a screen where it seemed like the camera autofocus was constantly going in and out of focus and the camera moved around and captured a lot of various projector screen edges at various times. And the VHS-to-mpeg2 transfer for PC processing introduced a LOT of terrible blocking.
Attached is the final result for this clip, it is cleaned up a tad and colours auto tweaked a little. Not a lot of change, but I did re-learn a fair bit
Since I had to call it as "having character" and the result had to be PAL DVD:
omitted 16fps srestore, I wasn't willing to invest time to learn how turn that into 25fps
omitted motion stabilization (for this source, in general it was "better" without)
Unless someone is desperate, I won't post the script since by the looks of google there are about 50 million similar scripts around already ... most of them "better" for most needs.
The original 71Mb sampler of items across the mpeg2 file
Attached is the result compared, 56Mb.
Last edited by hydra3333; 20th May 2021 at 02:33. Reason: rejigged comparison
Thank for the link