@Nathan, thanks for the explanation and the suggestion for the .evalutate()
though ivanbusquets's solution was easier to swap in, so I've used that
instead.
Thank you kindly ivanbusquets!
So the final resolution is:
--
def sendToFFmpeg():
# grabs the write node's file value and makes sure the path uses printf
style filenames
imgSeqPath = nukescripts.replaceHashes(nuke.filename(nuke.thisNode()))
# generate mov path
base, ext = os.path.splitext(os.path.basename(imgSeqPath))
movPath = os.path.dirname(os.path.dirname(imgSeqPath)) + '/' +
re.sub('\.?%0\d+d$', '', base) + '.mov'
# make shell command
enc = 'ffmpeg -y -r 24 -i \'%s\' -an -vcodec libx264 -vpre slow -crf 22
-threads 0 \'%s\'' % (imgSeqPath, movPath)
subprocess.Popen(shlex.split(enc), stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
--
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python