Movie File In TOP

From Derivative
Jump to: navigation, search


Summary

The Movie File In TOP loads movies, still images, or a sequence of still images into TOPs. It will read images in .jpg, .gif, .tif, or .bmp format. It will read movies in QuickTime's .mov format, .mp4, .mpg, .mpeg, .avi, .wmv, .dpx, Cineform and Hap Q formats (including Hap Q with Alpha). It also supports some .swf and .flv Flash files as well as DXT1, 3, and 5 compressed .DDS files. Images and movies can also be fetched from the web by using http:// to specify a URL.

For a complete list, see File Types.

Examine the state of a Movie File In TOP by attaching an Info CHOP to it (see below on Info CHOP). This will show info like movie length, resolution, frames per second, and whether there is audio in the file. It also shows dynamic information like movie open status, current frame, readahead frames and queue size, dropped frame count, CPU decode time and GPU upload time.

See also Cineform, Hap, Movie File Out TOP, Movie Playback

PythonIcon.pngmoviefileinTOP_Class


Parameters - Play Page

File file - The path and name of the image or movie file to load. Image and movie formats are those found in File Types. You can specify files on the internet using http:// ...

To treat a folder of images as if they are one movie, specify the folder containing the images instead of a filename. All the files be the same resolution. It will treat all stills/movies in that folder as if each is a frame in one movie. The order of the images is the alphanumeric. By default the first image has an index of 0, second is 1, etc, regardless of their file names. Overriding the sample rate on the Trim parameter page will let you playback the image sequence at any frame rate.

Using an info.xml file in the directory containing a sequence of images allows you to specify the frames per second and an audio file to be used with the sequence of images. Example xml file:

 <?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>			
 <Settings>			
     <attributes fps="30.0" />			
     <audio filename="audio.wav" />			
 </Settings>			

URLs can be used to fetch images and movies. The image or movie is downloaded to the user's Derivative temp directory and is read into the Movie File In TOP.

Reload reload - Change from 0 to 1 to force the image to reload, useful when the file changes or did not exist at first.

Reload Pulse reloadpulse -

Play Mode playmode - - Specifies the method used to play the movie, there are 3 options.

  • Locked to Timeline locked - This mode locks the movie position to the timeline. Scrubbing or jumping in the timeline will change the movie position accordingly. The parameters Play, Reset, Speed, and Index are disabled in this mode since the timeline is directly tied to movie position.
  • Specify Index specify - This mode allows the user to specify a particular position in the movie using the Index parameter below. Use this mode for random access to any location in the movie.
  • Sequential sequential - This mode continually plays regardless of the timeline position (the Index parameter is disabled). Reset and Speed parameters below are enabled to allow some control.

Play play - Movie plays when 1, movie stops when 0.

Speed speed - This is a speed multiplier which only works when Play Mode is Sequential. A value of 1 is the default playback speed. A value of 2 is double speed, 0.5 is half speed and so on. Negative values will play the movie backwards.  

Cue cue - Jumps to Cue Point when set to 1. Only available when Play Mode is Sequential.

Cue Pulse cuepulse -

Cue Point cuepoint - Set any index in the movie as a point to jump to.  

Cue Point Unit cuepointunit - -

Cue Behavior cuebehavior - - Customize the Cue parameter's behavior.

  • On Release, Repeat Cued Frame repeat - When releasing the Cue parameter, immediately play the next frame.
  • On Release, Play Next Frame play - When releasing the Cue parameter, first play the cued frame before continuing to play the next frame.

Index index - This parameter explicitly sets the movie position when Play Mode is set to Specify Index. The units menu on the right lets you specify the index in the following units: Index, Frames, Seconds, and Fraction (percentage). For example, assume you have a movie that internally is 25 fps, and the timeline that is 60 fps. If you set Units to Index and the parameter value to 25, you get the image that is 1 second into the movie. If you set the Units to Frames and set the value to 60 you get the same image at 1 second into the movie.  

