basic GUI TIMELINE for video playback WORKAROUND

Jun 5, 2009 at 10:19pm

basic GUI TIMELINE for video playback WORKAROUND

hello
sorry if this might have been covered before

i need to do something like a very simple TIMELINE GUI multi”data”track player or sequencer to control multiple video reproduction

it should be very simple, first i choose the video file

- then some data visualization object will represent the lenght of the video, (not necessarily the video itself)

- then in the TIMELINE i should be able to drag it to the position i wanted to be played

- when play is pressed a position bar/line should appear
then the video should be played at the previously selected position
the timeline should work for several videos

so my first thought was in timeline (not anymore)
then i though
several rsliders one below the other (representing the tracks an their lenght) the playbar object and i’ll find the way to make the position bar/line
but this is not even enough to be a crappy solution since rslider range can’t be dragged

so i look in to the jitter examples jitter-gui-sliderexample.maxpat and it looks very promising even though i know something about 3d i have no idea about java either way it looks like a lot of job
(also i want to be away from complicated lcd’s programing :s )

i know this is even a controversial subject to deal whit
(i couln’t found recent discussion about it)
but i just want to know if there is some easy solution around, some advices, and everything you might think it will help.

i’m not lazy i just need an easy solution Razz

Thank you in advance

#44264
Jun 5, 2009 at 11:57pm
autogusto wrote on Fri, 05 June 2009 17:19
i need to do something like a very simple TIMELINE GUI multi”data”track player or sequencer to control multiple video reproduction

it should be very simple, first i choose the video file

- then some data visualization object will represent the lenght of the video, (not necessarily the video itself)

- then in the TIMELINE i should be able to drag it to the position i wanted to be played

- when play is pressed a position bar/line should appear
then the video should be played at the previously selected position
the timeline should work for several videos

so my first thought was in timeline (not anymore)
then i though
several rsliders one below the other (representing the tracks an their lenght) the playbar object and i’ll find the way to make the position bar/line
but this is not even enough to be a crappy solution since rslider range can’t be dragged

you can drag a waveform~ selection with the loop tool, it’ll get to a little ways towards what you’re talking about. But better might just be using panels (or for that matter, even jit.pwindows with a movie frame preview in them, why not?) and using some mousestate or hover (on max 5) to determine when you’re over a video “object”, which you then can drag using “move” commands to thispatcher. Any object can be moved this way, and you can easily restrict motion in the Y direction so they stay in horizontal tracks.

For playback, it’s a little trickier—what if multiple ones are playing back at different rates? You’d need a separate line for each track (which could be cool but might not be necessary). The question is: do you play back and then update the line depending on where you’re at in the video (with gettime maybe), or do you update the line and tell the video where to go (with frame $1)? This will probably cause jitteriness in playback, so go with option 1 unless you want scrubbing for the line. if you do a few calculations before playing back, you won’t need gettime at all—the rate movie length will determine the movie “block” size. This would be pretty simple to zoom/scale too (patching_rect $1 $2 $3 $4, in max 5), then change the movement rate of the playback line to match.

Interesting to hear about GUI timelines, there’s a lot you can do with standard Max objects and mousestate. Now, adding a “draggable” attribute to objects could be pretty nice too… or a new object which manages dragging of other named objects… though I suppose a mini-abstraction using [hover] and [mousestate] could be used to work with any named object. anyone make something like this?

Smile

#159123
Jun 6, 2009 at 9:23am

if you can find a use for a standalone timeline object sending udp data, check timelinerSA. runs nicely on windows, dono about osx.

#159124
Jun 6, 2009 at 11:38pm

