How do I batch edit a collection of raw files in Darktable? I have tried to research this, but with no luck.
4 Answers
It's a little easier than jrista's method. You still make your edits to a single file, but then on the lighttable there's a "History Stack" section which allows you to copy the history stack of an image (or any parts thereof). And then you can select multiple images and paste the history stack onto them.
Update: I understand better jrista's mention of styles. Just below "history stack" on the lighttable is a module called "styles." If you select an image and click create a style you can save a specific application of darkroom modules (just like the history stack). Once it's saved as a style you can apply it simply by selecting images on the lighttable and double-clicking the style name.
-
\$\begingroup\$ If the module you want to batch-apply has some settings that depend on the photo properties (like focal length in the Lens corrections module), you first have to create a preset from the module settings (the ☰ icon), and then apply the module via this preset. Otherwise, the style would capture the particular settings for the photo it was created from and would apply the same focal length to all your photos. \$\endgroup\$ May 13, 2018 at 17:15
-
\$\begingroup\$ @MartinPecka I think this behavior is module dependent. I have some styles that do work correctly to auto-select the appropriate lens/camera settings when applied, but I think the module has to support that behavior. \$\endgroup\$– KyleMay 15, 2018 at 17:59
The only way I know of to apply batch edits to multiple files in Darktable is to generate a history stack of the edits you wish to apply on one photo, export that history stack as a "Style", then apply that style on export to all the other photos. Not sure that this is what you are looking for...but I'm an infrequent user of Darktable, and that was the best I could find in the past.
A useful feature which I have only just found is the ability to copy and paste with short cut keys as shown here darktable manual. I've spent too long right - clicking all over the interface for a context menu whist working on auto pilot....
ctrl + c - copy history stack
ctrl + v - paste history stack
ctrl + shift + c - copy partial history stack (a dialogue pops up with check box's to allow selection of individual modules to copy)
ctrl + shift + v - paste partial history stack (dialogue box as above), can follow either copy action
To batch process -
- In the darkroom edit one image as required
- Select the image on the filmstrip at the bottom of the screen (ctrl + f to toggle on) if its the current image it will be highlighted in the centre of the strip.
- ctrl + c to copy the history stack
- Select the rest of the images in your batch on the filmstrip
- ctrl + v to paste the history stack
- Switch to the lighttable
- Select the images to be processed and have a cuppa whilst darktable chugs away on your batch!
Caution must be used with some modules which are dependent on the input given to them by the image such as white balance and lens corrections. They will copy and paste the actual module settings from the source image to the destination image ignoring exif data.
UPDATE
I have just noticed, though it might always have worked in this way, that as of darktable v3.0.2 if you were to follow steps 1 thru' 4 then settle your mouse pointer over an image that is not in your batch, ie not selected but still highlighted, the paste is applied to that image not your selection.
I think another way of doing this in addition to Kyle's answer is the darktable command line interface. There two main options:
darktable-cli <input> <output>
This will take the input image, look for the XMP file associated with it, process it at maximal resolution and write the output to output, trying to guess the output format from the output filename.
or in case you want to use one specific xmp
file for a number of pictures, you can explicitly specify its name like this
darktable-cli <input> <xmp> <output>
The link above gives additional options for the process.