I am currently looking for a video editing program which I can control via the command line. The main feature I need is the ability to add some overlay text. Is there anything out there that can do this?

My ideal platform would be Linux, but I would be open to using Windows or OSX if need be.

5 Answers 5


FFmpeg (wiki) is one option; you can achieve what you want either with the subtitles filter (see also here) or the drawtext filter.

The subtitles filter requires ffmpeg to be compiled with --enable-libass and drawtext requires it to be compiled with --enable-libfreetype. If you're on Linux, the former is fairly likely to be the case, though the latter may not be. Also, beware than Debian and its derivatives (including Ubuntu et al) are using the forked tool avconv, from the libav project (see here for a summary of the situation); some people have reported problems with avconv vs ffmpeg. I would recommend using ffmpeg, mainly because there seem to be more ffmpeg users than avconv users on the SE network, so you'll be able to get better help here.

If the version in your repos is not compiled to do these, you can grab a static build from the FFmpeg website, or you can compile it yourself, following one of the guides on the ffmpeg wiki, making sure to use the correct flags.


Avisynth (wiki) is a script-driven app and in conjunction with filters should be able to do the work.

  • Related, AvxSynth is a Linux port of AviSynth as AVISynth, while very powerful (I was just learning it last night.), is Windows only. It does appear you might be able to get it to run in WINE though.
    – AJ Henderson
    Mar 12, 2014 at 13:46

While ffmpeg has editing capabilities it is not specifically designed for editing, and it does not work like an NLE; it takes input(s) and produces output(s), instead of doing non-destructive edits on multiple source files.

Melt however, based on the mlt framework which powers kdenlive, is designed as a

"powerful, if somewhat obscure, multitrack command line oriented video editor…"

A melt command can do the same job as the timeline in a NLE. Here's an example from their website that plays an edited collection of shots from the source files a.dv, b.mpg and c.png:

$ melt a.dv in=50 out=100 b.mpg out=500 c.png out=500

There is also the capability add effects, and you can also create edits as XML files.

  • Is there a windows build for Melt or is it Linux only? I was looking at it last night for a tool I've been building to do some automated editing, but ended up working with AVISynth because I couldn't find a Windows build. (Granted, the ideal platform for this particular question was Linux, so this is a great answer.)
    – AJ Henderson
    Mar 12, 2014 at 13:44
  • I think it's source-code only for windows. But for mac users it's available via hombrew (>brew install mlt).
    – stib
    Mar 13, 2014 at 3:24
  • @stib according to the features page it's also available on Windows through MinGW (and on Mac through Macports for those without homebrew). Mar 13, 2014 at 16:10

I created a cross-platform Node.js based CLI tool for making simple video edits. It is more opinionated and limited than mlt, but it aims to have lots of easy to use components and transitions, and sane default values.

editly \
  title:'My video' \
  clip1.mov \
  clip2.mov \
  title:'My slideshow' \
  img1.jpg \
  img2.jpg \
  title:'THE END' \
  --audio-file-path /path/to/music.mp3

It also supports a more sophisticated edit spec as JSON and can easily be called from JavaScript.



I made a production-grade low-level audio/video FFMPEG-based micro-engine a few years back:


and I've been maintaining it since.

It has a command-line interface -- with rudimentary Ruby scripting required at the moment, and I'm working on a cleaner FS+CLI support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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