When editing to music, I find it helpful to have a bunch of markers to make sure the cuts line up nicely. However there isn’t an easy way to add lots of evenly spaced markers (that I’m aware of), and Premiere Pro isn’t scriptable1.

So: what to do? Fortunately, Premiere exports and imports XML. If you paste some XML into some other XML, you can add hundreds of beautifully-spaced markers very easily indeed.

I wrote a script that automates part of this process and I think it’s useful enough to share with you, favourite anonymous Premiere Pro user.

Download markerbeat.rb from GitHub.

The screencast.

Here’s me showing how to use it to cut some pictures of kittens in time to an epic orchestral track2.

What you’ll need.

  • A Mac (not really, but this is from a Mac-centric perspective. It should all work similarly on Windows).
  • Basic terminal knowledge; enough to run a Ruby script from the command line.
  • A text editor such as Sublime Text to paste in the resulting XML.
  • A copy of the script, “markerbeat.rb”.
  • Optional: Homebrew to install sox and bpm-tools, for automatic beat detection.

Overview of the process.

A quick preview, so you don’t have to watch the entire screencast to figure out what’s going to happen.

  1. Set up a Premiere sequence with the settings you want. Drop in one marker (to make it easy to replace with the ones we’ll generate), and export it to XML.
  2. Figure out the BPM of your music using a manual tool like this, or an automatic one like bpm-tools.
  3. Run the script with the parameters you need.
  4. Copy the resulting XML and paste it into the relevant part of your exported file.
  5. Save, and re-import into Premiere.
  6. Mix a gin martini … and relax.


  1. But, gee, it’d be great if it was.

  2. Screencasts are hard. I kept on stopping and starting the recording, so you might notice the time jumping around like Homer’s badly-edited appearance on Rock Bottom.