Execute FFmpeg Command in Nuke AfterRender Callback

Update: there’s some new code to use avconv insead

Freelancing from home, I don’t have a dedicated render manager. Running Ubuntu 11.10, FFmpeg is the most convenient solution for rendering Quicktime movies for review.

With the help of NathanR and ivanbusquets over at the Nuke forums, I’ve got a working AfterRender callback that spawns a shell subprocess to automate the creation of .mov files from an image sequence rendered out of Nuke.

The Code


  1. Add the above code to the ~/.nuke/menu.py.
  2. Add sendToFFmpeg() to the afterrender field in the python tab of your write node.

The .mov file should be created one directory up from rendered image sequence.

Note: FFmpeg assumes the image sequence starts at frame 0. At some point I’ll have to add an offset to adjust for those that don’t.

Tags: , , ,
Posted on: 3 Comments

3 Responses

  1. […] 12.04 has moved to avconv from ffmpeg and my previous python script to execute a shell script on Nuke’s afterRender callback needed to be updated […]

  2. Ross says:

    This post was super helpful to me. Needed to do something similar in Nuke because rendering a Photo JPG QT in Nuke 8 and 9 is broken. It either returns really pixelated files at 90% quality or really huge files at 100% quality. Thanks!

  3. Richard Greenwood says:

    Glad it helped. Rendering QTs out of Nuke can be a pain.

Leave a Reply