Hi guys,
I have a video which has been spliced into 1 minute segments. I want to make it whole again but each segment has a small overlap from the previous one (the overlap is a random length from around 1 second to 3 seconds). Is there a video editor or tool I can use to auto detect the duplicate footage and remove it? If not, is there an editor that would make the process by hand easier? I am using Adobe premier and it's very slow going. Thanks in advance!
Sonya
+ Reply to Thread
Results 1 to 10 of 10
-
-
Avid Media Composer.
Premiere Pro
DaVinci Resolve
None of them will remove it automatically. How would they know which one you don't want? -
Thanks for your reply. I was hoping there was software that could detect duplicate frames in a video, it wouldn't matter which copy was deleted as they are exactly the same and once that duplicated part is gone the video will be perfect. I have about 500 overlaps that need editing by hand. I am currently looking at the audio and finding the end of one clip and beginning of another that way...it's painstaking!
-
-
If the overlaps are long enough, there is software that will do exactly what you want to do, and will do it automatically:
PluralEyes
It is designed to automatically sync video from multiple cameras when you do a multi-camera shoot (i.e., several cameras filming the same scene at the same time).
It works by looking for common audio. For your application, the key question will be whether it can detect the video with only a few seconds of audio that overlap. There may be some hidden settings that you'll have to invoke.
I use this all the time, and for syncing multiple cameras, it is absolute magic and works incredibly well.Last edited by johnmeyer; 22nd Nov 2019 at 09:32.
-
Here's a proof of concept AviSynth script that will identify where an overlap starts:
Code:p1 = AviSource("p1.avi") p2 = AviSource("p2.avi") testframe = p2.Trim(0,-1) # first frame of p2 testframe = Loop(testframe, p1.framecount, 0, 0) # repeated for number of frames in p1 p1 WriteFileIf("matches.txt", "LumaDifference(testframe)<2.0", "current_frame")
The following script joined the two clips seamlessly:
Code:p1 = AviSource("p1.avi").Trim(0,446) p2 = AviSource("p2.avi") p1+p2
A more sophisticated algorithm would match several frames, not just one. For example, it could start by overlapping one frame then subtracting that overlapping frame to see how close the result is to zero. Then it would repeat the process with 2 overlapping frames, 3 overlapping frames, etc. Then see what amount of overlap gives an average closest to zero.Last edited by jagabo; 22nd Nov 2019 at 08:25.
-
In theory one could write a piece of software that calculated the PSNR between 2 adjacent frames and if the value was infinite then drop one of the frame, and repeat until EOF; I'm wondering if this would be possible via script+ffmpeg, it would take forever but it should be able to remove all duplicate frames for a given file.
-
Here's an example of how comparing multiple frames would work. I'm using AviSynth's Subtract() filter which subracts pixels of one clip from pixels of another clip, and returns the result as an image. Since an image can't have pixels with negative values Subtract() adds medium gray. When two images match perfectly the result is a flat grey image. When A-B results in a value less than zero you get a darker pixel. when A-B results in a value greater than zero you get a lighter pixel.
[Attachment 50946 - Click to enlarge]
At the top of these film strips is the end of the first clip. At the bottom is the start of the second clip. The grey-ish frames are the overlapping frames after Subtract(first, second). At the left there is only one overlapping frame and it shows obvious differences between the two clips. In the middle there are two overlapping frames and there are only very tiny differences. On the right three frames are overlapped and all three show significant differences. So from these results you would say there are 2 frames of overlap at the end of the first clip and start of the second clip. And indeed, I created the clips with 2 frames of overlap. -
I forgot to include the script that generated those images:
Code:########################################################################## # # Overlap two videos. Show Subtract() at the overlapped frames. # The second clip is overlapped at the end of the first clip by # "overlap" frames. # ########################################################################## function Overlap(clip v1, clip v2, int overlap) { # build a clip of only the overlapping frames, and Subtract() them o1 = v1.Trim(v1.framecount-overlap,0) o2 = v2.Trim(0, length=overlap) ol = Subtract(o1,o2) # show v1 before the overlap, the overlap, then then v2 v1.Trim(0, v1.framecount-overlap-1) + ol + v2.Trim(overlap,0) } ########################################################################## part1 = AviSource("part1.avi") part2 = AviSource("part2.avi") Overlap(part1, part2, 3) # overlap 3 frames StackVertical(Loop(3,0,0), Loop(2,0,0), last, Trim(1,0), Trim(2,0)) # stack 5 consecutive frames
Here's an example with 3 overlapping frames where the frames were numbered before being overlapped. The first clip is numbered at the top left of the frame, the second at the top right:
[Attachment 50948 - Click to enlarge]
You can see the last 3 frames of the first clip and the first 3 frames of the second clip are overlapped. This is the equivalent of the right column in my previous post.
Similar Threads
-
free software to detect and delete duplicate videos
By ujang in forum Newbie / General discussionsReplies: 2Last Post: 1st Jun 2018, 13:02 -
Fix duplicate frames on old digicam video
By Homestar in forum RestorationReplies: 13Last Post: 25th Dec 2017, 00:15 -
Best editor for dashcam footage
By Anonymous in forum EditingReplies: 13Last Post: 8th Dec 2017, 12:57 -
Detect duplicate frames and write to text file
By nesburf in forum Video ConversionReplies: 15Last Post: 27th Aug 2015, 08:09 -
Script to detect duplicate frames?
By kieranvyas in forum EditingReplies: 30Last Post: 22nd Aug 2015, 20:01