Dear jayjames and everyone
thanks for the advice it has been very helpful
i was very enthusiastic with waveform~ although that just last until i figure it out that i needed a long (mono) buffer to make a time line lets say 3 hour timeline, 900 ram Mb
i could try to resampling the file …, my computer didn’t like even 300 mb *activity monitor shows 700 free, but filling buffer with 300 mb activity monitor shows 15 MB left, so the computer got very slow :s.
i was hoping to use the time ruler of waveform, and all its zoom, draging, features, it was too easy i guess..
anyway i trying now panels with hover inside of a bpatcher together with thispatcher moving scripting, nice!! very nice!! although what i’m more concern now is how to control the timing,
(every track will play at just one rate, every track will have the same characteristics)
i tried audio to make the timeline, line~ and sfplay~ with a silent track using the position output, and even max clocker and the
the video was not reliable and the audio gets interrupted very quickly, so like you said that is being tricky to resolve
(since its a multitrack every track could have different durations and different time positions therefore i can´t ask gettime and route it, besides the others movies audio will be interrupted too)

so i guess what i could do is to use a clocker with a counter for the line/bar as a player, the line would also have suckah to detect where is the color block that defines the movie, then just start the movie and hopefully the movie will end at the same time the “color block” ends.
also using hover i could send time $1 to the movie for scrubing and to refresh the new playing position and when play is pressed metro would take the job.

i hope i could come out with a cleaner solution for syncing timeline with the movies
any help will be apreciated

the best!!

#159125
Jun 7, 2009 at 12:10pm
autogusto wrote on Sat, 06 June 2009 18:38
i was very enthusiastic with waveform~ although that just last until i figure it out that i needed a long (mono) buffer to make a time line lets say 3 hour timeline, 900 ram Mb
i was hoping to use the time ruler of waveform, and all its zoom, draging, features, it was too easy i guess..

anyway i trying now panels with hover inside of a bpatcher together with thispatcher moving scripting, nice!! very nice!! although what i’m more concern now is how to control the timing,
(every track will play at just one rate, every track will have the same characteristics)

so i guess what i could do is to use a clocker with a counter for the line/bar as a player, the line would also have suckah to detect where is the color block that defines the movie, then just start the movie and hopefully the movie will end at the same time the “color block” ends.

also using hover i could send time $1 to the movie for scrubing and to refresh the new playing position and when play is pressed metro would take the job.

Sounds like you’re making progress, great!

As far as the waveform~ goes, you do need a buffer~ (even just silence) to make it work, but you could easily scale it to output a useful resolution without being a huge RAM hog. So if the total time could be up to 3 hrs. for a given clip, that’s 108,000 seconds, or 180 minutes, or whatever grain you want. Just make the buffer~ that long (ms) and the range output can be re-scaled for the movie playback: so if you want resolution of 1 second, use a 108,000-msec buffer~ (about 9 MB for a mono file), then multiply the output (which is msec accoding to waveform~) by 1,000 to get seconds, or 24,000 to get frames, etc. Remember you can zoom in the waveform~ too, so what you see on the screen with the whole block visible probably won’t be as fine as you can actually interact with.

If the waveform~ is just as big as the movie clip, you could set loop points for the movie with the range points, if there are movies you want looped. It’s got a lot more to it than rslider, so a little setup is really worth it.

The moving line/suckah combination sounds fine, though remember that somewhere you already have the information of the screen position of the blocks, so you might not need the suckah at all. However, using it you could do some other features like have different color codes do different things during playback, that would be cool. With your hover/mousestate interaction for dragging, you know the last block that was clicked or moved, so a drop-down menu of possible colors (and their associated actions–FX?) would be pretty simple to add on. At the very least it could set the volume of the movie when it plays back, or you could use a bpfunction envelope for that.

I like the scrub/play feature too, that should be very useful. Hopefully the overall timing and playback will work itself out and be smooth. Keep pluggin’ away!

#159126
Jun 10, 2009 at 12:42am

thanks for the anwer again!
your are right, i kind of gave up with waveform~ because as i said originally i was thinking into have one long waveform~ , the range would adapt according the movie duration, and i´ll be able to move the range through tiime, however i would not be able to repeat the movie in one timeline (one waveform~), so i guess several waveform~ over time should be created to do this, each one representing one movie, but then waveform decrease its utility and the complexety for this basic project gets bigger, for the looping range this will be usefull zomming, but it feels i´ll go rather with panels just to locate time position of the movie and probably scrubing
i´ll go deeper later also i keep finding a solution for smoothely syncing the audio with the video of all movies

thank you again!

#159127

You must be logged in to reply to this topic.