Jump to: Board index » General » Fusion

Rendering assets from CMD

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline
User avatar

Mikhail Korovyansky

  • Posts: 148
  • Joined: Mon Nov 10, 2014 9:59 pm

Rendering assets from CMD

PostFri Jan 09, 2015 12:41 am

Hey guys!
Looking for a way (a proper command) to launch prepared fusion's comps and do rendering throught the command line.. Just want to write a simple tool for 3d guys to automate sequences to *.mov conversion.

Found an old topic at pigsfly but looks like it is out of date and the method uses RenderTool.eyeonScript which is gone for now, as I can understand.

Listed help file but didn't found any info about it, so maybe someone already use it?

Thanks!
Offline
User avatar

Stefan Ihringer

  • Posts: 257
  • Joined: Mon Nov 10, 2014 10:40 pm

Re: Rendering assets from CMD

PostFri Jan 09, 2015 11:25 am

Can't check but does Fusion7 free also have eyeonscript.exe? The product page says something about local scripting only so I think it's available you just can't connect to a running eyeonscript/Fusion on another computer.

Usually, you'd call it to launch a script which in turn can either create a new comp or load an existing one and modify some tools (Loader/Saver) and render it. You'll probably need to make some adjustments to set up the render range correctly depending on your input footage and it might be difficult to set up quicktime codec settings without the GUI (although there are ways, like doing it in the GUI and saving the resulting saver's settings somewhere so you can load them with your script).

If you don't need anything special (like a slate or a frame counter overlay) why not use a command line tool like ffmpeg to do the transcoding? It'll be something like

Code: Select all
ffmpeg -i "your_sequence.%05.png" your_movie.mov


plus one or two parameters for the codec.
blog and Fusion stuff: http://comp-fu.com/2012/06/fusion-script-macro-collection/
Offline
User avatar

Mikhail Korovyansky

  • Posts: 148
  • Joined: Mon Nov 10, 2014 9:59 pm

Re: Rendering assets from CMD

PostFri Jan 09, 2015 2:20 pm

Stefan Ihringer wrote:(...)Can't check but does Fusion7 free also have eyeonscript.exe?(...)


Yes, Fu7.5 free includes it, and I will have a FuStudio in a few days (waiting for from mid of December from reseller)..

I'm looking into ffmpeg, but yeah, I will need a slate with basic info..
Offline

JP Docherty

  • Posts: 190
  • Joined: Wed Dec 31, 2014 2:37 pm

Re: Rendering assets from CMD

PostSat Jan 10, 2015 4:03 pm

You might not need eyeonscript - historically fusion ran fine from the cmd line (for render on farms) and I've just checked 7.6 studio and it seems to still be there, see attached usage, so you could use windows batch scripts if you like. Or any other shell - I use the bash shell provided by win-bash but there's lots of others (msys, git-bash, console2 et al).

fusionstudiocommand.jpg
fusionstudiocommand.jpg (22.66 KiB) Viewed 10853 times


I can't check the free version right now but if you open a cmd window in the fusion directory and type "fusion -help" you should get the usage message if its still there.

Just make sure your enviroment (Path, licensing if applicable etc) is set correctly in your batch script.
Offline
User avatar

Mikhail Korovyansky

  • Posts: 148
  • Joined: Mon Nov 10, 2014 9:59 pm

Re: Rendering assets from CMD

PostSat Jan 10, 2015 6:19 pm

so is there someone know Fusion's commands for command prompt (cmd)?
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: Rendering assets from CMD

PostSat Jan 10, 2015 9:03 pm

i think fusion directly doenst do commandline rendering, for this there is the renderslave.

but you can use the eyeonscript.exe to do so.

attached is a script from the eyeon version of fusion, which uses eyeonscript to render a comp. you can give 3 arguments: path to comp file, render start, render end.

it has very good comments in it, so you can modify it for your needs.


i hope BMD doenst mind to post this here
Attachments
RenderTool.zip
(1.59 KiB) Downloaded 630 times
Offline
User avatar

Mikhail Korovyansky

  • Posts: 148
  • Joined: Mon Nov 10, 2014 9:59 pm

Re: Rendering assets from CMD

PostSat Jan 10, 2015 9:58 pm

michael vorberg wrote:(...)i think fusion directly doenst do commandline rendering, for this there is the renderslave.

but you can use the eyeonscript.exe to do so.(...)


thanks! I'll try.. And I hope that we will have more expanded CMD operations in nearest future! ;)
Offline
User avatar

Mikhail Korovyansky

  • Posts: 148
  • Joined: Mon Nov 10, 2014 9:59 pm

Re: Rendering assets from CMD

PostSat Jan 10, 2015 10:20 pm

tried with the following syntax:

eyeonScript.exe "C:/Program Files/Blackmagic Design/Fusion/Scripts/CommandLine/RenderTool.eyeonScript" "C:/path_to_my_comp/comp_01.comp" 0 100

reply from cmd:

eyeonScript.exe is not an internal or external command which uses by executable programm.

not works for now..
Last edited by Mikhail Korovyansky on Sat Jan 10, 2015 11:47 pm, edited 1 time in total.
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: Rendering assets from CMD

PostSat Jan 10, 2015 11:04 pm

well, on my system it starts fusion, but seems not to able to connect to it (does not load the comp and after a while a get the timeout error). could be a limitation of the free version
Offline
User avatar

Mikhail Korovyansky

  • Posts: 148
  • Joined: Mon Nov 10, 2014 9:59 pm

Re: Rendering assets from CMD

PostSat Jan 10, 2015 11:43 pm

michael vorberg wrote:well, on my system it starts fusion, but seems not to able to connect to it (does not load the comp and after a while a get the timeout error). could be a limitation of the free version


to load a comp from cmd you can use a simple thing:

"C:\Program Files\Blackmagic Design\Fusion\Fusion.exe" С:\TestComp.comp

in exact syntax..

but how to make a rendering?!?
Offline
User avatar

Mikhail Korovyansky

  • Posts: 148
  • Joined: Mon Nov 10, 2014 9:59 pm

Re: Rendering assets from CMD

PostSun Jan 11, 2015 1:08 am

ok.. I found a solution!

first of all I found how to get info fron Fusion.exe about which commands it contains by:

c:\Program Files\Blackmagic Design\Fusion\Fusion.exe /?

When you will type this you will see a pop-up window with commands! (I'm always thought that it should to be -h)

so, the syntax is pretty easy:

c:\Program Files\Blackmagic Design\Fusion\Fusion.exe d:/myComp.comp /render 0 100 /quit

where path to your comp, executable command (hits Render button for you), frame range, closes Fusion when the rendering is done.

well, my question is solved :)
Attachments
fu_prompt.jpg
fusion's prompt commands
fu_prompt.jpg (65.13 KiB) Viewed 10923 times
Offline
User avatar

Mikhail Korovyansky

  • Posts: 148
  • Joined: Mon Nov 10, 2014 9:59 pm

Re: Rendering assets from CMD

PostSun Jan 11, 2015 2:03 am

ah.. back again..
I see there is "/args [...]" in the list.. Is this what I think that this is an argument and I can specify it in the Saver node in Fusion and change throught the cmd (which allows to give a custom naming and/or versions)???

and again - no info about it :idea:

will explore it...
Offline
User avatar

Blazej Floch

  • Posts: 191
  • Joined: Tue Nov 11, 2014 12:48 am
  • Location: Toronto, ON

Re: Rendering assets from CMD

PostTue Jan 13, 2015 12:36 am

That is not really possible with the command line. It does not do changes in the comp.
However each comp file is a text file. So you could search and replace the saver path and then render out the comp.

Here are some search and replace options for the commandline:
http://stackoverflow.com/questions/6003 ... line-envir

Since a comp is a lua table you could also parse it into lua or even use python with an external library that does lua table parsing (a keeper):
https://code.google.com/p/slpp/
Offline
User avatar

Mikhail Korovyansky

  • Posts: 148
  • Joined: Mon Nov 10, 2014 9:59 pm

Re: Rendering assets from CMD

PostWed Jan 14, 2015 11:06 pm

Blazej Floch wrote:That is not really possible with the command line. It does not do changes in the comp.
However each comp file is a text file. So you could search and replace the saver path and then render out the comp.


thanks!
yeah, we did something like that, so the tool creates a Fusion's comp file with correct loader path which inherited from 3d output path (or custom), also I added a function when the tool automaticaly loads source plate (background sequence) in Fusion if you want to render not just the result of rendering, but render the rought precompose too. Then it creates a Saver with correct path, then render..
And this is just a one button in 3d package.

Return to Fusion

Who is online

Users browsing this forum: No registered users and 48 guests