VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Recorded VHS a lot of black frames
    any "easy" way to cut the black frames automatically?
    thanks
    Image Attached Files
    Quote Quote  
  2. Why is your sample 23.976 fps and poorly deinteralced? Any VHS recording should be 29.97 fps interlaced. You should capture again.
    Quote Quote  
  3. the quality is irrelevant in this topic
    thanks anyway
    Quote Quote  
  4. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    If the file is a MPEG2 you could use a function in Womble aka MPEG Video Wizard called blank fades in the bookmark menu http://www.womble.com/support/help.dvd5/chap4b-2.html
    BeyonWiz T3 PVR ~ Popcorn A-500 ~ Samsung ES8000 65" LED TV ~ Windows 7 64bit ~ Yamaha RX-A1070 ~ QnapTS851-4G
    Quote Quote  
  5. Originally Posted by nexus_013 View Post
    the quality is irrelevant in this topic
    Hardly. It looks to me like you already screwed it up beyond redemption by giving it a film framerate by blending to get it to 23.976fps when it wasn't shot on film. And it isn't just a case of good video/black frames. If you study it you can see they fade out and in, probably also a result of you not knowing what you were doing. There are plenty of 'half-black' frames. It's a godawful mess.

    Is the original tape like this? If so, there's no hope unless you want to fix it manually using frame interpolation. Otherwise do as jagabo suggests and start over again.
    Quote Quote  
  6. thanks netmask56

    original footage is not 23 fps
    Quote Quote  
  7. The footage is in bad shape, for sure.

    I have written many blank frame removal scripts. In some of them I use motion estimation to create a new frame to replace the black/blank frame. In others, I simple decimate the frame.

    Of all the scripts I have posted, you may find this one the most useful:

    Finding individual "bad" frames in video; save frame number; or repair
    Quote Quote  
  8. Here's a simple AviSynth command that will replace isolated black frames (ie, black frames with non-black frames before and after them) with a copy of the frame before it:

    Code:
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", 25)
    If there are several black frames in a row you can repeat the line a number times. Ie, to cover a sequence of 5 black frames you need to use the command 5 times. The last variable in the call, "25" is a threshold value. Larger values will cause dark, but not completely black, frames being replaced.

    Even after removing the black frames from the OP's video it flickers a lot because there are many dark frames in addition to the black ones. If you raise the threshold it will flicker less but then it will lock up more often and for longer stretches.
    Quote Quote  
  9. Here's the video with the darkest frames replaced (with the above replacement technique) and flicker reduction. If there was audio it could be retained and remain in sync. Original video (reencoded) on the left, filtered on the right.
    Image Attached Files
    Quote Quote  
  10. thanks johnmeyer & jagabo
    I'm new to scripts but I'll try
    Quote Quote  
  11. Originally Posted by jagabo View Post
    Here's a simple AviSynth command that will replace isolated black frames (ie, black frames with non-black frames before and after them) with a copy of the frame before it:

    Code:
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", 25)
    If there are several black frames in a row you can repeat the line a number times. Ie, to cover a sequence of 5 black frames you need to use the command 5 times. The last variable in the call, "25" is a threshold value. Larger values will cause dark, but not completely black, frames being replaced.

    Even after removing the black frames from the OP's video it flickers a lot because there are many dark frames in addition to the black ones. If you raise the threshold it will flicker less but then it will lock up more often and for longer stretches.
    invalid arguments to function ConditionalFilter
    Can you explain how to use it a bit more?
    completely new to avisynth
    Quote Quote  
  12. Your script should look something like:

    Code:
    LSmashVideoSource("Untitled.mp4")  # open the video
    
    Trim(1,0) # first frame is black, get rid of it
    Crop(8,0,-8,-0) # removing black borders improves autogain later
    
    THRESHOLD = "50" # lower values will replace fewer frames, higher values will replace more frames
    
    # 14 calls to ConditionalFilter will remove as many as 14 black frames in a row
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    ConditionalFilter(last, Loop(2,0,0), last, "AverageLuma()", "lessthan", THRESHOLD)
    
    ColorYUV(autogain=true) # even out the brightness of the remaining frames
    Quote Quote  
  13. it worked thanksssss
    Quote Quote  



Similar Threads