Index Unit indexunit - -

Loop Crossfade loopcrossfade - Crossfades the beginning and end of the movie together to create a smooth transition when looping. If the movie uses Trim options, it will crossfade Trim Start with Trim End positions.  

Loop Crossfade Unit loopcrossfadeunit - -

Step Size stepsize - Sets how many frames to skip before displaying next frame. For example, a StepSize of 30 will display every 30th frame. This timing of movie playback does not change, so with a Step Size of 30 and a sample rate of 30, a new frame will be displayed every second.

Audio Loop audioloop - - This menu helps you determine how to treat the audio as the end of a movie approaches. This is needed because of all the cases of playing a movie, like when driving with an index, the TOP will not know if you intend to loop it or not.

  • Silence silence - Audio will go silent when movie ends.
  • Fade fade - Audio will fade out when movie ends.
  • Match Start to End match -

Image Sequence Indexing imageindexing - - Determines how an image sequence is ordered.

  • Zero Based zero - Index the sequence of images starting at 0, after sorting them alphanumerically.
  • Filename Based filename - Index the sequence of images using the numbers on the end of the filenames. I.e a file named flower400.tiff will be frame index 400, regardless of if there are other files in the directory before it.


Parameters - Image Page

Interpolate Frames interp - Interpolates between frames based based on exact time. For example, if the index (in frames) is 1.5, then frames 1 and 2 will be blended 50-50. If the index is 1.7 then 30% of frame 1 is blended with 70% of frame 2 and so on.

Deinterlace deinterlace - - For movies that are stored as fields, where each image is made of two images interleaved together. A 30-frame per second movie would contain 60 fields per second. For each image, the even scanlines of the first field are interleaved with the odd scanlines of the second field. The Movie File In TOP has several ways of dealing with this:

  • Off off - Output the movie images unchanged.
  • Even even - Take only the even scanlines of the file's images and create the odd scanlines by interpolating between the even scanlines. (For historic reasons, scanline 0 is at the top of the images for the purpose of the deinterlacing.)
  • Odd odd -
  • Bob (Split) bob -

Field Precedence precedence - - Where fields are extracted one field at a time, this will extract the Even field first by default, otehrwise it will extract the odd field first. The video industry has not standardized on one or the other.

  • Even even - When the disk files are fragmented. The Movie File In TOP will read frames of the movie into memory before they are used, this can eliminate pops or stutters in playback that occur from fragmented files, other resources accessing the hard drive, or movie looping.
  • Odd odd -

Bottom Half is Alpha (AAA) bottomhalfalpha -

Multiply RGB by Alpha multalpha - - Premultiplies the image.

  • Off off -
  • On on -
  • Automatic automatic -

Input is sRGB inputsrgb -

Loading/Error Image loadingerrorimage - -

  • Colored Bottom Right Square coloredbottomright -
  • Zero zero -


Parameters - Trim Page

Trim trim -

Trim Start tstart -  

Trim Start Unit tstartunit - -

Trim End tend -  

Trim End Unit tendunit - -

Extend Left textendleft - - Determines how the Movie File In TOP handles movie positions that lie before the Trim Start position. For example, if Trim Start is set to 1, and the movie's current index is -10, the Extend Left menu determines how the movie position is calculated.

  • Hold hold - Displays the first frame in the movie range (the frame specified by Trim Start) for any position before Trim Start.
  • Cycle cycle - Loops the movie range continuously.
  • Mirror mirror - Loops the movie range in a zig-zag pattern. For example, playing backwards from Trim Start the movie will index will climb towards Trim End, at which point is will decend down towards Trim Start again and continue to zig-zag (or mirror) the further the movie plays backwards.
  • Black black - Displays black frame for any movie position before Trim Start.
  • Zero zero -

