VideoHelp Forum


Try StreamFab All-in-One and rip streaming video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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).

    However:
    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 ?

    And:
    Is there a vapoursynth equivalent of HDRAGC or perhaps autolevels or colorYUV which automatically tries to restore colours ?

    Samples:
    Here's a downloadable 30 second 22Mb clip to show what I mean.
    https://drive.google.com/file/d/1SsYEhNgzpRnok9FtLIh4oBWHK-AEAz3M/view?usp=sharing

    And a 71Mb sampler of items across the mpeg2 file
    https://drive.google.com/file/d/1FcZKgmoNHabrp6XEdKBQWVgzZ4tS7pUH/view?usp=sharing

    Thanks !
    Last edited by hydra3333; 12th May 2021 at 05:22.
    Quote Quote  
  2. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    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.
    Quote Quote  
  3. @ the OP: Out of curiosity, why do you stick to vapoursynth? You might get more help for film restoration based on Avisynth.
    Quote Quote  
  4. Probably linux

    Supposedly avisynth 3.5+ runs natively on linux now (no more wine , or avxsynth, or other workarounds); but not sure if all plugins are available

    http://forum.doom9.net/showthread.php?t=180436
    Quote Quote  
  5. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Thank you for your responses.

    Originally Posted by clashradio View Post
    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.
    Unfortunately, the sources no longer exist. I will try to chase up, but afaik they do not
    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).

    Originally Posted by Sharc View Post
    @ the OP: Out of curiosity, why do you stick to vapoursynth? You might get more help for film restoration based on Avisynth.
    Yes, only because I migrated to it some time ago from avisynth 2.5.7 as vapoursynth appeared to be more modern and well supported, I had a cursory acquaintance with python, vs satisfied my needs then, and I preferred to work in one tool rather than a couple. Silly me
    I also try not not install a lot of stuff which is why I'm running a portable version.

    Originally Posted by poisondeathray View Post
    Probably linux
    Supposedly avisynth 3.5+ runs natively on linux now (no more wine , or avxsynth, or other workarounds); but not sure if all plugins are available
    http://forum.doom9.net/showthread.php?t=180436
    Thank you for the suggestion.
    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

    Regards !
    Last edited by hydra3333; 14th May 2021 at 23:49.
    Quote Quote  
  6. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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 ...
    Quote Quote  
  7. Originally Posted by hydra3333 View Post
    so, avisynth+ is working a treat ... now on to try to do something with the source available to me ...
    I tried using VirtualDub's deflicker filter in AviSynth:

    Code:
    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)
    Image Attached Files
    Quote Quote  
  8. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Originally Posted by jagabo View Post
    I tried using VirtualDub's deflicker filter in AviSynth:

    Code:
    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)

    Thank you.
    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.
    Quote Quote  
  9. Most x86 plugins can run in a x64 host and x64 avs+ process with mp_pipeline ( at least with the windows version of avisynth+)
    Quote Quote  
  10. 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():

    Code:
    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)
    Quote Quote  
  11. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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.
    Image Attached Files
    Quote Quote  
  12. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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.
    Image Attached Files
    Last edited by hydra3333; 16th May 2021 at 23:10.
    Quote Quote  
  13. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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
    https://drive.google.com/file/d/1FcZKgmoNHabrp6XEdKBQWVgzZ4tS7pUH/view?usp=sharing

    Attached is the result compared, 56Mb.
    Image Attached Files
    Last edited by hydra3333; 20th May 2021 at 02:33. Reason: rejigged comparison
    Quote Quote  
  14. That looks like something where it might even be worth looking into whether https://github.com/cszn/BSRGAN or similar could help.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  15. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Thank for the link
    Quote Quote  



Similar Threads