11-05-2018, 11:23 PM | #1 |
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 565
|
Is it possible to tell the difference between two videos with API?
For example, there are two tracks, and two video items, like this
The red parts in video 1 and 2 are totally the same. At point A, video 1 switch to the green part, it's different from video 2. At point B, video 1 go back to red part again, and video 1 and 2 go back to be the same again. My question is: Is there a way to detect where the point A and B is? Any API can do that? Is that even possible? PS:In video 1, the red and green parts are NOT 3 video items. They are the different parts in video 1. The green part is just the edited part compared with video 2 |
11-06-2018, 12:22 AM | #2 |
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
I can't imagine an automatic process but you could set up a split screen and play the two videos in a faster speed while watching them. I would do it this way if I had to.
Sure it could be possible to subtract video-a from video-b what should result in a black screen and only would show pixels if the two videos differ. Than there needs to be kind of a detection, if somethings shows up. But this sounds very special. Maybe you wont find someone to even think about it nor tries to code something. Eli |
11-06-2018, 12:41 AM | #3 | |
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 565
|
Quote:
|
|
11-06-2018, 10:26 AM | #4 |
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
You can use the function to display only the differences between inputs:
gfx_deltablit(srcidx, x,y,w,h srcx,srcy, dsdx, dtdx, dsdy, dtdy, dsdxdy, dtdxdy[, dadx, dady, dadxdy]) If the resulting picture becomes one color(black, afaik), then the item is the same. That way, you can not just only get if the videos are different, but also, where and how. I think, you should be able to find out somehow what is currently shown in the framebuffer to see if there's a difference, but I'm not too familiar with programming the video-processor, so can't you help with this...
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish On vacation for the time being... |
11-06-2018, 10:36 AM | #5 |
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
I created a Feature-Request for a get-image-frame from the video in the videoprocessor.
https://forum.cockos.com/showthread....23#post2054523
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish On vacation for the time being... |
11-06-2018, 05:57 PM | #6 | |
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 565
|
Quote:
|
|
11-06-2018, 09:42 PM | #7 |
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Not possible. I think, there are other tools more suitable for that. Maybe FFMPEG on the command-line allows such thing?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish On vacation for the time being... |
11-07-2018, 04:05 PM | #8 |
Human being with feelings
Join Date: Oct 2009
Posts: 99
|
With video processor it's only possible to evaluate current or past frames. And in Reascript there is no equivalent to AudioAccessor for Video.
I would probably use some Python library together with Reapers Python Reascript implementation or Beyond Python. I have no clue if there's any Lua library. |
11-07-2018, 04:10 PM | #9 | |
Human being with feelings
Join Date: Oct 2009
Posts: 99
|
Quote:
|
|
Thread Tools | |
Display Modes | |
|
|