Login | Register 

multi-purpose moviePlayer

Share your components here. First one to 100 wins!

multi-purpose moviePlayer

Postby greg » Tue Sep 12, 2017 4:33 am

If I was to make a movie player that catered to my preferences, it would be something like this. It came about as I was preparing for the MUTEK Montreal workshop and wanted the students to start with something I would find useful, hence the numerous features.

To start playing around with it, start the .tox, go into Perform mode and drag-drop a movie file onto the panel.

from the Help:

moviePlayer is a standalone TouchDesigner component for preparing, playing, and presenting movie files.

It's a mix of features like you would see in QuickTime or VLC players, plus features for making and playing cues and sub-clips, I use it when performing live or when giving presentations in TouchDesigner networks (an alternate to using PowerPoint or Keynote) because of the ease of jumping around long movies. It works well with a touch screen, and can be externally-driven by CHOPs or python.

moviePlayer.4.jpg (43.98 KiB) Viewed 174 times

Most simply, drag-drop a movie from a file browser onto the UI. Or choose a movie with the File parameter on the Settings 1 page of the component. On the user interface, you can press the P+ button to bring up the parameters.

To manage multiple movies, duplicate moviePlayer in the network and alter the duplicates. Each moviePlayer component can have multiple cue points and sub-clips.

As noted each moviePlayer can be driven with external CHOP timing ramps and via python trigger commands to position/play at specific times or cues.

Play and Position Controls
The precise shuttle controls and frame increment buttons, speed control, audio, and movie preparation parameters are described here. The || and > button plays and pauses.

Scrub-and-pause/play: When dragging on the scrub bar, it will continue to play when you release the mouse if the cursor is still on the scrub bar, but if you have dragged up or down off the bar, it will pause the movie at the scrub point. Or you can hold Shift while you operate the scrub bar and it will pause when you release.

For precise positioning, the - and + buttons let you step forward backward one frame. If you hold these buttons down, it will increment/decrement 6 frames per second, and if you drag right/left off the + and - buttons, it will increment/decrement faster the farther you drag off the buttons.

The <> button acts like the value ladder: If you click and drag left/right off the <>, it will shuttle and pause at nearby frames, but if you bring the cursor back to <>, it will return to the initial frame.

Look and Movie Settings
The "P+" button brings up the custom parameters for the movie. All UI looks and controls are tied to custom parameters:

Parameters on the Settings 1 and Settings 2 pages pre-process and configure the movie.

Parameters on the Setup page let you optionally play the movie when you click on the moviePlayer1 node in a TouchDesigner network. It can optionally pause the movie when you click on another node. etc.

You can control opacity of the UI's overlay panels, and whether you want them displayed only when you roll over the panels.

moviePlayer optionally plays audio out the default audio device (Internal Audio Player on the Setup page). Its Volume parameter is mirrored in the UI as a slider. Also the second output of the component is the audio of the movie, which can be routed to a mixer/output.

Creating and Using Cues
You can set up cues (a point or sub-section of a movie), each with a "beauty" frame, a "start" time and an optional "end" time.

To set up, move your cursor to the top part of the player. The cue grid comes up (mostly empty at first).

Click Add Cue. It will add a cue at the current frame.

If you click in the top row of boxes labelled "B", it goes to the respective Cue's Beauty frame and pauses.

If you click in the middle row of boxes labelled "S", it goes go to a cue's Start point and plays.

If you click in the third row of boxes labelled "E", it goes to a cue's End point and pauses.

There are 4 ways to set the beauty, start and end points (some are better for touch screens):

Pause the movie where you want set a start, beauty or end point.

(1) Press the S= or E= buttons in the cue grid. S= sets the beauty and start frames.

(2) Press Ctrl-click on the B, S or E boxes.

(3) Use the Set> menus in the cue grid.

(4) Right-click on an existing cue in the timeline and use the same Set menu.

Thereafter, when you left-click on the B, S and E boxes, it will go to those times in the movie.

In the bottom row of the timeline, if you click on an icon it goes to the beauty frame for that cue and pauses. If you press Shift-click on the icon, it will go to the cue's start and play forward to the end of the movie. You can also play from the start time if you click on an icon and drag off the icon to the right (convenient for touch screen).

In the timeline above the bottom row, clicking the white cue boxes will play only the cue's segment from start to end, and by default loop the cue. The box turns green indicating it will only play the cue start-end range. Press Shift-click to pause at a cue's start time. Press > to continue. The first click on a cue sets it to the cue start, the next clicks scrubs the cue.

Cue Internals
Note that every cue is a Base component in moviePlayer1/cues, each with a few custom parameters. In the Set> menu, select Cue Parameters to bring up the parameters of a cue. Here you see where the start, end and beauty times are held. You can name the cue. The Enable parameter undisplays the cue in the timeline, and is useful when it gets too cluttered. The Next Behavior menu allows you to stop or loop when reaching the end of a cue. (black/zero not implemented yet). You can safely delete or re-order cue1, cue2... components in the cues network, or via the Set> menu.

Movie Adjustments
The moviePlayer component also has parameters to prepare the movie: crop, luminance-adjust, interpolate-between-frames, audio-adjust etc on the Settings pages.

External Control of moviePlayer
To the first input of the moviePlayer component, you can attach a CHOP with one channel with values in the 0-1 range, such as a ramp from a LFO CHOP. This will take over the timeline until you disconnect the CHOP.

On the "Cues" page of the component's parameters, you can select a cue number and press Go to Cue and Play, for example. You can drive this with python or by exporting to the parameters.

You can alternately set a time and Go to Time and Play.

The python extension of the component has the functions GoToCue(cuenum, cuepoint, play) and GoToTime(seconds, play). Example to go to 50 sec and play:

op('moviePlayer1').GoToTime(50., 1)

movie and audio go out the first two outputs.

moviePlayer contains about 40 nodes initially without cues - your GPU memory may become the limiting factor as you add many moviePlayers. But its default behavior is to pause moviePlayer when it is un-selected, to avoid using GPU and CPU time.

This component is "experimental" and I hope it's useful, and you are able to mod it to suit your needs.
(69.53 KiB) Downloaded 30 times
User avatar
Posts: 476
Joined: Tue Nov 13, 2007 1:08 am

Re: multi-purpose moviePlayer

Postby barakooda » Tue Sep 12, 2017 12:21 pm

works smooth.
User avatar
Posts: 404
Joined: Fri Nov 27, 2009 5:08 pm

Return to Shared .tox Components

Who is online

Users browsing this forum: No registered users and 2 guests