Extend Right textendright - - Determines how the Movie File In TOP handles movie positions that lie after the Trim End position. For example, if Trim End is set to 20, and the movie's current index is 25, the Extend Right menu determines how the movie position is calculated.

  • Hold hold - Displays the last frame in the movie range (the frame specified by Trim End) for any position after Trim End.
  • Cycle cycle - Loops the movie range continuously.
  • Mirror mirror - Loops the movie range in a zig-zag pattern. For example, playing forwards from Trim End the movie will index will start decending towards Trim Start, at which point is will start climbing towards Trim End and continue to zig-zag (or mirror) the further the movie plays.
  • Black black - Displays black frame for any movie position after Trim End.
  • Zero zero -

Override Sample Rate overridesample -

Sample Rate samplerate -  


Parameters - Tune Page

Pre-Read Frames prereadframes - Sets how many video frames TouchDesigner reads ahead and stores in memory. Using this, smooth reading of an image stream is possible even when the disk files are fragmented. The Movie File In TOP will read frames of the movie into memory before they are used, this can eliminate pops or stutters in playback that occur from fragmented files, other resources accessing the hard drive, or movie looping.

Frame Read Timeout frametimeout - The time (in milliseconds) TouchDesigner will wait for a frame from the hard drive before giving up. If the Disk Read Timeout time is reached, that frame is simply skipped. This also works for network files that are downloaded via http://.

Always Load Initial Frame alwaysloadinitial - If this parameter is turned on, then for the first loaded frame the Frame Read Timeout will be ignored, and it will always wait for the first frame to ensure the node always starts up with a valid image.

File Open Timeout opentimeout - The time (in milliseconds) TouchDesigner will wait for a movie to open. If the Disk Open Timout is reached, the Movie File In TOP will stop waiting and make its image all black, with a grey square in the bottom right corner. If the file still isn't opened the next time the TOP cooks, it'll wait again, and do the same. It'll keep doing this until the file is opened, or the open fails.

On Timeout, use Latest Avail uselatestontimeout - When on, if the Disk Read Timeout is reached TouchDesigner will use the latest available frame in place of the skipped frame.

Use Global CPU Cache usecpucache - Uses CPU cache to store image into main memory. The size of the Global CPU Cache is set under Edit > Preferences > TOPs. This CPU cache only works for very specific circumstances like looping a single movie. It will store frames of a movie in CPU cache, but the entire movie must fit in the cache or it will be pushed out. We do not use this feature regularly and recommend contacting support for more details if you think you need to use it.

Async Upload to GPU asyncupload - When enabled, this will use OpenGL features to upload movie images to the GPU asynchronously. This will reduce the cook time of the Movie File In TOP considerably (in the performance monitor the lines that say "Uploading Image to GPU" will go down to almost nothing). There is a GPU memory cost to using this feature however. It uses up another (Width * Height * 4 * Read Ahead Size) bytes of GPU memory. If you are having poor results with this feature, make sure your graphics drivers are up to date.

Update Image updateimage - Image will not update when set to 0. Movie index will continue to move forward but the output image will not update. This is useful when you are using a Movie Audio CHOP to get audio from the movie, but you don't care about the video.

Max Decode CPUs maxdecodecpus - Limit the maximum number of CPUs that will be used to decode certain codecs that are capable of multi-CPU decoding, such as H264 and Cineform.

High Performance Read highperfread - This option should be used when playing back files that require very high SSD read speeds such as high resolution (4K+) HAP Q files. It greatly improves read performance in those cases. It should not be used for low resolution or low data rate files such as 1080p H264 files.

High Performance Read Factor highperfreadfactor - When doing high performance reads, this parameter controls the size of the read operations that are done on disk. Whatever the largest operation the codec asks to be done, this is multiplied by the read factor and all subsequent reads will read that much data instead. This can result in higher throughput depending on the drives. For example if a request is made to read 1MB and the factor is set to 3, then instead the operations will read 3MB from the disk and the extra 2MB read will be ready for the next frame and will likely already have the next 2 frames available in CPU RAM.  


Parameters - Common Page

