VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. Hello again

    i recorded 3 hours video and sometimes thee is a lost of frames( so the video stuck for up to 1.6 sec..)
    so what i have to do is to record again some sections in the tape and hope that this time i will not lose frames..
    after that i need to use ReplaceFramesMC().

    but the point is that i need for this watch on FULL 3 hours or more video! just to know what sections in the tape i need to record again for getting the missed frame for ReplaceFramesMC().
    and this is paining.

    Is there any software just tell me what points in the recorded video are bad and have missed frames?

    if It should be by algorithm so the algorithm simply need to detect no motion.. a don't think that it is hard to develop.. i am not programer in Avisynth but i did for other purpose a script (on other language) that take Screenshot by motion Detection.
    the way my script work is that i reed the color on some Represents pixel group (not all pixels because it will work very slow) and after secend he reed again and at the and he Calculates the percentage change in the number that Represents all color and if the change is more then 10% so he take a Screensho.
    but as i sayed - it isn't on any video but the way he do it may be the same if someone want to develop NO motion Detection for this..

    but my script will not be good for videos.. he do what he do by time range and not by frame range (every scened is not enough.. it must be every at last 0.3 scened )

    thanks for helpers!
    Last edited by gil900; 19th Feb 2013 at 06:48.
    Quote Quote  
  2. There is no way.

    How will you identify a deliberate freeze frame, a step-motion section of the video, or deliberate jump cuts?
    Quote Quote  
  3. If they are "stuck" this means the frames are the same (duplicates) , not black or garbage frames. You cannot distinguish between junk or garbage frames

    If you want to just detect dupliates , you can use various duplicate frame detectors, and most have settings to adjust the threshold for detection . They don't take screenshots, but you can use the 1st pass log file made by dedup for other uses (it's meant for VFR encoding, to drop duplicates, but you don't have to use the 2nd pass)
    http://avisynth.org/mediawiki/External_filters#Duplicate_Frame_Detectors

    If you want to create your own function, you can use the if...then conditional filtering , using the runtime functions
    http://avisynth.org/mediawiki/ScriptClip#Runtime_Functions

    You might use YDifferenceFromPrevious() , so if there is a change from previous frame , then do something...
    Quote Quote  
  4. Originally Posted by poisondeathray View Post
    If they are "stuck" this means the frames are the same (duplicates) , not black or garbage frames. You cannot distinguish between junk or garbage frames

    If you want to just detect dupliates , you can use various duplicate frame detectors, and most have settings to adjust the threshold for detection . They don't take screenshots, but you can use the 1st pass log file made by dedup for other uses (it's meant for VFR encoding, to drop duplicates, but you don't have to use the 2nd pass)
    http://avisynth.org/mediawiki/External_filters#Duplicate_Frame_Detectors

    If you want to create your own function, you can use the if...then conditional filtering , using the runtime functions
    http://avisynth.org/mediawiki/ScriptClip#Runtime_Functions

    You might use YDifferenceFromPrevious() , so if there is a change from previous frame , then do something...
    ok thanks.
    but how it can create log file? what is the why to run this?
    if i will run this in VirtualDub so it can't run as script that can not do such thing..
    EDIT:
    or it can?


    so how it can create log file?

    EDIT 2:

    OK i got it!!
    my code is:

    AviSource("test.avi")
    Dup(debug=true,log="log.txt")


    but it is addressing all the frames..
    look:

    ..............
    Dup: frm 2275: Using frm 2275
    Dup: frm 2283: Using frm 2283
    Dup: frm 2292: Using frm 2292
    Dup: frm 2295: Using frm 2295
    Dup: frm 2289: Using frm 2289
    Dup: frm 2280: Using frm 2280
    Dup: frm 2278: Using frm 2278
    Dup: frm 2272: Using frm 2272
    Dup: frm 2269: Using frm 2271

    Dup: frm 2261: Using frm 2264
    Dup: frm 2258: Using frm 2264
    Dup: frm 2252: Using frm 2264
    Dup: frm 2249: Using frm 2264
    Dup: frm 2247: Using frm 2264
    Dup: frm 2244: Using frm 2244
    Dup: frm 2241: Using frm 2241
    Dup: frm 2250: Using frm 2264
    Dup: frm 2251: Using frm 2264
    Dup: frm 2253: Using frm 2264
    Dup: frm 2254: Using frm 2264
    Dup: frm 2255: Using frm 2264
    Dup: frm 2256: Using frm 2264
    Dup: frm 2257: Using frm 2264
    Dup: frm 2259: Using frm 2264
    Dup: frm 2260: Using frm 2264
    Dup: frm 2262: Using frm 2264
    Dup: frm 2263: Using frm 2264
    Dup: frm 2264: Using frm 2264
    Dup: frm 2265: Using frm 2265

    Dup: frm 2266: Using frm 2271
    Dup: frm 2261: Using frm 2264
    .............
    i need that it will write only the red part
    or only the frame 2264 or 2265 in that case..

    or i will have to write script (on other leng) that reed this log file and give me readable information.(Not millions lines)

    Anyway, I can handle with it from this point.
    But it is better to save me that work
    Last edited by gil900; 19th Feb 2013 at 14:22.
    Quote Quote  
  5. If you lose frames sometimes when capturing you should invest in a frame TBC box to put in between the VCR (if that's what you're using) and the computer capture card. I have an AVT-8710 which I normally don't have to use, but if I begin to drop frames I put it on.

    If you're just talking about corrupted frames, no matter how many times you do the capture you'll often get the 'bad' frames in the same places and I know of no way to know when to use ReplaceFramesMC except to play the video. Besides, the amount of motion at those corrupt places determines if you use ReplaceFramesMC or FreezeFrame or BadFrames or apply the filter just to certain parts of a frame. Nothing beats the eyes for helping determine what's the best way to do something.
    Quote Quote  
  6. i am talking about lose frames.

    If you're just talking about corrupted frames, no matter how many times you do the capture you'll often get the 'bad' frames in the same places and I know of no way to know when to use ReplaceFramesMC except to play the video. Besides, the amount of motion at those corrupt places determines if you use ReplaceFramesMC or FreezeFrame or BadFrames or apply the filter just to certain parts of a frame. Nothing beats the eyes for helping determine what's the best way to do something.
    i am not programer in Avisynth or video but i think about ideas for how this could work and identify things like that:
    image

    I understand that there is no algorithm that detects if it happens but I have an idea and maybe I can help for that.
    the idea is sample.. but in that way it may give Incorrect recognition but still - you Checking only the recognitions and not few hours video.
    There is assumption that crazy things not really happen in the reality(if you don't Agree so..)
    what is "crazy things"
    *Something is happening too fast and changes into something new that his difference is extreme and too large relative to the time of the change
    -but it can be just transition. so to cover this case, the code need to compare the frame before this case and after this case( the unsuspected frames).
    if there the change is still high so it may be just transition.
    if the there is no big change so it may be a destroyed frames like the image.

    but this condition can Deny right a case when the destroyed frames happen happens exactly when the transition happens
    so it is not perfect but this is the best i can give..
    Quote Quote  
  7. Yeah, but you're talking about some way to detect duplicate frames but they are only a small percentage of the 'bad' frames coming from a VCR capture that need replacing. Again, nothing beats playing the video and using your eyes.
    Quote Quote  
  8. You're right, but I believe it is possible do anything. Not that I'm saying I can do anything but I think that can be programmed algorithm to identify most of these problems.

    for replacement for playing the video and using my eyes.
    It just painful
    Quote Quote  
  9. Update:
    i worte a script that give readable information
    Click image for larger version

Name:	Untitled.jpg
Views:	202
Size:	151.0 KB
ID:	16368

    you can set in the script from how much lost frames he will write..
    if it useful to someone so tell me and i will work for little gui and share it...
    Quote Quote  
  10. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    in the long run, it might be better to do a second capture of the tape, especially when you know you have a problem tape. then just feed the two video sources in an avisynth script, vid1, vid2, stack it like a PiP, and run it through a time line so you can see the two clips, ie, virtualdub. as you process the "main" clip the usual way, ie, filtering, etc., when you come to a place that is determined a problem, you can quickly use the other source frame(s) as a replacement (assuming the 2nd cap has a better frame) via one of the script methods mentioned in this discussion.
    Quote Quote  
  11. Originally Posted by vhelp View Post
    in the long run, it might be better to do a second capture of the tape, especially when you know you have a problem tape. then just feed the two video sources in an avisynth script, vid1, vid2, stack it like a PiP, and run it through a time line so you can see the two clips, ie, virtualdub. as you process the "main" clip the usual way, ie, filtering, etc., when you come to a place that is determined a problem, you can quickly use the other source frame(s) as a replacement (assuming the 2nd cap has a better frame) via one of the script methods mentioned in this discussion.

    Yes I thought about it .. But I do not have enough space on my computer. I must have additional hard disk.

    here is the script:
    Dup Lost frame extract by gil900.rar
    If anyone needs it so I would love to help with this
    Image Attached Files
    Quote Quote  



Similar Threads

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