a1s2d3f4
6th April 2011, 16:02
I have two very similar video streams - A and B - (both are captures of the same VHS tape by the same capture card). However, one stream has certain frames missing, and the other has other frames missing (a very strange misbehavior by my Matrox Mini capture card, randomly dropping frames not even reporting by the capture utility).
I would like to find an "automatic video stream comparison" solution, which would match the two streams frame for frame starting with frame 1 (which I can align manually) and report any "missing frames". For example, the comparator moves along the stream and makes sure that frame 0A=0B, 1A=1B, 2A=2B etc. Then it, for instance, gets to 1001A and finds that it != 1001B. If it could tell me so, that would be great for me, since I wouldn't have to look for them manually.
Even better would be if it automatically compared 1001A with 1002B and 1002A with 1001B, to see which of the streams has the missing frame. Obviously, if 1001A=1002B, it would mean that the 1001st frame is actually missing from stream A and the frame at its position is actually frame #1002 (which is why it matches it in stream B). With 1002A=1001B check we would know that stream B has the missing frame problem.
The main problem is to find an algorithm (preferrably a plugin for AVISynth) that can do this automatic frame matching. Since we are talking analog capture here, it wouldn't be possible to match pixel for pixel, but rather it has to look through the details of the image (probably similar to what MAnalyse() of MVTools does) and operate on that level (keeping in mind that some frames can be very similar to each other (if not much motion occurred between frames)).
Is this realistic? Eventually, I'd like to build a script that would insert the missing frames of one stream from the other (and vice versa) and rebuild the complete footage.
(NB: the audio stream is identical in both streams - no audio drops, just the video frames)
I would like to find an "automatic video stream comparison" solution, which would match the two streams frame for frame starting with frame 1 (which I can align manually) and report any "missing frames". For example, the comparator moves along the stream and makes sure that frame 0A=0B, 1A=1B, 2A=2B etc. Then it, for instance, gets to 1001A and finds that it != 1001B. If it could tell me so, that would be great for me, since I wouldn't have to look for them manually.
Even better would be if it automatically compared 1001A with 1002B and 1002A with 1001B, to see which of the streams has the missing frame. Obviously, if 1001A=1002B, it would mean that the 1001st frame is actually missing from stream A and the frame at its position is actually frame #1002 (which is why it matches it in stream B). With 1002A=1001B check we would know that stream B has the missing frame problem.
The main problem is to find an algorithm (preferrably a plugin for AVISynth) that can do this automatic frame matching. Since we are talking analog capture here, it wouldn't be possible to match pixel for pixel, but rather it has to look through the details of the image (probably similar to what MAnalyse() of MVTools does) and operate on that level (keeping in mind that some frames can be very similar to each other (if not much motion occurred between frames)).
Is this realistic? Eventually, I'd like to build a script that would insert the missing frames of one stream from the other (and vice versa) and rebuild the complete footage.
(NB: the audio stream is identical in both streams - no audio drops, just the video frames)