Output Resolution outputresolution - - quickly change the resolution of the TOP's data.

  • Use Input useinput - Uses the input's resolution.
  • Eighth eighth - Multiply the input's resolution by that amount.
  • Quarter quarter - Multiply the input's resolution by that amount.
  • Half half - Multiply the input's resolution by that amount.
  • 2X 2x - Multiply the input's resolution by that amount.
  • 4X 4x - Multiply the input's resolution by that amount.
  • 8X 8x - Multiply the input's resolution by that amount.
  • Fit Resolution fit - Multiply the input's resolution by that amount.
  • Limit Resolution limit - Multiply the input's resolution by that amount.
  • Custom Resolution custom - Enables the Resolution parameter below, giving direct control over width and height.

Resolution resolution - Enabled only when the Resolution parameter is set to Custom Resolution. Some Generators like Constant and Ramp do not use inputs and only use this field to determine their size. The drop down menu on the right provides some commonly used resolutions.

Resolution Menu resmenu -

Use Global Res Multiplier resmult - Uses the Global Resolution Multiplier found in Edit>Preferences>TOPs. This multiplies all the TOPs resolutions by the set amount. This is handy when working on computers with different hardware specifications. If a project is designed on a desktop workstation with lots of graphics memory, a user on a laptop with only 64MB VRAM can set the Global Resolution Multiplier to a value of half or quarter so it runs at an acceptable speed. By checking this checkbox on, this TOP is affected by the global multiplier.

Output Aspect outputaspect - - Sets the image aspect ratio allowing any textures to be viewed in any size. Watch for unexpected results when compositing TOPs with different aspect ratios. (You can define images with non-square pixels using xres, yres, aspectx, aspecty where xres/yres != aspectx/aspecty.)

  • Use Input useinput - Uses the input's aspect ratio.
  • Resolution resolution - Uses the aspect of the image's defined resolution (ie 512x256 would be 2:1), whereby each pixel is square.
  • Custom Aspect custom - Lets you explicitly define a custom aspect ratio in the Aspect parameter below.

Aspect aspect- - Use when Output Aspect parameter is set to Custom Aspect.

Aspect1 aspect1 -


Aspect2 aspect2 -

Aspect Menu armenu -

Input Smoothness inputfiltertype - - This controls pixel filtering on the input image of the TOP.

  • Nearest Pixel nearest - Uses nearest pixel or accurate image representation. Images will look jaggy when viewing at any zoom level other than Native Resolution.
  • Interpolate Pixels linear - Uses linear filtering between pixels. This is how you get TOP images in viewers to look good at various zoom levels, especially useful when using any Fill Viewer setting other than Native Resolution.
  • Mipmap Pixels mipmap - Uses mipmap filtering when scaling images. This can be used to reduce artifacts and sparkling in moving/scaling images that have lots of detail.

Fill Viewer fillmode - - Determine how the TOP image is displayed in the viewer. NOTE:To get an understanding of how TOPs work with images, you will want to set this to Native Resolution as you lay down TOPs when starting out. This will let you see what is actually happening without any automatic viewer resizing.

  • Use Input useinput - Uses the same Fill Viewer settings as it's input.
  • Fill fill - Stretches the image to fit the edges of the viewer.
  • Fit Horizontal width - Stretches image to fit viewer horizontally.
  • Fit Vertical height - Stretches image to fit viewer vertically.
  • Fit Best best - Stretches or squashes image so no part of image is cropped.
  • Fit Outside outside - Stretches or squashes image so image fills viewer while constraining it's proportions. This often leads to part of image getting cropped by viewer.
  • Native Resolution nativeres - Displays the native resolution of the image in the viewer.

