Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Video Editing/Mangling

Reply
 
Thread Tools Display Modes
Old 11-05-2018, 11:23 PM   #1
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 142
Default 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
dsyrock is offline   Reply With Quote
Old 11-06-2018, 12:22 AM   #2
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,151
Default

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
Eliseat is offline   Reply With Quote
Old 11-06-2018, 12:41 AM   #3
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 142
Default

Quote:
Originally Posted by Eliseat View Post
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
You are right, "split screen and play the two videos" that's what I am doing. I'm looking for some fast/better/automatic ways to do that instead
dsyrock is offline   Reply With Quote
Old 11-06-2018, 10:26 AM   #4
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,183
Default

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...
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 11-06-2018, 10:36 AM   #5
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,183
Default

I created a Feature-Request for a get-image-frame from the video in the videoprocessor.

https://forum.cockos.com/showthread....23#post2054523
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 11-06-2018, 05:57 PM   #6
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 142
Default

Quote:
Originally Posted by mespotine View Post
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...
Thanks for your reply. What I really want is let reaper tell me "where" instead of I find it myself. But maybe thats too much for reaper, after all, its only a daw but not a video editor LOL. And thanks for creating the feature request for me
dsyrock is offline   Reply With Quote
Old 11-06-2018, 09:42 PM   #7
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,183
Default

Not possible. I think, there are other tools more suitable for that. Maybe FFMPEG on the command-line allows such thing?
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 11-07-2018, 04:05 PM   #8
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 115
Default

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.
wwwmaze is offline   Reply With Quote
Old 11-07-2018, 04:10 PM   #9
wwwmaze
Human being with feelings
 
Join Date: Oct 2009
Posts: 115
Default

Quote:
Reaper Fun Fact of the week: Font in the IDE is too small?
Change Config-variable edit_fontsize or the reaper.ini entry [REAPER]->edit_fontsize to the fontsize you need.
Maybe you know that already but I like to use ctrl+mousewheel for that
wwwmaze is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.