ANR Tools

ANR Fast MP4 Read

Reads an MP4 once into a cache folder, then plays, scrubs and jumps through it at the speed of a file read, from its own file or from a Read already in your comp.

Overview

ANR Fast MP4 Read reads an MP4 file (H.264 or H.265 video) once, in order, into the Cache Folder. After that every frame is one quick file read, so scrubbing backwards or jumping round the clip is as fast as playing it forwards.

Source > From Disk: the node reads its own MP4 File with Windows' decoder, on the CPU, or with Decoder > Graphics Card on the card's video decoder; it falls back to the CPU by itself when the card cannot decode the file. Source > From Input: connect a Read that is already in your comp, and each frame is pulled from it once and kept.

Colour sets how the video's values become linear: Linear (Gamma 2.2) is what Nuke's own Read uses for an MP4 by default. Decode All to Cache fills the cache in one go, and Project Range and Format from Clip sets the project's frame range and format to the clip's.

Inputs

SourceFast MP4 ReadOutput
  1. Sourceoptional

    With Source > From Input: the footage to keep, such as a slow Read already in your comp. Not used with From Disk.

Output. The clip as RGBA. From Disk gives alpha 1; From Input passes its input's alpha through.

Quick start

  1. Add ANR Fast MP4 Read and choose the MP4 File.
  2. Press Generate Autofill to make a Cache Folder for it, or type a folder. Save the script first: the folder is made next to it.
  3. Press Project Range and Format from Clip: Nuke takes this node's frames and format from the project, so this sets them to the clip's.
  4. Press Decode All to Cache to decode the whole clip once, in order. Esc or Cancel stops it; the frames already cached stay.
  5. Play, scrub and jump: every cached frame is read straight from the folder.
  6. For a slow Read already in your comp, set Source to From Input, connect the Read and press Decode All to Cache.

The panel

The node's panel as Nuke shows it, with the values of a new node. Click any control to see what it does; tabs and sections work as in Nuke.

ANR_Fast_MP4_Read1
SourceFrom Disk
MP4 File
DecoderCPU
ColourLinear (Gamma 2.2)
First Frame1
Cache Folder
Generate Autofill
Decode All to CacheProject Range and Format from Clip
Clear This Cache
Status

All controls

ANR Fast MP4 Read11 controls
SourceMenump4Source

From Disk: this node reads the MP4 file itself. From Input: plug in a Read that is already in your comp; each frame is pulled from it once and kept in the Cache Folder.

Default: From DiskOptions: From Disk From Input

MP4 FileFilemp4File

An .mp4 file (H.264 or H.265 video).

Default: empty

DecoderMenump4Decoder

CPU: Windows' own decoder, on all cores; the quickest on the cards measured (11-21: 1080p 250 fps, 4K 90 fps on a 3080 Ti PC). Graphics Card: the card's video decoder through Windows (NVIDIA, AMD or Intel); it falls back to the CPU by itself when the card cannot decode the file.

Default: CPUOptions: CPU Graphics Card

ColourMenump4Colour

How the video's values become linear. Gamma 2.2 is what Nuke's own Read uses for an MP4 by default. Video Values: no curve (as the file holds them, 0-1). From Input passes its input as it is.

Default: Linear (Gamma 2.2)Options: Linear (Gamma 2.2) Linear (sRGB) Linear (Rec.709) Video Values

First FrameSlidermp4FirstFrame

The frame number the video's first picture lands on.

Default: 1

Cache FolderFilecacheFolder

Where the decoded frames are kept (about 3 MB per HD frame from disk, 16 MB per HD frame from an input). Empty: nothing is kept.

Default: empty

Generate AutofillButtonanrCacheAutoFill

Create a new node-type/footage_letter_4digits folder on every click, then stop. Previous caches are kept. Enter a folder to choose a custom base.

Decode All to CacheButtonmp4Build

Decode the whole clip once, in order, into the Cache Folder (fast: no jumping back to keyframes). Esc / Cancel stops; what is done stays.

Project Range and Format from ClipButtonmp4ProjectRange

Nuke takes this node's frames and format from the project (it does not ask the node): this sets the project's First / Last Frame and format to the clip's (From Input: the range only). Frames outside the clip show its first / last picture.

Clear This CacheButtonmp4Clear

Delete the frames this node keeps for the current file (or input). Other caches are not touched.

StatusStatusmp4Status

What the clip is (size, codec, frame rate, frame count), which decoder is in use, how much of it is cached, and what the last button did.

Tips

  • Decoder > CPU is usually the quickest. Graphics Card uses the card's video decoder through Windows (NVIDIA, AMD or Intel).
  • First Frame sets the frame number the video's first picture lands on.
  • Colour > Video Values gives the file's values with no curve, from 0 to 1. With From Input the input passes as it is, with no colour change.
  • Clear This Cache deletes the frames this node keeps for the current file or input. Other caches are not touched.
  • With From Input, a kept frame stays as it was when something above the node changes: press Clear This Cache after you change the input.
  • Without a Cache Folder nothing is kept, and each frame is decoded as it is asked for.
  • A cache takes about 3 MB per HD frame from disk, and about 16 MB per HD frame from an input.

Good to know

  • MP4 files only, with H.264 or H.265 video. A file with another kind of video is refused with a message that names it.
  • It decodes with Windows' own decoders: no codec comes with ANR Tools. H.265 needs Microsoft's HEVC Video Extensions; without them, read the file with a Nuke Read and use Source > From Input.
  • Nuke never asks the node how long the clip is or what format it has: it uses the project's. Project Range and Format from Clip sets the project to the clip; frames outside the clip show its first or last picture.
  • A file that changed on disk gets a cache of its own, so a stale frame is never shown. The old frames stay in the Cache Folder until you delete them.
  • A clip with a variable frame rate is placed by time: each frame lands where its time says.

Something unclear or missing? Write to [email protected].