Viewer Smoothness filtertype - - This controls pixel filtering in the viewers.

  • Nearest Pixel nearest - Uses nearest pixel or accurate image representation. Images will look jaggy when viewing at any zoom level other than Native Resolution.
  • Interpolate Pixels linear - Uses linear filtering between pixels. Use this to get TOP images in viewers to look good at various zoom levels, especially useful when using any Fill Viewer setting other than Native Resolution.
  • Mipmap Pixels mipmap - Uses mipmap filtering when scaling images. This can be used to reduce artifacts and sparkling in moving/scaling images that have lots of detail. When the input is 32-bit float format, only nearest filtering will be used (regardless of what is selected).

Passes npasses - Duplicates the operation of the TOP the specified number of times.

Channel Mask chanmask - Allows you to choose which channels (R, G, B, or A) the TOP will operate on. All channels are selected by default.

Pixel Format format - - Format used to store data for each channel in the image (ie. R, G, B, and A). Refer to Pixel Formats for more information.

  • Use Input useinput - Uses the input's pixel format.
  • 8-bit fixed (RGBA) rgba8fixed - Uses 8-bit integer values for each channel.
  • sRGB 8-bit fixed (RGBA) srgba8fixed - Uses 8-bit integer values for each channel and stores color in sRGB colorspace.
  • 16-bit float (RGBA) rgba16float - Uses 16-bits per color channel, 64-bits per pixel.
  • 32-bit float (RGBA) rgba32float - Uses 32-bits per color channel, 128-bits per pixels.
  • 10-bit RGB, 2-bit Alpha, fixed (RGBA) rgb10a2fixed - Uses 10-bits per color channel and 2-bits for alpha, 32-bits total per pixel.
  • 16-bit fixed (RGBA) rgba16fixed - Uses 16-bits per color channel, 64-bits total per pixel.
  • 11-bit float (RGB), Positive Values Only rgba11float - A RGB floating point format that has 11 bits for the Red and Green channels, and 10-bits for the Blue Channel, 32-bits total per pixel (therefore the same memory usage as 8-bit RGBA). The Alpha channel in this format will always be 1. Values can go above one, but can't be negative. ie. the range is [0, infinite).
  • 16-bit float (RGB) rgb16float -
  • 32-bit float (RGB) rgb32float -
  • 8-bit fixed (Mono) mono8fixed - Single channel, where RGB will all have the same value, and Alpha will be 1.0. 8-bits per pixel.
  • 16-bit fixed (Mono) mono16fixed - Single channel, where RGB will all have the same value, and Alpha will be 1.0. 16-bits per pixel.
  • 16-bit float (Mono) mono16float - Single channel, where RGB will all have the same value, and Alpha will be 1.0. 16-bits per pixel.
  • 32-bit float (Mono) mono32float - Single channel, where RGB will all have the same value, and Alpha will be 1.0. 32-bits per pixel.
  • 8-bit fixed (RG) rg8fixed - A 2 channel format, R and G have values, while B is 0 always and Alpha is 1.0. 8-bits per channel, 16-bits total per pixel.
  • 16-bit fixed (RG) rg16fixed - A 2 channel format, R and G have values, while B is 0 always and Alpha is 1.0. 16-bits per channel, 32-bits total per pixel.
  • 16-bit float (RG) rg16float - A 2 channel format, R and G have values, while B is 0 always and Alpha is 1.0. 16-bits per channel, 32-bits total per pixel.
  • 32-bit float (RG) rg32float - A 2 channel format, R and G have values, while B is 0 always and Alpha is 1.0. 32-bits per channel, 64-bits total per pixel.
  • 8-bit fixed (A) a8fixed - An Alpha only format that has 8-bits per channel, 8-bits per pixel.
  • 16-bit fixed (A) a16fixed - An Alpha only format that has 16-bits per channel, 16-bits per pixel.
  • 16-bit float (A) a16float - An Alpha only format that has 16-bits per channel, 16-bits per pixel.
  • 32-bit float (A) a32float - An Alpha only format that has 32-bits per channel, 32-bits per pixel.
  • 8-bit fixed (Mono+Alpha) monoalpha8fixed - A 2 channel format, one value for RGB and one value for Alpha. 8-bits per channel, 16-bits per pixel.
  • 16-bit fixed (Mono+Alpha) monoalpha16fixed - A 2 channel format, one value for RGB and one value for Alpha. 16-bits per channel, 32-bits per pixel.
  • 16-bit float (Mono+Alpha) monoalpha16float - A 2 channel format, one value for RGB and one value for Alpha. 16-bits per channel, 32-bits per pixel.
  • 32-bit float (Mono+Alpha) monoalpha32float - A 2 channel format, one value for RGB and one value for Alpha. 32-bits per channel, 64-bits per pixel.


