Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

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 while preparing for the MUTEK Montreal workshop and I 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 playing and exploring movie files, setting cue points and presenting parts of movie files.

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

It's a mix of features like in QuickTime or VLC Media Player, with features for making and playing cues and sub-clips, It's useful for playing 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.

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

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 "Par+" button brings up the custom parameters for the UI, the movie and its cues:

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

All UI looks and controls are tied to parameters on the Setup page. For example, you can optionally play the movie when you click on the moviePlayer1 node in a TouchDesigner network. It can pause the movie when you click on another node. etc. You can play a certain cue when you select the movie. THis is useful when demoing movies.

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

Audio
=====
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, an optional "end" time and a end-start crossfade time.

To set up, pause the movie somewhere. 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. Go and pause to some other frame after the current frame. Press the E= button to set the End time. Now you have cue segment. Press the white Cue 1 button at the bottom. It will turn green and play/loop the cue.

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. These provide quick-access jump points.

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 image 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 scrub the cue.

End-to-start crossfade times are set per-cue - Set the the Crossfade parameter of the individual cue's parameter dialog via Par+ or . Set> Cue Parameters. (The crossfade of the full movie is set in the movie's Settings 1 page.)

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)

Output
======
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.

Mult-moviePlayers
=================
To manage multiple movies, duplicate moviePlayer in the network and alter the duplicates. This is to preserve all the cues and settings you make for a movie.

I hope it's useful, and you are able to mod it to suit your needs.

moviePlayer.7.tox uploaded Oct 8 w improvements.
Attachments
moviePlayer.7.tox
(77.24 KiB) Downloaded 31 times
User avatar
greg
Staff
 
Posts: 480
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
barakooda
 
Posts: 404
Joined: Fri Nov 27, 2009 5:08 pm

Re: multi-purpose moviePlayer

Postby greg » Sun Sep 24, 2017 11:56 pm

Numerous improvements including ability to make loops with end-start crossfades, and driving the movie with ramps or python. Works with latest Official.

The .tox is at the end of the first post of this thread. Doc is updated in the first post.

Updated again on Oct 2 and again Oct 8.
User avatar
greg
Staff
 
Posts: 480
Joined: Tue Nov 13, 2007 1:08 am

Re: multi-purpose moviePlayer

Postby Timesquid » Mon Oct 09, 2017 1:09 pm

This is amazing greg thank you, Ive got a show coming up that needs very organic and flexible movie playbacks, and this will help immensely.

Although some things I found myself wanting right away were :

1. A filter on the scrubber, that disables itself (which I added)
2. crossfade to a cue? I would not know how to best add this myself.
3. Is that filter chop "filtercontrolson" just there to fade the ui on? seems like disabling it cuts alot of ui cooking out.
Timesquid
 
Posts: 110
Joined: Wed Jan 04, 2012 8:08 pm

Re: multi-purpose moviePlayer

Postby greg » Thu Oct 12, 2017 1:12 am

Re: 1. A filter on the scrubber, that disables itself

You mean a Filter CHOP on the scrubber value to smooth index?

Re: 2. crossfade to a cue? I would not know how to best add this myself.

Yes, this component isn't designed for that as it needs two Movie File In TOPs to do a cross-fade. It really depends what UI you need around that, like is your application fully automated, or improvised? In the Palette, movieBlender and moviePlaylist do that, with differing capabilities. In OP Snippets for Timer CHOP, example22 has automated overlapping movies with a fixed crossfade time.

Or you have 2 moviePlayers and a small python script to start a crossfade and start the movie at the same time.

Re:

3. Is that filter chop "filtercontrolson" just there to fade the ui on? seems like disabling it cuts alot of ui cooking out.

ugh yes, the Filter CHOP keeps cooking. If you follow it with a Null CHOP set to Selective, it stops propagating when the value hits a constant 0. Or just bypass it to make it instant 0n/off.
User avatar
greg
Staff
 
Posts: 480
Joined: Tue Nov 13, 2007 1:08 am

Re: multi-purpose moviePlayer

Postby Timesquid » Mon Oct 16, 2017 1:31 pm

Thanks Greg!

Im going to use it per longer movie file and export my content in longer sections. Then use a separate transitions system for when I change moviefiles.

I don't know if I will need to optimize it just yet but will find out as the system gets flushed out.

Thanks again!
Timesquid
 
Posts: 110
Joined: Wed Jan 04, 2012 8:08 pm


Return to Shared .tox Components

Who is online

Users browsing this forum: No registered users and 2 guests