Nuke: batch convert images

Convert a folder of images from one format to another using Nuke


I made a python script that will take a folder of images and convert them to your format of choice using Nuke in command line mode. It can also iterate through all the subfolders and rebuild the tree in the destination, converting any images it finds. Handy for converting a bunch of dpx files to jpg for a website, or converting a whole tree of CG passes from one format to another. It goes through Nuke so default colourspaces for each format are applied. The script sets jpgs to 100% quality and sets exrs to the format that is most efficient for Nuke. So if your CG passes are in the wrong exr format, you could run them through this to speed up your comp.

Runs in a linux terminal. Look in the .py file for examples of how to call it.

Friendly version

Some users are not keen on typing long commands into the terminal so I have also made a GUI interface which you can run directly from a Nuke menu. Just add the menu item, using the example line included, and when you run the tool in Nuke it will bring up a friendly dialog asking for the source and destination directories and other options. When you press OK, it loads a terminal and runs the above script using the options you gave. Though I could run it completely invisibly, I chose to run it in a terminal so you could see its progress and estimated time left.┬áSo even though you are launching it from within Nuke, it’s running a separate background instance of Nuke to do the converting. You can carry on comping.

In a good pipeline you shouldn’t have to do conversions like this but there’s always some unusual circumstance where a bunch of files need to be converted for one reason or another. A handy tool to have in those situations, or if in a more ad-hoc environment.

Download here