Hi everyone. I hope you are doing well.
I'm writing a simple script to automate flipbooking process. The idea is to create a flipbook with pre defined settings and convert sequence of images to mp4.
Everything is working well except for the conversion. I'm using ffmpeg for that.
I've tried different functions but no luck.
Let's say I have this one:
subprocess.Popen("cmd /k ffmpeg -framerate 24 -i F:/tmp/flip_%04d.jpg -c nvenc F:/tmp/flip.mp4",cwd='C:/ffmpeg/bin',env=my_env)
And I get this error:
'ffmpeg.exe' is not recognized as an internal or external command,
If I add folder path to a file it seems to run ffmpeg
subprocess.Popen("cmd /k ffmpeg -framerate 24 -i F:/tmp/flip_%04d.jpg -c nvenc F:/tmp/flip.mp4",cwd='C:/ffmpeg/bin')
But then I get error that codec that I specified doesn't exist. So it looks to me that somehow command line won't pick up system variables.
Then I tried to add env to the function but still no luck
my_env = os.environ
subprocess.Popen("cmd /k ffmpeg -framerate 24 -i F:/tmp/flip_%04d.jpg -c nvenc F:/tmp/flip.mp4",cwd='C:/ffmpeg/bin',env=my_env)
Does anyone know how to make it work ?
PS: codec does exist. It's all working well if I run command line myself.
Thanks
Running command line from houdini python
696 0 0-
- maxpayne
- Member
- 40 posts
- Joined: Dec. 2010
- Offline
-
- Quick Links
