Render at different resolutions via command line

Suppose I have an animation file called test.blend.
Can I render it at different resolutions via command line ?
blender -b test.blend -a “320x200”
blender -b test.blend -a “800x600”



On Windows you could write a batch file. There are a lot of tutorials about those on Net.
If you are using *nix system, you could make a shell script to do the job for you.

It would be pretty cool if there were a graphical program for this kind of job.

Thanks for you reply.

In fact, I do not found such info on the web yet.
I am using linux.
The command line options that I use are: -b -s -e -a
I found no command line option for changing the output resolution or the output file name.
So, I must have missed something !
Must I write something in Python ?


Each shell has its own syntax.
Basically you can determine within script what the computer has to do while executing it. For example you could make a script that works like this:
blendq.(script extension) [input.txt] [output directory] [blender_dir] in which input.txt contains something like


blender_dir could be an environment variable so that may not be needed?
(I haven’t fiddled with *nix a lot at all)

This could be altered so that it could contain the path info. When the script gets the parameters, it parses the info from input.txt and executes blender with those parameters defined in it. If the data isn’t suitable, the script could throw an error message to the user. You could alternatively write the info that’s within the file to the script but that would make it less usable imo.

Command line options could be included in input.txt too.

Here’s a couple links:

Thanks !

I think I know how to write scripts, but my real problem is:
how to tell Blender to render test.blend at different resolutions without editing test.blend itself (I have found no command line options for doing that)?


Only solution I can figure out at the moment is to save the .blends in the resolutions you want to render. It seems that it’s not possible to the resolution as a parameter as I stated before.

You would have .blends like this if you decide to use this way:
test1.blend (contains scene with 800x600 resolution)
test2.blend (contains same scene with 1024x768 resolution)

Sounds a little silly solution. I hope there’s a better one.

<edit>You might want to try out DrQueue It’s originally meant for distributed rendering but it might work well in way described above.</edit>

Here are the possible tags that you can use for Blender (Windows version - I don;t know if it’s the same for Linux):

Render options:
  -b &lt;file&gt;     Render &lt;file&gt; in background
    -S &lt;name&gt;   Set scene &lt;name&gt;
    -f &lt;frame&gt;  Render frame &lt;frame&gt; and save it
    -s &lt;frame&gt;  Set start to frame &lt;frame&gt; (use with -a)
    -e &lt;frame&gt;  Set end to frame (use with -a)&lt;frame&gt;
    -a          Render animation

Animation options:
  -a &lt;file(s)&gt;  Playback &lt;file(s)&gt;
    -p &lt;sx&gt; &lt;sy&gt;        Open with lower left corner at &lt;sx&gt;, &lt;sy&gt;
    -m          Read from disk (Don't buffer)

Window options:
  -w            Force opening with borders
  -W            Force opening without borders
  -p &lt;sx&gt; &lt;sy&gt; &lt;w&gt; &lt;h&gt;  Open with lower left corner at &lt;sx&gt;, &lt;sy&gt;
                        and width and height &lt;w&gt;, &lt;h&gt;

Game Engine specific options:
  -g fixedtime          Run on 50 hertz without dropping frames
  -g vertexarrays       Use Vertex Arrays for rendering (usually faster)
  -g noaudio            No audio in Game Engine
  -g nomipmap           No Texture Mipmapping
  -g linearmipmap       Linear Texture Mipmapping instead of Nearest (default)

Misc options:
  -d            Turn debugging on
  -noaudio      Disable audio on systems that support audio
  -h            Print this help text
  -y            Disable script links, use -Y to find out why its -y
  -P &lt;filename&gt; Run the given Python script (filename or Blender Text)
  -R            Register .blend extension
  -v            Print Blender version and exit