VideoHelp Forum
+ Reply to Thread
Results 1 to 21 of 21
Thread
  1. Member
    Join Date
    Feb 2021
    Location
    Austria
    Search PM
    Hi there VideoHelpers!

    I'm trying to get my old VHS family tapes into the new millennium (a tad bit late, admittedly).

    My process is as follows:

    Using a DVD/VHS combo I get a digital signal with 576p via HDMI (720p and 1080i are possible too - not sure if my device resizes after sampling and just makes more of a mess though. Samples taken didn't look better to me).
    This I feed into a USB video capture device.
    Now I capture that with OBS-Studio at 1600x1200 (since OBS is giving me trouble setting other (non-default) resolutions and stretches if I choose 720x576 - I take recommendations on other capture tools with x264 output and not being VLC). After cropping this is 1584x1180 with 25 FPS (PAL Western Europe source & HDMI 576p output).

    Settings are as follows:
    Encoder: Quicksync H.264
    Target Usage: balanced
    Profile: high
    Keyframe Interval: 1
    Rate Control: CBR
    Bitrate: 12000
    Latency: Normal
    B Frames: 3
    Subjective Video Enhancements: Yes, please!
    (I'd love to just save what the USB thingie gives me, but I couldn't for the life of me figure out how to do that without recoding)


    This last step I've repeated 5 times (depending on the result I might go for another 2 but I'd rather not).

    Now the idea is to do median filtering over different recordings to get rid of any random noise and distortions my device added in. I'm aware that this will not get rid of anything that's in the source material already or is some kind of constant sampling flaw.

    Manually comparing the frames tells me that this will help. Actually doing it -so far- has failed/exploded in complexity because of all sorts of restrictions:

    Natron Python Scripting seems limited to actions outside of render-time - i.e. callbacks for things like 'node (dis-)connected' or setting up project structures.
    Shadertoy seems promising, easy to use and allows for clean code - but can only take 4 inputs.
    SeExpr takes enough inputs but is rudimentary to the point that there is no support for arrays beyond length 3 (and only one dimension at that). Coding with this is possible buuuuuuut...

    Before I continue to 'explore' my options (or have to resort to hard-coded sorting networks based on either SeExpr or GLSL) I'm asking for your help.

    - The shadertoy node does accept additional parameters apparently connected to OpenFX but I've only figured out how to hard-code those values. Can this be connected to an input-node somehow?

    - If that's a bust: is there another way that (somewhat easily) allows for a dynamic number of inputs? I'm not completely attached to Natron but I do want that nifty near-instant and interactive frame by frame preview since I will want to mess around a lot.
    I have some older recordings digitized in sets of 3 and stored on DVD from way back when (made with my devices VHS-to-DVD recording feature) that I'd like to redo as well. Once (if) I get this to work I'd also like to play around with temporal noise suppression algorithms (which would only be added to the median filter if the frame difference is small enough, hence giving a dynamic number of values to sort).

    - In case I do end up using sorting networks - is there a generator for swap macros (like this advertises to be) that actually works? Any advice on how to implement them in Natron? I'd probably go with SeExpr nodes for lack of choice...

    - Maybe I'm going about this in the wrong way entirely and/or there is a (free) ready-made solution already?

    - Any advice on the process I've outlined in the beginning would be welcomed too. Keep in mind that I've already done two 5er sets (while doing research on the algorithm side of things). I can switch tools/settings for the rest of the pile - but will only do so after my proof-of-concept works.

    Thanks for reading folks!

    PS: It occurred to me that I might want to post the Natron specific part in a Natron forum...


    ## -------------------------------------------------------------------------------------
    Edit:
    Life interfered,
    time passed,
    I have experiences to share.
    0. Easy doesn't work like I (or you) wants it to
    Easy solutions are often limited and when you hit trouble you're hard-pressed to even debug anything. Adding something beyond what a GUI offers? Often not possible either. So unless you're happy with quick and dirty: don't be afraid to tackle the 'big' console-only things early on. Thanks to playing around with it ffdshow has become a permanent part of my AV workflow now. Convert audio, mux formats, concat/cut, encode vapoursynth output, recode some webvideo or record your desktop? ffdshow!




    1. OBS works sorta, kinda, maybe fine ffmpeg to the rescue!
    If I use my nvidia graphics card I get 100ms lag for displaying frames - thats not recording or streaming, just displaying them. Should be a drivers bug, though.
    You can use custom output to use a bundled version of ffmpeg (that also allows you to choose the audio codec with advanced settings)
    OBS keeps showing 0 frames dropped (render and encode) , but sadly thats not what direct comparison in vapoursynth shows. I've lost up to 30 frames over 90 mins and there are no settings for inserting doubles that I've found. A frame here a frame there is not that bad in video-terms, for my needs it's crippling.
    lordsmurf pointed me towards virtualdub and her is a good reason: you get information about dropped frames there and can switch between instances via go -> next/prev dropped frame. Very useful that.





    2. Vapoursynth is superior to avisynth in that it works on top of python. That means you can add any code you find on the web and write your own to an unlimited degree right in your AV script.




    3. Vapoursynth is unfortunately not superior to avisynth - audio support is still in its infancy. If the current capabilities are not enough for you look into exporting timestamps and use ffshow to do the cutting for you or get external libraries like pydub or simpleaudio.
    If you just want to process your videos and leave cutting for another tool later on, it's as simple as: ffshow -i video.mkv -audio.ac3 -i chapters.txt -map_metadata 1 -c copy muxed.mkv




    4. poisondeathray recommended vapoursynth-median and that worked pretty well out of the box. Biggest drawback is what johnmeyer pointed out - when your frames are aligned badly artifacts happen. This can happen due to inconsistent VCRs and is one of the reasons TBCs are mentioned as essential for 'proper' grabs. More copies help and you can also help things along manually if you detect a bad section with the old eyeball mk1:
    src = core.std.StackVertical([
    core.std.StackHorizontal([src0, src1])
    , core.std.StackHorizontal([src2, src3])]
    , core.std.StackHorizontal([src4, src4])] # number needs to be even for stack but uneven for median so just double output one
    &nbsp
    scr.se_output
    then use:
    bad_start = 1000
    bad_end = 2000
    bad_src = bad_src[:bad_start-1] + good_src[bad_start:bad_end] + bad_src[bad_end+1:]
    Doing this is quick+dirty - you give more weight to a particular source for the median while removing a bad influence.

    Note that median has a 'int samples = number_of_pixels_to_check_for_similarity' parameter that will try to check previous/next frames (if the int sync parameter is bigger then 0 ) for suitability. This is meant for dropped frames and lazy line-ups. The higher the numbers the more accurate (and slower) - at some point this does detect the flaws in the picture as features, though.

    If you're looking for a less lazy/manual approach, you might want to cut the clip into blocks and use some metric to guess the 'sameness' for each frame (vs.ModifyFrame or vs.FrameEval) before feeding similar enough blocks to median. Statistical ones like mvsfunc.PlaneCompare() or psychovisual ones like google-pioneered butteraugli might work well for that.
    Note that this pre-selection is on a frame-level so unless you want whole chunks from one clip you still need the median afterwards.




    5. Yes, you can start your encoding out of your favorite editor! But piping in windows is a pain because of 'special' characters and 'escaping' procedures that stack. When looking to encode vapoursynth output having a .bat file is helpful. So here is what worked for me:

    "c:\path\to\vspipe\vspipe.exe" -y "c:\path\to\script\my_very_special_vs_script.v py" -a RANDOM_PARAMETER_TO_PASS_TO_VPY_SCRIPT="RANDOM STRING VALUE" - | "c:\path\to\quicksyncencoder\QSVEncC64.exe" --quality 4 --log-level info -c hevc --icq 24 -o "c:\path\to\outputfile\output.mkv" -i -

    "c:\path\to\ffmpeg\ffmpeg.exe" -hide_banner -loglevel verbose -hwaccel auto -i "c:\path\to\vspipe_outputfile\output.mkv" -i "c:\path\to\audiofile\audio.ac3" -c copy "c:\path\to\muxed_output\muxed_output.mkv"

    exit
    6. Determine what your (visual) limits are
    Watch short side-by-side comparisons of your before/after videos on your biggest screens for different (encoding) settings. Looking at single frames can make you loose focus on the 'bigger' picture easily. Differences between encoding settings are easy to attach too much time and meaning to as well. I used icq -18 in obs for small-filesize capture and don't see the difference to the cbr 12000 ones I did before. YMMV.




    7. waifu2x + alternatives, sharpening and denoising
    There are plenty of wonder-filters out there. AI is the keyword to 'make it all better' while taking away options. At the end of the day, however, remember point 0.
    Filters like waifu mainly do 3 things - enhance detail, upcale, remove/add/shape noise. You can do all of that yourself and separately.
    For resizing I went with jinc (with parameter "tap=6" to avoid artifacts), OpenCV_Detail for (NN-powered) sharpening. And knlm.KNLMeansCL for noise-removal.
    processed = processed.resize.Lanczos(range=1) # unclip YUV TV color-ranges for full 0-255 goodness
    processed = OpenCV_Detail(processed, strength = 30, bit_depth=processed.format.bits_per_sample) # detail enhancement
    processed = processed.resize.Lanczos(format=vs.YUV420P8, matrix_s="709", range=1) #OpenCV_Detail converts to RGB so convert back here
    processed = processed.knlm.KNLMeansCL( d = 4 , a=3, h= 2.8 , channels='UV').knlm.KNLMeansCL( d = 4 , a=4, h= 1.8 , channels='Y') # process channels separately to deal with color splotches. "d" is the temporal range
    processed = core.jinc.JincResize(processed, width=target_w, height=target_h, tap=6) #resize
    Be it noise-removal, sharpening or (up)scaling there are tons of options out there. Go experiment - it's fun
    This combination allows me to resize arbitrarily and have a bigger influence on the outcome than waifu2x did. Less artifacts too. You might want to adjust values for your source-material and degrain before enhancing detail. Again - YMMV.

    I hope this helps others that come across this thread and another big thank you to all who helped me!
    Last edited by VHSCritter; 20th Apr 2021 at 12:46.
    Quote Quote  
  2. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by VHSCritter View Post
    Now I capture that with OBS-Studio at 1600x1200
    Don't do that.
    720x480/576 max
    And VirtualDub, not OBS. OBS is streaming screen recording software, not analog capture software.

    Now the idea is to do median filtering over different recordings to get rid of any random noise and distortions my device added in.
    What POS device is that?
    You need a good VCR, and god capture card. (Note that novice/newbie ideas of "good" usually are not actually good.)

    You're essentially ruining the video, then trying to unruin it using ruinous methods. This is a a clusterf-ck of a capture/restore job. You need to go back to basics here, the VCR and capture. Then post-process noise in Avisynth.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  3. Member
    Join Date
    Feb 2021
    Location
    Austria
    Search PM
    Originally Posted by lordsmurf View Post
    Originally Posted by VHSCritter View Post
    Now I capture that with OBS-Studio at 1600x1200
    Don't do that.
    720x480/576 max
    And VirtualDub, not OBS. OBS is streaming screen recording software, not analog capture software.
    I'll look into that. Both VirtualDub and VirtualDubMod have been abandoned and I've long since switched to Avidemux which is why I didn't consider it.
    Sadly Avidemux does not seem to be able to do capture. Maybe I'm missing something here?

    As I understand it 576 should be my default for capture since that's what the VCR outputs. So why 480?
    To be perfectly honest, I didn't perceive loss of sharpness as a visible and pressing problem. Introduced (color) artifacts are.

    Originally Posted by lordsmurf View Post
    What POS device is that?
    You need a good VCR, and god capture card. (Note that novice/newbie ideas of "good" usually are not actually good.)
    My device is a Samsung DVD-VR355. It's not great I'll admit:

    Image
    [Attachment 57540 - Click to enlarge]

    Image
    [Attachment 57541 - Click to enlarge]


    Those diagonal lines of 'pixel defects' and color-blobs are moving. And yes - I did clean anything I could reach within the device (with rubbing alcohol).

    On the other hand it's what I have and buying a pro device of some kind is expensive.
    None of our home movies are good enough in base quality to be worth truly professional attention and I'm not willing to spend big bucks for little gain - especially considering that 720p is 'good enough' for our folks even when youtube 4k side-by-side comparisons are presented to them.
    Moving blotches of color are distracting, however, so those I want gone. Since I enjoy image processing tasks, putting in the work on that is somewhat of a bonus for me

    Originally Posted by lordsmurf View Post
    You're essentially ruining the video, then trying to unruin it using ruinous methods. This is a a clusterf-ck of a capture/restore job. You need to go back to basics here, the VCR and capture. Then post-process noise in Avisynth.
    In an ideal world that is completely right and would be my advice to any relative who'd dare to burden me with such a task. Consider, however, that 'not high-end' isn't 'garbage'. The picture I get from my device is fine for my needs (specific color-blotch issue aside). The parts that aren't I can do something about with my approach. If I can figure it out.

    I'm just shooting for good-enough here. Not commercial grade.

    In any event thank you for your help!
    Quote Quote  
  4. For the median of multiple captures processing - avisynth and vapoursynth have a median plugin that accept 3 to 25 inputs

    http://avisynth.nl/index.php/Median
    https://github.com/dubhater/vapoursynth-median

    Near instant preview with avspmod, or vsedit
    Quote Quote  
  5. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    VirtualDub is not abandoned.
    VirtualDubMod was never suggested for capturing, it is abandoned, very old.

    You'll have a hard time doing a median on MPEG captures. The compression negates some potential median.

    480= NTSC
    576= PAL

    This is VHS. Nothing is ever "commercial grade". No such terms should exist in this space.
    There's simply good video, or crap video, the end. Not some sort of middle ground.
    There are some variations in what "good" quality can look like, but it depends on factors. But there's a wide gulf between good and crap. Again, no middle ground. Cheap/easy/lazy yields crap. Modest effort/learning/budget gets good.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  6. I started my "career" in video restoration doing multiple captures and then averaging, in order to reduce noise. However, I gave up after doing only one or two tapes. The problem is that you can NEVER get all the captures to line up perfectly. Even if you get them to line up in one spot, whenever there is any sort of interruption in the tape timecode (e.g., when a camcorder stops and then the next scene starts after a small stretch of blank tape), each capture will be offset after the break.

    Also, I found that the modern noise reduction tools in AVISynth can usually do as good a job, or better.

    Finally, it just takes too long to capture one tape multiple times. Not only don't I want to kill that much time, but at this point, I am getting very protective of the few VCRs I have that are still fully functional. On the VHS side, I have four decks, and none of them work perfectly at all speeds and for both HiFi and linear.
    Last edited by johnmeyer; 27th Feb 2021 at 16:05. Reason: typo
    Quote Quote  
  7. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by johnmeyer View Post
    I am getting very protective of the few VCRs I have that are still fully functional.
    Wise.

    When I lose decks, I feel gutted. So costly to repair or replace, hard to fix.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  8. Originally Posted by lordsmurf View Post
    When I lose decks, I feel gutted. So costly to repair or replace, hard to fix.
    I can fix almost any piece of electronics, and have no problems with things like "re-capping" a power supply. However, the mechanical alignments in VCRs and the very non-standard pinch roller and wheel diameters make it almost impossible to get one running perfectly, without access to tools specific to VCRs and, in some cases, specific to the model line.

    I keep thinking there must be a few repair places around. I know that, back in the early 1980s, my dad decided to re-build his 1960 Hallicrafters shortwave receiver and was able to find one of the engineers who designed it back the SX-100 in the 1950s, and who was rebuilding these units. He then hand-tweaked and tuned it so that it was "hotter" than when brand new. I still have the receiver and it still works great.

    There have got to be people like this for VCRs.
    Last edited by johnmeyer; 26th Feb 2021 at 20:51. Reason: typo
    Quote Quote  
  9. Member
    Join Date
    Feb 2021
    Location
    Austria
    Search PM
    Originally Posted by poisondeathray View Post
    For the median of multiple captures processing - avisynth and vapoursynth have a median plugin that accept 3 to 25 inputs [...]
    Near instant preview with avspmod, or vsedit
    Now this I'm going to look into - thank you very much!
    Any hints on where to start looking to get that done conditionally on a per frame base? I.e. if frameDelta > X do median(currentFrame)

    Originally Posted by lordsmurf View Post
    VirtualDub is not abandoned.
    VirtualDubMod was never suggested for capturing, it is abandoned, very old.
    Wikipedia says the 'final' release 1.10.4.35491 came out 7 years ago. The page you linked also states 'NO LONGER DEVELOPED'.
    What am I missing?

    Originally Posted by lordsmurf View Post
    You'll have a hard time doing a median on MPEG captures. The compression negates some potential median.
    Ah yes I've overlooked that, thanks for pointing it out! Would I be able to compensate with a bitrate high enough? Or at least get the loss in sub-percentage regions? Or maybe I'm overthinking here - is there a better alternative to mpeg or raw compression? Something I an do in realtime capture with my i5-6300HQ / geforce 960m, preferably. Doing raw then compressing it after might be something to look into as well, I only have about 250gig worth of space for this, which is why I went for compression in the first place. h264 can be encoded using hardware acceleration on my machine h265, sadly, cannot.

    Originally Posted by lordsmurf View Post
    480= NTSC
    576= PAL
    I did state the source material is PAL. You were being general, my bad.

    Originally Posted by lordsmurf View Post
    This is VHS. Nothing is ever "commercial grade". No such terms should exist in this space.
    Yup, Beta is better .
    (This is probably the only time in my life that I can make this argument without having to resort to argumentative contortions)

    On a more serious note: What I meant wasn't the quality of the resulting material but the amount and quality of effort needed to get that far.
    I'd say pareto's principle is in full effect thanks to issues like johnmeyer pointed out. You absolutely can tweak every scene (or even frame) per hand - and for some restoration projects this is likely done. That's what I was referring to.

    Originally Posted by lordsmurf View Post
    There's simply good video, or crap video, the end. Not some sort of middle ground.
    There are some variations in what "good" quality can look like, but it depends on factors. But there's a wide gulf between good and crap. Again, no middle ground. Cheap/easy/lazy yields crap. Modest effort/learning/budget gets good.
    That seems a bit extreme to me but you're the expert. In my case I can say that I'm satisfied (or resigned) with the general picture I get - with the prominent exception of those diagonal lines and blotches. Once I've dealt with that I'll play around with some other filters just because I have a pretext to do so and take what low-hanging fruit I can get that way.
    Your argument about better capture software and better fitting settings is well received and I'll look into that once my proof of concept processing chain works. Thank you!

    Originally Posted by johnmeyer
    ...multiple captures and then averaging, in order to reduce noise ... gave up [because] ... you can NEVER get all the captures to line up perfectly. Even if you get them to line up in one spot ... each capture will be offset after the break.
    A good argument to make against my approach. And it's nice to see I'm not the only one to start out with that idea
    My quick+dirty proof of filter concept was based on 2-3 minute clips of a scene change between a light and dark/indoor and outdoors part which does not touch upon this problem at all. It's something I definitely have to look into as well. Thanks for bringing that up!
    Quote Quote  
  10. Member
    Join Date
    Feb 2021
    Location
    Austria
    Search PM
    Originally Posted by VHSCritter View Post
    Originally Posted by lordsmurf View Post
    VirtualDub is not abandoned.
    VirtualDubMod was never suggested for capturing, it is abandoned, very old.
    Wikipedia says the 'final' release 1.10.4.35491 came out 7 years ago. The page you linked also states 'NO LONGER DEVELOPED'.
    What am I missing?
    I think I found it - way back when I switched to VDubMod (because of mkv? support I believe). There were others and some stood the test of time apparently:
    VirtualDubFilter aka VirtualDub2 - so thanks for prompting me to look more closely!

    Edit: This forum turns random words into links even while being part of URL tags...
    Last edited by VHSCritter; 28th Feb 2021 at 04:46.
    Quote Quote  
  11. Originally Posted by VHSCritter View Post
    Originally Posted by poisondeathray View Post
    For the median of multiple captures processing - avisynth and vapoursynth have a median plugin that accept 3 to 25 inputs [...]
    Near instant preview with avspmod, or vsedit
    Now this I'm going to look into - thank you very much!
    Any hints on where to start looking to get that done conditionally on a per frame base? I.e. if frameDelta > X do median(currentFrame)
    What parameters? FrameDelta in terms of what measurement ?

    ConditionalFilter in avisynth
    http://avisynth.nl/index.php/ConditionalFilter

    e.g. maybe YDiffFromPrevious (according to a threshold) - ie. using the Y plane , if difference is greater than some value, replace with the median of 3 streams, otherwise keep current frame if it's below the threshold. You can add multiple conditions and booleans like satisfy YDIffFromPrevious and YDiffToNext has to be greater than some value

    vapoursynth uses python, so if you're versed in python it's incredibly powerful and flexible.
    Quote Quote  
  12. Member
    Join Date
    Feb 2021
    Location
    Austria
    Search PM
    Originally Posted by poisondeathray View Post
    Originally Posted by VHSCritter View Post
    Any hints on where to start looking to get that done conditionally on a per frame base? I.e. if frameDelta > X do median(currentFrame)
    What parameters? FrameDelta in terms of what measurement ?
    Undecided atm. Absolute difference of partially summed median clusters of current frame-set versus previous ones perhaps. Might be overkill though so maybe just a sum of absolute differences in rgb values for comparison? Maybe a combination of luma and chroma - something I look forward to fiddle with

    Originally Posted by poisondeathray View Post
    ConditionalFilter in avisynth
    http://avisynth.nl/index.php/ConditionalFilter

    e.g. maybe YDiffFromPrevious [...]
    vapoursynth uses python, so if you're versed in python it's incredibly powerful and flexible.
    Thanks a bunch!
    And in case anyone else reading this is wondering...

    Python is nice indeed and since my goal is fiddling around myself instead of using preexisting stuff it's the way to go for me.
    Quote Quote  
  13. BTW, it was eighteen years ago when I first posted my experience with averaging multiple VHS captures in order to reduce random noise. I posted the following in the Sonic Foundry Vegas forum. Back then, it was populated by professionals, all of whom were infinitely more experienced and smarter than I was. Here is the link:

    https://www.vegascreativesoftware.info/us/forum/my-ultimate-vhs-tape-restoration-recipe--20943/

    One thing you will note is the discussion of what math to use when averaging the captures. Also note that I did all of this in Vegas because it is easy to get the tracks aligned and, with a few tricks that I didn't mention, it is also pretty easy to subtract the tracks instead of add them, something that will immediately give you a visual indication if your two captures are no longer exactly frame-accurate with each other.
    Quote Quote  
  14. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by VHSCritter View Post
    What am I missing?
    Ain't broke, why fix it?
    It is the tool that still works best for analog capture.
    The VirtualDub2 fork doesn't work the same way, capture is different, and can actually cause dropped frames. Only use it for cards that refuses to work well (or at all) in the original official VirtualDub.

    I never understand the mindset of "it must be new for me to use it" --- and ironically, to capture VHS tapes. WTF?

    Originally Posted by lordsmurf View Post
    Would I be able to compensate with a bitrate high enough?
    And remove all GOP, I-frame only.
    And 4:2:2

    geforce 960m
    Graphics cards are meaningless for video capture.

    Beta is better
    Nope. Just different.
    VHS is better due to S-VHS VCRs with line TBCs. Betamax decks are sadly all fairly lousy, even the "best" ones.

    You absolutely can tweak every scene (or even frame) per hand
    Usually insanity.

    - and for some restoration projects this is likely done.
    Rarely.

    Originally Posted by lordsmurf View Post
    There's simply good video, or crap video, the end. Not some sort of middle ground.
    There are some variations in what "good" quality can look like, but it depends on factors. But there's a wide gulf between good and crap. Again, no middle ground. Cheap/easy/lazy yields crap. Modest effort/learning/budget gets good.
    That seems a bit extreme to me
    Nope.

    A good argument to make against my approach. And it's nice to see I'm not the only one to start out with that idea
    There are restoration times where this method is valid. Rarely. But as a general-use capture method, more insanity.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  15. Member
    Join Date
    Feb 2021
    Location
    Austria
    Search PM
    Originally Posted by johnmeyer View Post
    BTW, it was eighteen years ago when I first posted my experience with averaging multiple VHS captures in order to reduce random noise. I posted the following in the Sonic Foundry Vegas forum.
    Gotta admit I torn on this. Have the fun is messing around but on the other hand ... results.
    Well I'll definitely give this a read so thanks for dragging this back to the present. From my first brief skim I can already see there is more though in there than I likely would have put in.

    Originally Posted by johnmeyer View Post
    Also note that I did all of this in Vegas because it is easy to get the tracks aligned
    When compared to avi- or vapoursynth? The realtime frame by frame preview offered by integrated editors like Natron is what put me off those at first. Getting diagnostics should never be hard. With the advice poisondeathray gave me I'm hoping that won't be a problem.


    Originally Posted by lordsmurf View Post
    Originally Posted by VHSCritter View Post
    What am I missing?
    Ain't broke, why fix it? [...] It is the tool that still works best for analog capture.
    The VirtualDub2 fork doesn't work the same way, capture is different, [...]
    I never understand the mindset of "it must be new for me to use it" --- and ironically, to capture VHS tapes. WTF?
    To add to the irony I'll confess to having made that particular argument myself a few all the times.

    Originally Posted by lordsmurf View Post
    Originally Posted by VHSCritter View Post
    Would I be able to compensate with a bitrate high enough?
    And remove all GOP, I-frame only.
    And 4:2:2
    I'm guessing that means:
    Keyframe Interval: 1
    B Frames: 0 (I'm guessing setting KI to 1 makes this setting redundant but better be sure)

    Would you say 12000 Kbps are enough? Looking at the resulting videos I didn't really spot a difference even with 9000.

    geforce 960m
    Graphics cards are meaningless for video capture.
    Sadly that's only true if the system is fast enough to compress the capture on the fly to not drop frames. Sadly the 960m does not offer hardware acceleration for many codecs with h264 being the most customizable one. The less said about Intel the better.

    Your point about good results requiring good hardware proves itself time and again.
    Now if only I wasn't such a cheap b*stard...

    Well I better get back to my pre-scheduled VHS capture insanity


    Am I right to assume its better to:

    1. capture at 720x576
    2. process
    3. crop/refill and stretch to 768x576

    and forget about setting AR fields which might just be ignored?
    My thought is that while it might take more space this guarantees reproduce-able results.
    Quote Quote  
  16. My point about track alignment is that I doubt very much you will be able to get AVISynth (regardless of version) to give you any reliable indicator of when the tracks get misaligned. I have written literally hundreds of scripts which involve detecting differences between frames. Even something as simple as detecting scene changes fails all the time. If you look over at doom9.org, you'll see dozens of threads, many of which I have participated in, where various people attempt to write a reliable scene detection script. They all fail, both with false positives as well as false negatives.

    If one can't write an AVISynth script which can reliably detect a scene change, it has no hope of finding the point where a video gets out of sync by one frame.

    In addition, the real killer for noise reduction is that alignment really matters. By contrast, there are many situations where being off by one frame will be hardly noticeable. If you start trying to average multiple frames and one of your sources is off by a frame, you are going to seriously degrade the video.

    One last thought: your video and the equipment used to capture it has to be really stable. If you have any sort of vertical jumping or waving, or any other type of time base issue, the two (or more) clips won't come even close to aligning.
    Last edited by johnmeyer; 28th Feb 2021 at 10:48. Reason: bad grammar
    Quote Quote  
  17. Originally Posted by johnmeyer View Post
    My point about track alignment is that I doubt very much you will be able to get AVISynth (regardless of version) to give you any reliable indicator of when the tracks get misaligned.
    Why not?

    It will be as reliable as a NLE - In addition to various metrics, you can analyze it the same way as in vegas or any NLE - ie. visual indicator with layer differences

    eg.
    Overlay(a,b , mode="Difference")

    You can amplify differences with Levels, if you're looking for tiny microscopic difference, but it shouldn't be necessary on VHS

    If the frames are no longer temporally or spatially aligned, there should be massive jump in differences compared to other sections which were aligned

    If you're using human eye to check, avspmod can playback the difference script, or various software players can playback avs scripts if you prefer (e.g. some can playback at 2x,4x,8x speed and have jump navigation features like skip 30sec)

    You can combine metrics with WriteFileIf, to parse the detection script for sections that show differences larger than some value, so you can go back and look in closer detail later at those sections. Even if you were using a NLE primarily, this helps reduce the work you have to do later in the NLE
    Quote Quote  
  18. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by VHSCritter View Post
    I'm guessing that means:
    Keyframe Interval: 1
    B Frames: 0 (I'm guessing setting KI to 1 makes this setting redundant but better be sure)
    Would you say 12000 Kbps are enough? Looking at the resulting videos I didn't really spot a difference even with 9000.
    1I 0B 0P
    With I/P/B GOP, minimum 15mbps, but 25 is closer to actual lossless.
    With I only, the 25-50 max range.

    Sadly that's only true if the system is fast enough to compress the capture on the fly to not drop frames. Sadly the 960m does not offer hardware acceleration for many codecs
    I was MPEG capturing with ATI AIW almost 20 years ago. So ... no.

    Your point about good results requiring good hardware proves itself time and again.
    Now if only I wasn't such a cheap b*stard...
    There are workarounds to some errors, which involve (sometimes acceptable) quality hits. But eventually, there is a budgetary floor.

    Am I right to assume its better to:
    1. capture at 720x576
    2. process
    Yes.

    3. crop/refill and stretch to 768x576
    Why? There is rarely good reason to upsize, as it does more harm than good.

    and forget about setting AR fields which might just be ignored?
    AR flags don't exist, pay attention to AR manually.

    My thought is that while it might take more space this guarantees reproduce-able results.
    Always.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  19. Member
    Join Date
    Feb 2021
    Location
    Austria
    Search PM
    Originally Posted by lordsmurf View Post
    1I 0B 0P
    With I/P/B GOP, minimum 15mbps, but 25 is closer to actual lossless.
    With I only, the 25-50 max range.
    Good thing I asked. My eyes probably aren't that great anymore.

    Originally Posted by lordsmurf View Post
    Sadly that's only true if the system is fast enough to compress the capture on the fly to not drop frames. Sadly the 960m does not offer hardware acceleration for many codecs
    I was MPEG capturing with ATI AIW almost 20 years ago. So ... no.
    My first generation i5 couldn't even playback h265 without hitching. My first attempts at setting video compression lead to frame drops. To be fair that's obs experience and not mpeg2 either. Maybe vdub is that much better.

    Am I right to assume its better to:
    1. capture at 720x576
    2. process
    Yes.

    3. crop/refill and stretch to 768x576
    Why? There is rarely good reason to upsize, as it does more harm than good.
    As I understand it pal is 4:3 while 720x576 is 5:4. So at some point I need to stretch to 768x576 if I dont want my picture smooshed.
    At first I thought perhaps my USB capture thingy is at fault for not allowing me to capture at 768 directly, but this seems to be an issue for others as well.
    Quote Quote  
  20. Originally Posted by VHSCritter View Post

    3. crop/refill and stretch to 768x576
    Why? There is rarely good reason to upsize, as it does more harm than good.
    As I understand it pal is 4:3 while 720x576 is 5:4. So at some point I need to stretch to 768x576 if I dont want my picture smooshed.
    At first I thought perhaps my USB capture thingy is at fault for not allowing me to capture at 768 directly, but this seems to be an issue for others as well.[/QUOTE]

    Typically an AR flag is used

    Think about PAL 4:3 DVD's . They are 720x576. An aspect ratio flag either stretches to 16:9 or 4:3 on playback . This is standardized, so professional programs like NLEs recognize standardized ratios

    But if it's intended for web, usually it's resized to square pixel equivalents for the final distribution format. But you gain nothing by vertically resizing it early in the workflow, leave that until the end if you need it. 720x576 is going to far exceed the actual resolution from a VHS source anyways, it's already oversampled. More pixels to cap puts you at higher risk of drops and desync, there is no reason to use 768x576
    Quote Quote  
  21. Member
    Join Date
    Feb 2021
    Location
    Austria
    Search PM
    Originally Posted by poisondeathray View Post
    Originally Posted by VHSCritter View Post
    Am I right to assume its better to:

    1. capture at 720x576
    2. process
    3. crop/refill and stretch to 768x576

    and forget about setting AR fields which might just be ignored?
    My thought is that while it might take more space this guarantees reproduce-able results.
    But if it's intended for web, usually it's resized to square pixel equivalents for the final distribution format. But you gain nothing by vertically resizing it early in the workflow, leave that until the end if you need it. 720x576 is going to far exceed the actual resolution from a VHS source anyways, it's already oversampled. More pixels to cap puts you at higher risk of drops and desync, there is no reason to use 768x576
    Good to know I got that right at least
    Does it make sense to resize down any further since it's over-sampled? I'm not gonna do it since space isn't a big concern anymore - I'm just curious. As mentioned I initially captured to 1600x1200 since I thought that processing later on might make use of additional pixels to be less coarse.
    I didn't perceive a visible effect (positive or negative) from this. But maybe that's because my attention got captured by those artifacts.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!