Batch Converting Files With FFmpeg and Ruby
by Joseph Jaramillo
Sunday, November 29th, 2009I 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.
Apple’s Resources + Ruby = Awesome
by Joseph Jaramillo
Sunday, March 29th, 2009Antonio Cangiano on Why MacRuby Matters:
MacRuby literally dominates Ruby 1.9.1. On “average”, according to these limited tests the experimental branch of MacRuby appears to be roughly 3 times faster than Ruby 1.9.1 (YARV), and in some cases even faster than that. You should definitely find this impressive.
Apple’s sponsorship of the MacRuby project is – at least on the surface – very much like Google’s unladen-swallow Python branch.
This is a really big deal.
Update: “Sponsorship” may have been the wrong word to use, here. MacRuby is Apple’s project. They don’t just “sponsor” it.
Use the Right Tool for the Job
by Joseph Jaramillo
Sunday, March 1st, 2009I had a rather rough week, and that means I have an urge to write. I sat down to design this blog yesterday afternoon, and have worked pretty much nonstop to get it to where it is at this very moment. Things are shaping up nicely.
Settling on a blog engine proved somewhat difficult. The Rubyist in me wanted to stick with a tool built in that language. If it happened to be a Rails or Merb app, all the better. The first part of the effort was spent installing Typo and Mephisto, and skinning both of them. Having converted to Haml for my Ruby templating needs, Mephisto’s use of Liquid was off-putting. That isn’t a knock against Liquid so much as it means props for Hampton Catlin’s awesome work. The Mephisto admin was clean and efficient, but compared to WordPress it was clear which was more advanced. Typo didn’t prove much better.
My needs for this blog were fairly simple, and WordPress has been doing just this sort of thing longer than just about anybody. The tool is fast, elegant, easy to use, and well-maintained. The only real knock I have for WordPress is having to deal with straight-up PHP templates for skinning. This is probably exacerbated by the exceptionally poor indentation used in the default templates. Haml markup is indentation-based, so outputted HTML is perfectly indented. This makes debugging rendering issues easier.
That being said, this is a blog, and now that it’s skinned I won’t need to deal with many templates. That makes it easy to settle back into the interface itself, which is outstanding. WordPress just smacks of people sweating the details, and that’s great to see regardless of language.
There are times when the right tool for the job is in a language or on a platform that you don’t like. That’s WordPress for me. PHP isn’t my forté and it leaves a bitter taste in my mouth, but this tool is so good it absolutely puts to rest any argument that any one thing is fundamentally superior to another. I’m a Ruby developer through and through, but as much as I love the tools and the language there simply isn’t a single Ruby blog application with this level of polish. My needs for a blog weren’t terribly specific, and I didn’t need to plug into any backend systems. The only thing that would have held me back is my own bias, and that would be silly.
If something better than WordPress happens to come along, and it happens to be written in Ruby, I’ll take a look. Until that time, WordPress looks like it’s the right tool for the job. That should’ve been a no-brainer.

