VideoHelp Forum
+ Reply to Thread
Page 3 of 3
FirstFirst 1 2 3
Results 61 to 73 of 73
Thread
  1. Nono, that's why I want the logo'd video to lose some frames to match the lower FPS logoless video.
    If say frame 25 and 26 are duplicates in the logoless video, they won't be in the logo'd and thus don't match. So frame 25 in the logo'd vid has to be duplicated and replace frame 26.

    I will try using shifts in the other direction and see if it changes things.
    Quote Quote  
  2. Originally Posted by Mephesto View Post
    Nono, that's why I want the logo'd video to lose some frames to match the lower FPS logoless video.
    If say frame 25 and 26 are duplicates in the logoless video, they won't be in the logo'd and thus don't match. So frame 25 in the logo'd vid has to be duplicated and replace frame 26.
    Duplicates in the logoless video aren't a problem. They just cause the phase difference to increase. That's why I said you may need more phase shifted version of the logoless video to get matches.

    Code:
    23 24 25 26 27 28 29 30...     # logo vid
    23 24 25 25 26 27 27 28 29 30  # logoless vid with two duplicates (25 and 27)
    24 25 25 26 27 27 28 29 30     # logoless vid shifted one frame
    25 25 26 27 27 28 29 30        # logoless vid shifted two frames
    Frames 23 and 24 are used from the first logoless vid. Frames 25, 26, and 27 are used from the second logoless vid. Frames 28 29 and 30 are used from the third logoless vid. If they get further out of phase you'll need more phase shifted videos.

    It's missing frames that are a problem. You'll just have to hope that the closest match is "good enough". Unless you want to locate all the missing frames and use a motion interpolator to create and insert a new frame.
    Quote Quote  
  3. Nope, didn't work. Subtitles showed that "3" was never used once. I guess I'll have to tear out the frames manually.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    Originally Posted by Mephesto View Post
    Nono, that's why I want the logo'd video to lose some frames to match the lower FPS logoless video.
    If say frame 25 and 26 are duplicates in the logoless video, they won't be in the logo'd and thus don't match. So frame 25 in the logo'd vid has to be duplicated and replace frame 26.
    Duplicates in the logoless video aren't a problem. They just cause the phase difference to increase. That's why I said you may need more phase shifted version of the logoless video to get matches.

    Code:
    23 24 25 26 27 28 29 30...     # logo vid
    23 24 25 25 26 27 27 28 29 30  # logoless vid with two duplicates (25 and 27)
    24 25 25 26 27 27 28 29 30     # logoless vid shifted one frame
    25 25 26 27 27 28 29 30        # logoless vid shifted two frames
    Frames 23 and 24 are used from the first logoless vid. Frames 25, 26, and 27 are used from the second logoless vid. Frames 28 29 and 30 are used from the third logoless vid. If they get further out of phase you'll need more phase shifted videos.

    It's missing frames that are a problem. You'll just have to hope that the closest match is "good enough". Unless you want to locate all the missing frames and use a motion interpolator to create and insert a new frame.
    Missing frames? Well, the logo'd video does have frames that the logoless doesn't because it's a higher FPS but the logoless video does NOT have any frames that the logo'd doesn't, so what's going on? I'm perfectly fine with matching the 25fps logo'd vid to the 23.976 (21 effective) fps logoless just so logo removal is done correctly.
    Quote Quote  
  5. I verified that the technique works with 3 logoless videos.

    Code:
    LogoVid=AviSource("filename.avi")
    
    Logoless1 = SelectEvery(LogoVid,10,0,1,2,2,3,4,4,5,6,7)
    Logoless2 = Trim(Logoless1,1,0)
    Logoless3 = Trim(Logoless1,2,0)
    
    Logoless1 = Logoless1.Subtitle("1")
    Logoless2 = Logoless2.Subtitle("2")
    Logoless3 = Logoless3.Subtitle("3")
    
    BestLogoless = SelectBestmatch(LogoVid, Logoless1, Logoless2)
    BestLogoless = SelectBestmatch(LogoVid, BestLogoless, Logoless3)
    
    StackHorizontal(LogoVid, BestLogoless)
    Logoless1 has two duplicates in every 10 frames (and is missing 2 frames to keep from drifting further and further out of sync). The final BestLogoless returns frame labeled 1 1 1 2 3 3 3 3 x x, as expected. There are no exact matches for the last two frames so they return whatever frame happens to most closely matches.
    Last edited by jagabo; 29th Jun 2013 at 22:08.
    Quote Quote  
  6. Well here are the first 50 of mine. Frames on left correspond to which frames of the right (logo'd) video they match.

    Original:
    0 0
    1 0
    2 1
    3 2
    4 3
    5 4
    6 5
    7 7
    8 7
    9 8
    10 9
    11 11
    12 12
    13 12
    14 13
    15 15
    16 16
    17 17
    18 17
    19 19
    20 20
    21 21
    22 22
    23 23
    24 24
    25 24
    26 25
    27 26
    28 27
    29 28
    30 29
    31 30
    32 32
    33 32
    34 33
    35 34
    36 36
    37 37
    38 37
    39 38
    40 40
    41 41
    42 42
    43 42
    44 44
    45 45
    46 46
    47 47
    48 48
    49 48
    50 49

    Now when ran thru your awesome but not-yet-perfect script:
    0 0
    1 1
    2 2
    3 3
    4 4
    5 5
    6 7
    7 7
    8 8
    9 9
    10 11
    11 11
    12 12
    13 13
    14 15
    15 15
    16 16
    17 17
    18 19
    19 19
    20 20
    21 21
    22 22
    23 23
    24 24
    25 25
    26 26
    27 27
    28 28
    29 29
    30 30
    31 30
    32 32
    33 33
    34 34
    35 36
    36 36
    37 37
    38 38
    39 38
    40 40
    41 41
    42 42
    43 43
    44 43
    45 45
    46 46
    47 47
    48 48
    49 49
    50 50
    Quote Quote  
  7. So they all matched except when there was a missing frame.
    Quote Quote  
  8. The logoless video is missing frames yes, but the logo'd video isn't and thus there shouldn't be mismatches. I tried switching the videos around in the script so the logovid = avisource("logoless.avi") so the logo'd vid with no duplicates could be matched to the logoless but it didn't work. And that makes no sense because if the logoless has a duplicate, the same frame from the logo'd could be used twice if it's a good match, right?
    Quote Quote  
  9. The scripts I gave you are for finding the frames in the logoless video that most closely match each frame in the video with a logo. When the logoless video doesn't have a particular frame the closest matching frame is returned.

    If you want to find the frames of the logo'd video that most closely match the frames in the logoless video you have to "reverse" the script to reflect that.
    Quote Quote  
  10. I did reverse the script.
    Quote Quote  
  11. Then you did it wrong.
    Quote Quote  
  12. If you simply reversed the input files -- did you remember to change the direction of the shifts? Eg, change Trim(1,0) to Loop(2,0,0).
    Quote Quote  
  13. (late reply)
    I did do a reverse trim but I forget now, let me re-try.

    EDIT: Adding a third Loop(3,0,0) has done it. This is matched up without a flaw.

    Jagabo, I'm in debt to you man. Your code was genius. My inability to think past a few iterations would've never bore fruit.

    I remember years ago trying to do quality comparisons with old videos compressed with old codecs from a different source with differing framerates and never being able to do apples-to-apples comparisons because I couldn't match the frames right (could've sworn I made a similar thread in the past asking for such a way.) I'll be able to do that now AND finally fix this damn logo'd video.

    Thanks again. 8 in the morning and I'm hitting the sack before it gets too hot. Love this job.
    Last edited by Mephesto; 30th Jun 2013 at 09:11.
    Quote Quote  



Similar Threads

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