Jitter onscreen controls and video grid

Shane's icon

Hi all,

I am wondering if the following would be possible:

I would like to design a patch (or standalone app) that allows the user to read in a video file and then set start and end frames to loop -- and repeat this for several (say, up to 12 or 16 or so) looping clips, each of which would have its own place in a grid on screen.

The background: I designed a (minimally) interactive video essay a few years back that encouraged close viewing of a scene by means of a grid of looping clips (individual shots in a scene). The video essay is here: https://shanedenson.com/stuff/dont-look-now-javascript/index.html

Here's what it looks like:

When published in an online journal (here: https://intransition.openlibhums.org/article/id/11422/), one of the reviewers remarked that it was flawed as a video essay but might be seen as a proof of concept for an app that let the user load whatever scene they like and subject it this kind of analysis.

More recently, someone uploaded a project on GitHub, inspired by my video essay, designed to enable users to do this (https://quan-1.gitbook.io/interactive-video-grid). But it's an HTML-based project which requires manual cutting of video clips and some light editing of a javascript file.

I'd like to make something like this, but more intuitive: simply load the video clip, scrub to the scene you want to analyze, mark start and end frames for each shot, and mount them in a grid formation. Maybe some additional controls, such as a button to mute/unmute the audio on each shot. But this could come later.

My question: does this sound feasible at all in Max/Jitter? Or is this the wrong programming environment for this type of project?

Thanks!

Shane

TFL's icon

Interesting project!
It can definitely be done.

Here is a start. using [jit.movie] for the playback, a [rslider] to set your loop points and a [preset] to save and recall them. Essentially all you're looking for, minus a proper UI.

Max Patch
Copy patch and select New From Clipboard in Max.

Another option for the loop points and playback would be jit.playlist.

If you want to be able to play several extracts at the same time with sound, things get a bit more complicated as you basically need one jit.movie for each loop that can be played simulateously (they can be created programmatically created when the user defines a new loop).

You could also automatically create a vignette for each new created loop, display them in a grid fashion, and play a loop when the corresponding vignette is hovered like in the webpage, but that will require patcher scripting using javascript or messages to [thispatcher].

The mute/unmute control as well as many other things (play speed, text annotation, position in the grid...) could all be saved easily with [preset] or [pattrstorage].

Feel free to ask if you want further examples or help!

Wil's icon

in Max 9 . jit.concat for making the grid

Max Patch
Copy patch and select New From Clipboard in Max.

Shane's icon

Thank you both! This is very encouraging! I don't have Max 9 on the machine I have with me while traveling, but will try out the concat object as soon as I am home.

In the meantime, it occurred to me to ask: is there anyway to do an automatic shot detection in Jitter? (Such as Da Vinci Resolve has had for years, and now I think Premiere and Final Cut have as well?) I think those programs use machine learning algorithms for this, but I wonder if there might be other solutions -- maybe with edge detection? (A cut between shots won't register in terms of edges, of course, but a more or less total change that might be captured with these algorithms?)

Anyway, it's a long shot, but just wondering...

Thanks!

Shane