TOPs
Add • Analyze • Anti Alias • Blob Track • Blur • Cache Select • Cache • Channel Mix • CHOP to • Chroma Key • Circle • Composite • Constant • Convolve • Corner Pin • CPlusPlus • Crop • Cross • Cube Map • Depth • Difference • DirectX In • DirectX Out • Displace • Edge • Emboss • Feedback • Fit • Flip • GLSL Multi • GLSL • HSV Adjust • HSV to RGB • In • Inside • Introduction To TOPs id• Kinect • Layout • Leap Motion • Level • Lookup • Luma Blur • Luma Level • Math • Matte • Monochrome • Movie File In • Movie File Out • Multiply • NDI In • NDI Out • Noise • Normal Map • Null • Oculus Rift • OP Viewer • OpenColorIO • OpenVR • Out • Outside • Over • Pack • Photoshop In • PreFilter Map • Projection • Ramp • RealSense • Rectangle • Remap • Render Pass • Render Select • Render • Reorder • Resolution • RGB Key • RGB to HSV • Scalable Display • Screen Grab • Screen • Select • Shared Mem In • Shared Mem Out • Slope • SSAO • Substance Select • Substance • Subtract • SVG • Switch • Syphon Spout In • Syphon Spout Out • Text • Texture 3D • Texture iltering• Texture Sampling arameters• Threshold • Tile • Time Machine • TOP• TOP iewer• Touch In • Touch Out • Transform • Under • Video Device In • Video Device Out • Video Stream In • Video Stream Out • Vioso • Web Render

An Operator Family that creates, composites and modifies images, and reads/writes images and movies to/from files and the network. TOPs run on the graphics card's GPU.

An Operator Family which operate on Channels (a series of numbers) which are used for animation, audio, mathematics, simulation, logic, UI construction, and many other applications.

The Graphics Processing Unit. This is the high-speed, many-core processor of the graphics card/chip that takes geometry, images and data from the CPU and creates images and processed data.

To pulse a parameter is to send it a signal from a CHOP or python or a mouse click that causes a new action to occur immediately. A pulse from a CHOP is typically a 0 to 1 to 0 signal in a channel, and a pulse via python is via a .pulse() call on a pulse-type parameter, such as Reset in a Speed CHOP.

The panel at the bottom of TouchDesigner, it controls the current Time of the full system or just one component.

Each SOP has a list of Points. Each point has an XYZ 3D position value plus other optional attributes. Each polygon Primitive is defined by a vertex list, which is list of point numbers.

The term "Frame" is used (1) in the Timeline, (2) as a time-unit in CHOPs, (3) as a time-unit in TOPs, and (4) with movies images which are read and created with TOPs.

samples-per-second of a CHOP. Each CHOP in your network has a sample rate, whether it is used or not. The overall timeline has a "frame rate", which is the number of animation frames per second, generally your monitor display frequency.

The width and height of an image in pixels. Most TOPs, like the Movie File In TOP can set the image resolution. See Aspect Ratio for the width/height ratio of an image, taking into account non-square pixels.

The viewer of a node can be (1) the interior of a node (the Node Viewer), (2) a floating window (RMB->View... on node), or (3) a Pane that graphically shows the results of an operator.

A CHOP outputs one or more channels, where a channel is simply a sequence of numbers, representing motion, audio, etc. Channels are passed between CHOPs in TouchDesigner networks. See also Export.