2

I'm using Time Lapse Assembler, but it only works with jpg files. The problem is that the pics I want to combine into a timelapse are bmp images (15,000 of them!). So I'm trying first to convert them into jpg with Automator (it's a mac). The problem is that I'm failing miserably to convert them with Automator. I keep getting an error message.

Any suggestions as to how to timelapse the bmp pics directly on a mac, or how to convert them into some other format before timelapsing them?

fixer1234
  • 27,064
  • 61
  • 75
  • 116
pacocalvo
  • 29
  • 2

1 Answers1

2
#!/usr/bin/env python

import os
import glob

files = sorted(glob.glob("/path/to/files/img*.bmp"))

outdir = "./Order"

if not os.path.exists(outdir):
    os.makedirs(outdir)

for i, f in enumerate(files):
    os.symlink(f, os.path.join(outdir, "%03d.bmp" % (i + 1)))

And then:

ffmpeg -r 5 -intra -qscale 1 -i %03d.bmp out4.mp4

Might do the trick for you.

The python script puts the file in order.You will need a wildcard (*) to replace the variable part of the file name.

Then the ffmpeg command grabs the ordered files and makes a video out of it.

I'm think I grabbed this code from somewhere a few years ago, so credit to whoever was the author. If you know who he/she is paste a link in the comments and I'll update the answer.

SOMN
  • 1,111
  • 9
  • 18