staxrip icon indicating copy to clipboard operation
staxrip copied to clipboard

Add NEW tool to allow side-by-side comparison of 2 videos

Open ukmark62 opened this issue 3 years ago • 12 comments

I would like to request a new feature - a side-by-side video comparison tool with a vertical slider to compare 2 videos. The slider would be a vertical line from the top of the panel to the bottom and would default to be positioned at the middle of the screen, so that half of video A frame and half of video B frame will initially be shown.

Both comparison videos would be loaded (one video on top of the other) and initially, the left half the video would display frame 1 from video A and the other half would be the same frame from video B. Dragging the screen to the left or right would show more of one of the video frames. I.E. dragging slider to the left would show more of video B frame and dragging it to the right would show more of video A frame. This way you can see the same frame from both videos at the same time on a single screen.

There are no alternatives that I am aware of.

The feature would make it easier to directly compare the output from 2 identical videos that may have been encoded in different ways, or to show an original vs encoded video comparison.

There is an HTML5 example here. I appreciate that Staxrip is not written in HTML5 but this link shows the principle of it. The gif at the top of this link shows the comparison slider in action, I have also pasted the gif file below the link:- https://codemyui.com/video-comparison-slider-animation-using-html5/

before-and-after-video-comparison-slider-using-html5-compressor

This HTML5 solution plays back the videos side by side. That would be fine or have it the same as the existing comparison tool which just shows one static frame at a time. Thanks.

ukmark62 avatar May 09 '21 20:05 ukmark62

Looks fancy but IMHO, implementing this feature in VB may be very challenging. But I can be wrong. Let's see if @Dendraspis or @stax76 (or any other willing to participate) is intrigued by this. 🤔

JJKylee avatar May 09 '21 20:05 JJKylee

I agree it may be complicated and to be fair, the existing video comparison tool works well, but it would be a nice to have. Also, I have just realised that this would only work for 2 videos. Currently, you can compare more than 2 videos with the existing tool, so may be a no go.

ukmark62 avatar May 09 '21 20:05 ukmark62

Exactly, the current video comparison tool allows to compare any number of videos. So that would be a NEW tool, that would give a side-by-side with slider view of 2 videos.

ghost avatar May 10 '21 07:05 ghost

Yes, agreed - a new tool to allow side-by-side comparison of 2 videos.

ukmark62 avatar May 10 '21 10:05 ukmark62

The player could serve as a basis, right? video-compare

Patman86 avatar May 22 '21 12:05 Patman86

Absolutely – great find! 

ukmark62 avatar May 22 '21 15:05 ukmark62

The player could serve as a basis, right? video-compare

FYI, I just made a very simple GUI for video-compare in Python/tkinter, and it's a single executable file. Here. It's totally free, so do whatever you want to do. 😄

JJKylee avatar Jun 03 '21 00:06 JJKylee

Thanks, just tried it and it works great. Appreciate your efforts!!

ukmark62 avatar Jun 03 '21 12:06 ukmark62

There's a caveat:

If you add video-compare_GUI.exe as a StaxRip menu item (ExecuteCommandLine item), the window called by video-compare.exe fails to launch from within video-compare_GUI.exe.

I guess it's because the Python subprocess of video-compare.exe called by video-compare_GUI.exe conflicts with the native StaxRip process call module. I have no idea how to avoid this as of now. I need to investigate.

So, if we want to call video-compare.exe from within StaxRip, we need to compose a separate GUI dialog in StaxRip that calls video-compare.exe a la mtn.exe in the past. Maybe @Dendraspis or @stax76 can do this, but I'm not sure if he/they are willing. ...Don't hate me, guys. 😅

JJKylee avatar Jun 03 '21 18:06 JJKylee

Just the fact that you have created a working front-end GUI is good enough for myself. It would be great to incorporate into StaxRip, but I am grateful for all your efforts.

ukmark62 avatar Jun 03 '21 20:06 ukmark62

Wow... Windows 10 Mail app surely seems to do something on the format of the reply post. 😓

Anyway... @Dendraspis, since @ukmark62 seems satisfied with my 'solution', I think you can close this thread unless you're interested in embedding video-compare in StaxRip. 😁

BTW, @Patman86, can you update and build video-compare on your MSYS2? If you're interested, can you also change the hard-wired keyboard shortcuts a la StaxRip preview style? Currently, video-compare up/down arrows and pageup/pagedown arrows move the video in the opposite direction to StaxRip's.

And I've found a bug with video-compare already: if the window is zoomed, the mouse cursor location is misaligned with the vertical slider. I think I need to report this on its repo. 🤔

JJKylee avatar Jun 04 '21 06:06 JJKylee

I leave it open for now. There are some other things to do first. 😉 I'm also not sure what to do with it ... we will see. 😁

Dendraspis avatar Jun 04 '21 06:06 Dendraspis