Skip to content

Add LUT file option to avformat producer widget#1809

Merged
bmatherly merged 8 commits intomasterfrom
avformat_lut
Mar 28, 2026
Merged

Add LUT file option to avformat producer widget#1809
bmatherly merged 8 commits intomasterfrom
avformat_lut

Conversation

@bmatherly
Copy link
Copy Markdown
Member

This allows the user to specify a LUT to be applied before the image is converted to any other colorspace (which the LUT might not be compatible with)

As reported here:
https://forum.shotcut.org/t/using-lut-on-nikon-n-log-footage-gives-very-dark-output/50927

Depends on mltframework/mlt#1212

The widget looks like this:
image

I would like to make this a plugin with easily downloadable LUT files like the speech to text models. But I can not find a reliable online resource for camera lut files.

I also think that some people will want some kind of batch method to apply a lut to all the clips from a given camera. I am interested in ideas to handle this. Maybe we could allow users to specify a metadata profile that would map a LUT file to any clips with specific metadata. Or maybe if they open multiple clips at once there could be a way to also specify a LUT file to be applied to all of them.

This allows the user to specify a LUT to be applied before the
image is converted to any other colorspace (which the LUT might
not be compatible with)

As reported here:
https://forum.shotcut.org/t/using-lut-on-nikon-n-log-footage-gives-very-dark-output/50927
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a per-clip LUT file selector to the avformat producer properties UI so users can apply a LUT early in the decoding pipeline (before later colorspace conversions), addressing dark output for certain log footage workflows.

Changes:

  • Added LUT file controls (display, browse, clear) to AvformatProducerWidget’s UI.
  • Implemented LUT browse/clear behavior and persistence via the producer "lut" property (including version-gating UI by MLT version).
  • Ensured the "lut" property is preserved when recreating producers by passing it through Util::passProducerProperties().

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/widgets/avformatproducerwidget.ui Adds LUT label, read-only path display, browse/clear buttons, and tab order updates.
src/widgets/avformatproducerwidget.h Declares new slots for LUT browse/clear buttons.
src/widgets/avformatproducerwidget.cpp Wires up LUT UI behavior (enable/disable, load from producer, open/clear dialog actions) and version-gates feature by MLT version.
src/util.cpp Passes "lut" through when cloning/recreating producers so the setting persists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ddennedy
Copy link
Copy Markdown
Member

LUT files have licenses. So, bundling some of them can be problematic. Moreover, they are scattered across manufacturer web sites with broken links to them from various articles and comments. Then, there is the metadata mapping issue, which is magical. There are a few LUTs on our Resource page. That is where we can add more and add to the web's broken links as these manufacturers move and abandon products and pages.

With that said, I like the change, and maybe the easiest way to handle multiple files now is to let someone copy and paste the file path between the properties of each clip (and encourage good practice to do this in Source before adding to timeline where it might get split up into little clips).

ddennedy and others added 7 commits March 28, 2026 08:31
Also, this changes current track selection to use the bare up and down
keys.
It looked quite ugly on KDE themes like the default breeze because they
always show but very thick with this customization. Try like this.
@bmatherly
Copy link
Copy Markdown
Member Author

maybe the easiest way to handle multiple files now is to let someone copy and paste the file path between the properties of each clip

Good comment. This is something easy we can do. But I do not want to make the text box editable because that would invite infinite invalid inputs. So I added copy and paste buttons to the row and some simple validation on paste.

image

@bmatherly bmatherly merged commit cff0aeb into master Mar 28, 2026
2 checks passed
@bmatherly bmatherly deleted the avformat_lut branch March 28, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants