Hi all, I’m trying to write a Deadline post script that creates a mov proxy file… It’s all working well, however I’d like to add timecode from the outputed dpx files into the mov file. I can do this fine using ffmbc (a skew of ffmpeg) however in order to get the timecode from the dpx files, I need to use ImageMagick. That’s all good too, I’ve got the command to use, I can do it from within a dos window with no problems however when I try to run it from within a deadline post script I can’t capture the stdout to a variable… Here’s what I thought should work…
I’ve tried all manor of variations, changing the position of the code but I mostly get an error stating that I can’t read stdout because the process hasn’t started. Can anyone help me on this issue? As a side note, I could also write the output to a file and then read it back in, but simply putting a “>path\file.txt” inside the imageMagickArgs doesn’t actually redirect the output. Can anyone help on this issue?
Also, I don’t think specifying the arguments as arg=value works in this case, because you’re calling .NET functions instead of native python functions.
Hi Ryan, thanks for the response, I tried using the 4th spawnProcess function without luck… To be honest, I couldn’t work out how to instantiate a ‘ProcessWindowStyle’ object to feed it to the function… I’m not really a programmer more a guy who writes pretty complex scripts through trial and error! As a side note, the args=value proved to be fine, I could always get the process to run successfully, I just could not get the standard output of the process.
Cheers…
Adrian
P.S. I’m still convinced that ‘processDPXTimecode = ProcessUtils.SpawnProcess(executable=imageMagickPath, arguments=imageMagickArgs, redirectStdOutput=True)’ should work!
As I mentioned previously, these are .NET functions that you are calling, not native python ones. .NET doesn’t support optional or default parameters, so I wouldn’t expect it to work when calling them from python.