My Latest Tweet

 

@josephjaramillo on twitter

Obligatory Portrait

Joseph's Portrait

My name is Joseph.
I make web apps.

I'm half of fiveby.
I built whspr!

I heart Ruby.

I pretend I'm a designer
when no one is looking.

More details over here.

Posts Tagged ‘video’

Batch Converting Files With FFmpeg and Ruby

by Joseph Jaramillo

Sunday, November 29th, 2009

I recently needed to burn some video files (h.264 MKV) to DVD such that the disc would work in a standalone player. After an hour googling for a set of commands to pass to ffmpeg to convert my files, I then started looking for batch scripts. It occurred to me shortly thereafter that Ruby could help. I had found a command that worked beautifully with a single file, so all that was necessary was to automate it.

It only took one line to accomplish the task:

It’d be a cinch to generalize for input video format.