<div dir="auto">Hm ...<div dir="auto"><br></div><div dir="auto"><a href="https://github.com/google/lut3d_utils" target="_blank" rel="noreferrer">https://github.com/google/lut3d_utils</a><br></div><div dir="auto"><br></div><div dir="auto">=====</div><div dir="auto"><h1 dir="auto">Tone Map Metadata (3D Look-Up-Table) Injector</h1>
<p dir="auto">A tool for manipulating
<a href="https://github.com/google/lut3d_utils/blob/docs/Static-Colour-Mapping-Metadata-lut3d-rfc.md">production metadata</a>,
specifically tone map metadata (3D LUT), in MP4 and MOV files. It can be used to
inject 3D LUT metadata into a file or validate metadata in an existing file.</p>
<h2 dir="auto"><a href="https://github.com/google/lut3d_utils#usage"></a></h2><h2 dir="auto">Usage</h2>
<p dir="auto"><a href="https://www.python.org/downloads/">Python 3.11</a> must be used to run the tool.
>From within the directory above <code>lut3d_utils</code>:</p>
<h4 dir="auto"><a href="https://github.com/google/lut3d_utils#help"></a></h4><h4 dir="auto">Help</h4>
<div dir="auto"><pre><code>python lut3d_utils -h
</code></pre></div>
<p dir="auto">Prints help and usage information.</p>
<h4 dir="auto"><a href="https://github.com/google/lut3d_utils#inject"></a></h4><h4 dir="auto">Inject</h4>
<div dir="auto"><pre><code>python lut3d_utils -inject_lut3d -i ${input_file} -o ${output_file} -l ${lut3d_file} -p COLOUR_PRIMARIES_BT709 -t COLOUR_TRANSFER_CHARACTERISTICS_GAMMA22
</code></pre></div>
<p dir="auto">Loads a tone mapping (3D LUT) metadata from <code>lut3d_file</code> and inject it to
<code>input_file</code>(.mov or .mp4). The specified <code>output_colour_primaries</code> and
<code>output_colour_transfer_characteristics</code> are injected too. It saves the result
to <code>output_file</code>. <br>
<code>input_file</code> and <code>output_file</code> must not be the same file.</p>
<h4 dir="auto"><a href="https://github.com/google/lut3d_utils#examine"></a></h4><h4 dir="auto">Examine</h4>
<div dir="auto"><pre><code>python lut3d_utils -retrieve_lut3d -i ${input} -l ${lut3d_file}
</code></pre></div>
<p dir="auto">Checks if <code>input_file</code> contains 3D LUT metadata. If so, parses the metadata and
prints it out. In addition, it saves the 3D LUT entries to <code>lut3d_file</code> as a
".cube" file.</p><p dir="auto">=====</p><p dir="auto">soooooo .... in theory you can use those for injecting and exporting those 3d luts in mp4/mov ..</p><p dir="auto">I wonder if ffmpeg/libavformat can be teached to do this, too?</p></div></div>