<div dir="auto"><div dir="auto">Paul Mahol (ffmpeg dev) pointed me at this technology, available as ffmpeg filter too:<div dir="auto"><br></div><div dir="auto"><a href="http://www.quelsolaar.com/technology/clut.html" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://www.quelsolaar.com/technology/clut.html</a><br></div><div dir="auto"><br></div><div dir="auto">====</div><div dir="auto"><font size="3" color="#999999"><font size="3" color="#FFFFFF"><b>Concept:
</b></font><font size="3" color="#999999">
<p>
A Hald CLUT is an image that has a specific color pattern on it. In this
pattern all colors in the color space are represented. An application
that uses the HALD CLUT image to color correct an image, takes a source
image color and looks it up in the color pattern of the HALD CLUT, and
the color it finds in that place is the corrected color that should
replace the source color in the destination image. If the color doesn't
exist in the CLUT, one can look up several colors and interpolate
between them. </p><p>====</p></font></font></div><div dir="auto"><br></div></div>files usually in png format ...<div dir="auto"><br></div><div dir="auto"><a href="http://underpop.online.fr/f/ffmpeg/help/haldclut.htm.gz" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">http://underpop.online.fr/f/ffmpeg/help/haldclut.htm.gz</a><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><a href="https://github.com/cedeber/hald-clut" rel="noreferrer noreferrer noreferrer" target="_blank">https://github.com/cedeber/hald-clut</a><br></div><div dir="auto"><br></div><div dir="auto">not HDR, just 8bit sRGB ...</div><div dir="auto"><br></div><div dir="auto"><a href="https://discuss.pixls.us/t/how-to-create-haldcluts-from-in-camera-processing-styles/12690" rel="noreferrer noreferrer" target="_blank">https://discuss.pixls.us/t/how-to-create-haldcluts-from-in-camera-processing-styles/12690</a><br></div><div dir="auto"><br></div><div dir="auto">sort of "extracts" processing in-camera as look-up table image!</div><div dir="auto"><br></div><div dir="auto"><a href="https://github.com/cameramanben/LUTCalc" target="_blank" rel="noreferrer">https://github.com/cameramanben/LUTCalc</a><br></div><div dir="auto"><br></div><div dir="auto">um, web application (!!) for generating those lut files for some cameras ....</div><div dir="auto"><br></div><div dir="auto"> ===</div><div dir="auto"><div dir="auto">A Web App for generating 1D and 3D Lookup Tables (LUTs) for video cameras that shoot log gammas, principally the Sony CineAlta line.</div><div dir="auto"><br></div><div dir="auto">LUTCalc generates 1D and 3D .cube format LUTs suitable for use in DaVinci Resolve, Adobe Speedgrade and as user 3D LUTs in Sony's log-recording video cameras. These include the PMW-F5, PMW-F55 and PXW-FS7.</div><div dir="auto"><br></div><div dir="auto">=====</div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">сб, 27 мая 2023 г., 17:31 Andrew Randrianasulu <<a href="mailto:randrianasulu@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">randrianasulu@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hm ...<div dir="auto"><br></div><div dir="auto"><a href="https://github.com/google/lut3d_utils" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">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" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">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" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank"></a></h2><h2 dir="auto">Usage</h2>
<p dir="auto"><a href="https://www.python.org/downloads/" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">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" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank"></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" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank"></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" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank"></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>
</blockquote></div></div></div>