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.

Pages

Batch Converting Files With FFmpeg and Ruby

by Joseph Jaramillo

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.

Share:
  • Twitter
  • FriendFeed
  • Facebook
  • del.icio.us
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • RSS
  • Print this article!
  • E-mail this story to a friend!

Tags: , , ,

One Response to “Batch Converting Files With FFmpeg and Ruby”

  1. Elliot

    Wow, I didn’t know ffmpeg could do that. I think you just solved my DVD backup problem, though I wonder if I could tickle Handbrake into doing the same thing – thanks!

Leave a Reply