View Full Version : command line rendering problems

10 October 2007, 12:20 PM
I'm quite used to rendering via the command line in other software and I wanted to start doing this with shake ages ago but I never looked into it because a lot of the time I just like to select a node and render that instead of always making fileout nodes.

But I'm getting far too many hang ups this way and it's driving me a bit crazy so I need to start doing command line rendering. Also, I often just render a disk flipbook for the reason that on occasions, a fileout won't overwrite a quicktime output. It will go through the render and I find that it hasn't updated the file. If I delete the file first, it will always work but I can't always make sure of that.

The disk flipbook is annoying because if you close the window, it deletes the temp file immediately and I often work on shared machines and the ass I work beside likes to shut things down without saving things.

Ideally, I'd like to be able to render a given node and then specify a fileout in the command line - I'd probably use a .sh file or I can use python.

Now, I tried a lot of examples online and at cgtalk and they are not working.

I try:

shake -cpus 4 -vv -render test -t 1-50 -exec <drag in shake script>

It starts running on one CPU as it loads the script and for some reason warns me about missing inputs even though they are not part of the tree I'm rendering. The render then starts and shows me progress at every frame but I notice that it's only using one CPU despite the fact I've said to use all four.

It's also supposed to be rendering the fileout node named test, which outputs a quicktime movie. When I look in the location, there is no output rendered. Oddly the same thing happens if I render the fileout from inside shake. The viewer shows but no file is created and no errors given, permissions are fine. I'm just testing this on different machines and none of my fileouts are generating now. No matter where I put the fileout node or what settings I use, it's going through the render but not writing out the file. Could one of the custom nodes have broken the fileout?

It's for those reasons I've been using disk flipbook and it's just getting ridiculous, I can't keep rendering that way but the other ways aren't reliable enough. I also notice that even if you specify a particular node to render via the command line, it will still load all the files from other trees into ram. This seems really inefficient, why can't it just open the upstream nodes from the one you want to render?

10 October 2007, 02:07 PM
Oh yeah, now I remember why I didn't use fileouts:

I sorted the problem above of getting no output. I had inserted a fileout node into the tree with nodes after it and for some stupid reason, this generates the render in the viewer but doesn't write out to file. So I have to make sure that I put fileout nodes in certain places otherwise I could be sitting for over an hour for a render and nothing gets saved to disk.

I'm beginning to see why this is using the command line more. If I have rendered a clip and have it selected in the Finder, this must flag the clip as 'in use' because if I try the render again, I get an error -47 and yet it still proceeds through the entire render anyway - I'm going to have to write a script that checks for an error and stop the render.

You'd think that if it had some sort of problem writing to a file when rendering a fileout that it would tell you about it 'cos y'know it's kind of important if it wastes hours of your time.

Ok so that sorts the single CPU issue too and the above command is working as I expect. The other issue I have of course is making sure I save the script before rendering in the command line. Still, it's so much better being able to just hit ctrl-c to halt a render instantly instead of beachballing all the time and no more of the disk flipbook that seems to keep using 100% CPU or more for no apparent reason even after the render is finished.

It would be nice to be able to see the output while it's rendering though. I tried -view -monitor 0 and it's not loading up while it renders.

Also, the motion blur flags aren't working -motion 1 1 -shutter 0.5 and the motion blur is still off.

10 October 2007, 12:54 PM
Friends dont let friends use quicktime. Just use image sequences and most of your issues will be solved. They load & render faster(30% roughly). Render your final quicktimes as a secondary process.

10 October 2007, 05:41 PM
Friends dont let friends use quicktime. Just use image sequences and most of your issues will be solved. They load & render faster(30% roughly). Render your final quicktimes as a secondary process.

I started using PNG image sequences for lossless intermediates although inside a quicktime container. I'll try using separated image sequences.

The thing is, I make sure to always render 3D stuff as image sequences, I should get into the same way of doing things with Shake as it means quitting a render doesn't lose the work up until that point. I can't render with audio of course but I've rarely needed to do that.

I always just wanted to avoid the whole loading an image sequence in Quicktime at the end and then encoding again to some other codec. That process gets tedious if I do a lot of test renders because image sequences don't play back very smoothly.

But if I get faster renders then that extra process shouldn't matter. Plus I'll never have to worry that the Shake render might crash at a certain point and I'll lose all the time up until it crashed.

Do you normally use fileouts or do you render via the command line? If it's the latter, do you know why those commands aren't working? I explicitly used all flags related to enabling motion blur and yet it stays off. I don't suppose I'll use the command line if I get the fileouts to work better using image output though.

Another speedup I've noticed is that it's far better to have multiple small scripts than one large script per project. I liked the infinite workspace so I was throwing node trees about all over the place inside a script and it was coming out at around 700k for the script (using about 1.5GB Ram) and every single render would get stuck. After separating the script up into about 40k chunks, it flies along much quicker. When I look in the process viewer, it opens all the source files at once for any given script - I assumed it would only keep open the tree you were working on.

10 October 2007, 04:44 AM
First, don't use PNG, they are nice and compact, but they are slow as piss to read and write. They will slow you down just as much as using a quicktime. I suggest using IFF if at all possible. They are fast to read/write and they support scanlines. Scanline makes it so when your compositing an image Shake only has to read those lines in the image that you need and not the entire image.

So the problem them becomes, quicktime doesn't read iff. Easy solution, download the maya ple and install it. It includes an iff reader/writere for quicktime.

As for making the end quicktime, you can do that with an automator action or an applescript.

10 October 2007, 02:46 PM
Another handy little (open source) app for dealing with image series is ( Drag and drop the folder (onto the app) and it will scroll back and forth (via scroll wheel) through the image series within(any images actually). Reads most image formats including iff. Very compact, fast and extremely useful when you need to scrub back and forth through an image series. It has earned a spot in my finder window toolbar.

CGTalk Moderation
10 October 2007, 02:46 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.