VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Member
    Join Date
    Sep 2014
    Location
    Italy
    Search PM
    Hi guys, I have been using Avisynth for over 15 years.

    But until today I could not create a script that works well with black horizontal lines because they are of different sizes.

    Almost all the VHS tapes I have are very oxidized because where I live the normal humidity is almost 90% and it is also very hot.

    In this case, do you know any program or Avisynth script that can find these horizontal lines automatically in the video so that I can do a faster and more optimized manual editing?


    Thank you very much in advance
    Quote Quote  
  2. Try searching the forums for "comets". Is that what you're seeing?
    Quote Quote  
  3. Member
    Join Date
    Sep 2014
    Location
    Italy
    Search PM
    Originally Posted by jagabo View Post
    Try searching the forums for "comets". Is that what you're seeing?
    Thanks Jagabo, I did a search in the forum about "Comets"

    But I found no solution, in my case I have some 6 hours (on average) vhs tapes oxidized. And the main problem is the black horizontal lines of various sizes.

    It also has thin transparent horizontal lines and white lines of various sizes.

    In this case, if there was a way for me to scan where these errors are throughout the video, with the exact time, then I could do a much faster and more accurate manual editing. Instead of segmenting the video into each type of error and creating a script for each case.

    Do you know if there is any script or program that does this?

    Thanks a lot!
    Quote Quote  
  4. You'll need to upload a sample of the source with the various lines. Don't filter or re-compress as that will change the nature of the lines.
    Quote Quote  
  5. Member
    Join Date
    Sep 2014
    Location
    Italy
    Search PM
    Originally Posted by jagabo View Post
    You'll need to upload a sample of the source with the various lines. Don't filter or re-compress as that will change the nature of the lines.

    Video Sample:


    https://drive.google.com/file/d/1YI1Dv6Q7bJhA5a2Y59Y9S80qsyEuT02b/view?usp=sharing


    Thank you in advance!
    Quote Quote  
  6. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    You can upload up to 500mB here,lot easier to get to than google drive.
    I think,therefore i am a hamster.
    Quote Quote  
  7. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by NLP View Post
    Originally Posted by jagabo View Post
    You'll need to upload a sample of the source with the various lines. Don't filter or re-compress as that will change the nature of the lines.

    Video Sample:


    https://drive.google.com/file/d/1YI1Dv6Q7bJhA5a2Y59Y9S80qsyEuT02b/view?usp=sharing


    Thank you in advance!
    As jagabo said, "Don't filter or re-compress as that will change the nature of the lines." If you capture in h264 is not good for further restoration, and in general.

    BTW, we already answered you on doom9's forum that writing an AviSynth script able to detect and report the corrupted frames will be very difficult/impossible, given the nature of the defect. But maybe some other users has some excellent idea...
    Quote Quote  
  8. Would a list of frame numbers like this help?

    9
    14
    15
    16
    17
    18
    19
    20
    21
    24
    109
    111
    160
    161
    164
    169
    170
    171
    172
    173
    174
    175
    179
    181
    182
    183
    184
    185
    186
    188
    189
    190
    193
    194
    195
    223
    226
    232
    243
    267
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    281
    283
    322
    323
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    379
    477
    582
    665
    697
    757
    807
    808
    809
    810
    811
    812
    828
    832
    833
    834
    835
    836
    837
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    Last edited by jagabo; 14th Jul 2023 at 10:13.
    Quote Quote  
  9. Member
    Join Date
    Sep 2014
    Location
    Italy
    Search PM
    Originally Posted by lollo View Post
    As jagabo said, "Don't filter or re-compress as that will change the nature of the lines." If you capture in h264 is not good for further restoration, and in general.

    BTW, we already answered you on doom9's forum that writing an AviSynth script able to detect and report the corrupted frames will be very difficult/impossible, given the nature of the defect. But maybe some other users has some excellent idea...

    lollo thanks for your help!

    My sample has no compression. This VHS tape has many physical scratch defects on it.

    So I did the capture with a JVC-VT7800 and also using PAN-EZ27 (I mean CNR) via HDMI 60 frames. And in my humble opinion, it can cut off several horizontal lines in the process. And even using Didee's script it couldn't help much.

    How I miss the old days when I used Didee + Pirej's script on a bad VHS tape. It has fixed many video errors like in this post: https://forum.videohelp.com/threads/339206-old-vhs-restoration#post2108662

    And also in this other post an example of the effectiveness of this script: https://forum.videohelp.com/threads/308840-old-VHS-restoration/page2#post2077635






    Originally Posted by jagabo View Post
    Would a list of frame numbers like this help?

    9
    14
    15
    16
    17
    18
    19
    20
    21
    24
    109
    111
    160
    161
    164
    169
    170
    171
    172
    173
    174
    175
    179
    181
    182
    183
    184
    185
    186
    188
    189
    190
    193
    194
    195
    223
    226
    232
    243
    267
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    281
    283
    322
    323
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    379
    477
    582
    665
    697
    757
    807
    808
    809
    810
    811
    812
    828
    832
    833
    834
    835
    836
    837
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852

    Hello jagabo,

    Sorry, I didn't understand.

    Are these by any chance the frames that contain the horizontal lines I mentioned at the beginning of this thread?

    And how did you get those numbers?

    Thanks for your help!
    Quote Quote  
  10. Originally Posted by NLP View Post
    My sample has no compression.
    Your sample has a ton of compression with a lossy codec. It's also been deinterlaced. Both of those things make issues like this much harder to detect. If you had captured as interlaced video with a lossless codec it might much easier to detect and fix the problem.

    Originally Posted by NLP View Post
    Originally Posted by jagabo View Post
    Would a list of frame numbers like this help?
    9
    14
    15
    16
    17
    ...
    Are these by any chance the frames that contain the horizontal lines I mentioned at the beginning of this thread?
    Yes.

    Originally Posted by NLP View Post
    And how did you get those numbers?
    An AviSynth script. But it's not perfect. There are some false positives and some false negatives. And the script relies on certain properties of the particular video. Properties which other videos may not have.

    Code:
    function AbsSubtractY(clip v1, clip v2)
    {
        mt_lutxy(v1, v2,"x y - abs", chroma="-128")
    }
    
    LWLibavVideoSource("L06-31 3capt V7800EZ27 60q TBC.mp4") 
    
    Crop(0,8,0,-32) # avoid noise at the top and bottom of the frame
    src = last
    
    
    # build a sample image for comparison
    SelectEvery(8).Trim(2,33) # get 32 "clean" frames
    Merge(SelectEven(), SelectOdd()) # merge them all into one reference image
    Merge(SelectEven(), SelectOdd())
    Merge(SelectEven(), SelectOdd())
    Merge(SelectEven(), SelectOdd())
    Merge(SelectEven(), SelectOdd())
    medge = Crop(706,0,4,-0) # get just the border near the light to dark transition near the right edge of the video
    
    src
    Crop(706,0,4,-0)
    
    AbsSubtractY(last, medge).mt_binarize(32).BilinearResize(64,height) # subtract each frame from the reference frame, absolute value
    WriteFileIf("list.txt", "AverageLuma>0.5", "current_frame", flush=true)
    
    StackHorizontal(src, last) # for a visual reference
    Basically, the script looks for the black border intruding into the light band near the right of the frame when time base errors shift the lines to the left.
    Quote Quote  



Similar Threads

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