Vapoursynth TimeCube: Difference between revisions
Remove background without information (via update-page on MediaWiki MCP Server) |
Update to current Hybrid behaviour; code as <pre> (via update-page on MediaWiki MCP Server) |
||
| Line 30: | Line 30: | ||
== Example == | == Example == | ||
Sony ALog footage converted to BT.709, on a 10-bit YUV 4:2:0 source: | Sony ALog footage converted to BT.709, on a 10-bit YUV 4:2:0 source: | ||
< | <pre> | ||
# adjusting color space from YUV420P10 to RGB30 for vsTimeCube | # adjusting color space from YUV420P10 to RGB30 for vsTimeCube | ||
clip = core.resize.Bicubic(clip=clip, format=vs.RGB30, matrix_in_s="470bg", range_in_s="limited", range_s="full") | clip = core.resize.Bicubic(clip=clip, format=vs.RGB30, matrix_in_s="470bg", range_in_s="limited", range_s="full") | ||
| Line 38: | Line 38: | ||
# adjusting output color from RGB30 to YUV420P10 for NVEncModel | # adjusting output color from RGB30 to YUV420P10 for NVEncModel | ||
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_in_s="full", range_s="limited") | clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_in_s="full", range_s="limited") | ||
</ | </pre> | ||
== How Hybrid calls it == | == How Hybrid calls it == | ||
Latest revision as of 09:54, 16 November 2026
TimeCube applies a color lookup table (LUT) in .cube format to the video. Typical uses are converting camera log footage to BT.709, converting between SDR, PQ and HLG or between 601/709/2020, and creative "film look" grades.
Filtering → Vapoursynth → Color → Conversion

What it does
Every RGB value of the picture is looked up in the 3D (or 1D) table of the chosen .cube file and replaced by the table's result, interpolated between the table's grid points.
Settings
| Control | Parameter | Values | Hybrid default | Meaning |
|---|---|---|---|---|
| LUT | cube | the .cube files of Hybrid's LUT folder | ALog_to_BT709 | LUT to apply. Disabled with Custom LUT folder. |
| Custom LUT folder | – | on/off, folder | off | Use the .cube files of another folder (path field and Select button). |
| Custom LUT | cube | the .cube files of the custom folder | ALog_to_BT709 | LUT from the custom folder. |
| Compare all | – | on/off | off | Preview only: applies every LUT of the folder, labels each result with its file name and interleaves them with the original. |
Hybrid ships about 70 LUTs, among them:
- camera log to BT.709, BT.601 PAL/NTSC, HLG or PQ (ALog, C-Log3, D-Log, LogC, S-Log2/3, V-Log, Z-Log, …),
- BT.601 PAL/NTSC/NTSC-J ↔ BT.709/BT.2020/HLG/PQ, BT.709 → BT.2020/HLG/PQ,
- PQ → BT.709 and PQ ↔ HLG, DCI-XYZ ↔ BT.2020/BT.709, Dolby Vision profile 5 → BT.709.
A subfolder color holds creative LUTs; they can be used through Custom LUT folder.
Example
Sony ALog footage converted to BT.709, on a 10-bit YUV 4:2:0 source:
# adjusting color space from YUV420P10 to RGB30 for vsTimeCube clip = core.resize.Bicubic(clip=clip, format=vs.RGB30, matrix_in_s="470bg", range_in_s="limited", range_s="full") # color adjustment using TimeCube clip = core.timecube.Cube(clip, cube="F:/Hybrid/64bit/vsfilters/ColorFilter/TimeCube/ALog_to_BT709.cube") clip = core.std.SetFrameProps(clip=clip, _Primaries=1, _Transfer=1) # adjusting output color from RGB30 to YUV420P10 for NVEncModel clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_in_s="full", range_s="limited")
How Hybrid calls it
- TimeCube works on RGB; Hybrid converts the clip to full-range RGB first.
- If the chosen file does not exist, Hybrid writes a comment and skips the filter.
- Hybrid reads the target of the LUT from its file name (the part after "to_"): BT.709 targets give BT.709, BT.601 PAL gives 470bg, NTSC gives 170m, BT.2020/HLG/PQ targets give BT.2020. It tags the result with the matching primaries and transfer and uses that matrix when converting back to YUV. LUTs with an unknown or XYZ target keep the input's matrix.
- The plugin's options format, range, interp and cpu are not used; the plugin defaults apply (trilinear interpolation).
- TimeCube also offers the common options (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).
Background
timecube (plugin)
timecube by sekrit-twc reads .cube files (TITLE, DOMAIN_MIN/MAX, LUT_1D_SIZE, LUT_3D_SIZE) and applies them to 8/16-bit integer or half/single float RGB. Options: format (output format), range (force limited/full output), interp (0 trilinear, 1 tetrahedral) and cpu (SIMD level). Most of the shipped LUTs were created by Francesco Bucciantini.
AviSynth
LUTs are applied in AviSynth with the AVSCube or DGCube plugins; see Avisynth AVSCube and Avisynth DGCube.
Sources
- timecube (plugin source)
- Hybrid's tooltips