1
$\begingroup$

Does Blender have an external-facing API that makes it possible to generate a VSE sequence from outside Blender?

I am working on a program that generates simple video sequences; and I'd like to be able to send a sequence (in and out marks, tracks, properties, etc.) to the Blender VSE for a final render.

The goal here is to have an automated video sequence generator that uses Blender as an engine to produce the final result. I've searched a bit and discovered MLT but would much rather use Blender if possible.

$\endgroup$
3
  • $\begingroup$ afaik, atm nothing in blender can be used as a library or framework from external applications... mlt seems quite the right tool, at a first glance, why would you prefer to use blender? $\endgroup$ – m.ardito Feb 23 '18 at 7:49
  • $\begingroup$ MLT is useful; almost perfect for the job, but can be a little unstable at times. My main reason for wanting to use Blender is that it has capabilities that extend far beyond MLT: i.e. compositing, animation, etc. Ideally, a sequence could be worked out with an editing tool and then seamlessly moved to Blender for compositing and rendering, or trigger the final render if it's a simple enough sequence that doesn't need finishing. $\endgroup$ – mantlepro Feb 23 '18 at 17:03
  • $\begingroup$ Maybe you can generate an EDL file and use the EDL Import add-on(included with Blender). The EDL format: EDL format NB. instead of REEL you should use filename without extension - and do not use space in the filenames or Blender will not be able to import the EDL file. $\endgroup$ – tintwotin Feb 25 '18 at 18:58
2
$\begingroup$

Out of the box Blender has no pre-installed API that can be accessed from the outside. Although there are 3 ways how to accomplish this.

  • Use BlenderAsPyModule. This is a headless blender that can be accessed and controlled from any Python Interpreter.
  • Use Pythons http.server module to create a custom API that you can access from other processes (even on different machines) using the HTTP protocol. You write an addon that starts the http server. and your external client can connect to it.
  • Use blender command line with a startup script. This will start blender run a python script and stops executing when the script is finished.

All three options have pro's and cons and depends on your specific use case what will work best.

BlenderAsPyModule I use for generating thumbnails (also animations) on a webserver of blend files that users upload. Here Blender runs inside a celery process to be sure that only one generation is happen at once.

server.http I typically for render farms or when networking comes into play or when the client has no python possibilities.

And the command line I used for simple automation tasks or when I want to do many tasks at a time (start 5 blender instances doing something)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.