Is it possible to use Blender to batch-process video files?

If I have twenty 1080p, 30fps vid[01-20].mp4 video files of varying 20-200 seconds duration and one 1920x1080 wm.png watermark image file.

How would I go about using Blender in the command line (in Linux) to render a version of each video that has the watermark baked into it while at the same time not using the user interface or at most using it to create one template project?

I was not able to find an answer but imagine there might be some options:

  • Is there a way to use Python with Blender to batch-process videos and then call the script from the command line, providing parameters like file names and durations?
  • Are Blender projects accessible as XML or some other format and could be extracted and modified with text processing tools (grep, sed etc.)?

I am aware of non-Blender solutions, however this needs to be solved in Blender.

  • $\begingroup$ As I already posted some time ago this is very well possible. You can use command line options to load specific files and place strips in the VSE (your footage as well as your watermark as an Image Strip via Blend Mode Alpha over on top). $\endgroup$
    – Samoth
    Oct 10 '16 at 16:29
  • 2
    $\begingroup$ What about ffmpeg: stackoverflow.com/a/10920872/3091066 ? $\endgroup$
    – p2or
    Oct 10 '16 at 16:33
  • $\begingroup$ @Samoth thanks, that will be something to chew on. $\endgroup$
    – qubodup
    Oct 10 '16 at 23:05
  • 1
    $\begingroup$ @poor I know this example is begging for a simpler, non-Blender solution but basically I seek a solution to this problem so that I am able to learn about more complex automatization based on this, for example using a 3d rotating model that has reflections of the video as a watermark in the next step. $\endgroup$
    – qubodup
    Oct 10 '16 at 23:08
  • 1
    $\begingroup$ @qubodup yeah, but nearly everything you need is already in this example. Took me some time to figure it out so I'd be glad if it would help you somehow. You might Upvote this other answer when it gives you some valuable inspiration. Do you know about the python output of nearly everything you do in Blender when you extend/resize the Info view a little larger (downwards) where the file menu is located? It will help you finding more python functions for scripting. And finally the tooltips of most buttons and UI elements in Blender will give you some hints about their corresponding python funcs. $\endgroup$
    – Samoth
    Oct 11 '16 at 7:32

I use Blender, Imagemagick and FFMPEG for this kind of work. Command line FFMPEG is much faster and straight forward tool for your job, although a linux blender command line would likely compare in speed, but might be more complex to implement.

However, you will have a lot more support with FFMPEG for this kind of common work, and the command line is simple (inputs, overlay location, output):

ffmpeg -i input-video.mp4 -i watermark.png -filter_complex "overlay=0:0" watermarked-video-output.mp4

Which would be easily looped in linux to operate on a batch of videos.


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.