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

moviePlayer is a standalone TouchDesigner component for playing and exploring movie files, setting cue points and presenting sections of movies. Movie playback can be externally controlled with ramps and python commands.

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

On the user interface, you can press the Par+ button to bring up the parameters. You can alternately 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 1326 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 and audio level are described here. The || and > button plays and pauses.

Scrub-and-pause/play: When dragging on the scrub bar, when you release it, if you have dragged up off the bar, it will play the movie from the scrub point. If you have dragged down off the bar, it will pause the movie.

For precise positioning, the - and + buttons let you step forward backward one frame. If you hold these buttons down, it will increment/decrement 1 frames every 1/6 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 lets you inspect around the current frame: If you click <> and drag left/right off the button, it will go and pause at nearby frames, and if you continue to hold down and bring the cursor back to <>, it will return to the initial frame.

Roll over the time counter to get the movie length.

Look and Movie Settings
=======================
The "Par+" button brings up the custom parameters for the UI, the movie that is playing and its cues:

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

On Setup, Force Resolution internally scales the movie to your desired resolution when it is read.

All UI looks and controls are tied to parameters on the Setup page.

On Setup -> Action on Select, you can play the movie when you click on the moviePlayer1 node in a TouchDesigner network. Also 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 in a TD network.

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

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 the Audio slider. Also the second output of the component is the audio of the movie, which can be routed to a mixer/output.

Creating 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 5 second 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 a cue segment. Press the grey 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 (hold Shift to pause). 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 both 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.

Using Cues
==========
In the bottom row of the timeline (row 1), 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 row 2, click the grey cue boxes to play only the cue's segment from start to end, and depending on the Cue's Next Behavior setting, 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, or press the cue and drag down off the button. Press > to continue, keeping the cue selected (green). The first click on an unselected cue sets it to the cue start, the next click on that cue scrubs 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 via Set> Cue Parameters. (The Crossfade of the full movie (cue 0) is set in the movie's Settings 1 page.)

The Cue List
============
You can change the display of the top area to display cues as a time-ordered list. On the Setup page, change the Upper Display Area menu to Cue List on Rollover.

Cue Internals
=============
Note that every cue is a Base component in moviePlayer1/cues, each with a few custom parameters.

In Par+ you can see the Cues' parameters via the top row of buttons. Or 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. You can set it to go black (0 0 0 1) or zero (0 0 0 0) at the end of the cue. You can safely delete or re-order cue1, cue2... components in the cues network, or via the Set> menu.

Movie Adjustments
=================
The moviePlayer component has more parameters on the Settings 1 and 2 pages to prepare the movie: Crop, Black Level / Luminance / Gamma adjust, audio-adjust etc.

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.

If you want to control using seconds instead of a 0-1 value, you can use values in the third output of the CHOP which contains 3 constant channels: length (how many seconds long in moviePlayer is the currently selected cue (cue 0 is the full movie)), duration (this is the length divided by the Speed parameter - the movie takes longer to play if you set the Speed lower than 1)) and the movie's rate (images per second).

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 press 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 will preserve all the cues and settings you make for a movie.

moviePlayer.8.tox uploaded Oct 23 w improvements.
Attachments
moviePlayer.8.tox
(75.66 KiB) Downloaded 60 times
User avatar
greg
Staff
 
Posts: 482
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: 405
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: 482
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: 482
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

Re: multi-purpose moviePlayer

Postby greg » Mon Oct 23, 2017 1:58 am

lots of small improvements in moviePlayer.8.tox. among them:

  • You can force the movie resolution and aspect ratio to any specific width/height.
  • You can change the moviePlayer component panel width/height to anything and the buttons/text scale appropriately.
  • rollover the time code to get the movie length.
  • If in Perform mode, press space bar and arrow keys to pause/play and step.
  • UI is simpler when you start up.
  • new ui for scrub bar (drag up to play, drag down to pause)
  • cues are temporally ordered.
  • There is a simple cue list mode where you can see your cue comments and play cues, via Setup -> Upper Display Area.
  • new Help.
Download and doc are in the first post of this thread.
User avatar
greg
Staff
 
Posts: 482
Joined: Tue Nov 13, 2007 1:08 am


Return to Shared .tox Components

Who is online

Users browsing this forum: No registered users and 1 guest