Where Did We Come From?

Working with video can be hard. But that’s better than it used to be, which was impossible. Now there are lots of tools to choose from and computers are fast enough to make recording, editing, and encoding video practical for everyone. Practical, but not necessarily easy.

On Macs, we fortunately have machines with great underlying hardware and software to make it possible to easily work with videos, as long as you have the right app. There are plenty of apps that can do the work, but many aren’t that user friendly. And for the most part it’s REALLY hard to get a nicely encoded result, which is both small and high quality. Sometimes it’s hard to get a result that even plays on whatever device you’re encoding for.

That’s why Visual Hub was created. This popular app let you drag files into a list, tell it what device you were encoding for, fiddle with a couple of controls and press start. Soon (or maybe not so soon), you’d have good quality videos for your chosen device. This was my workhorse app, so when the developer called it quits, I started thinking that I should do something myself. A version of the code was released as open source asFilmRedux, but this code wasn’t quite Visual Hub, had many bugs, and was written in AppleScript (as I think Visual Hub was). I don’t really think AppleScript is the right tool for a really big app like this, so I decided to start from scratch and write a native Cocoa app. I leveraged the look of Visual Hub and many of the icons from FilmRedux and started Video Monkey.

The core of any video encoding tool is the encoder. There are a few choices for the Mac, including Quicktime. And while Quicktime is really nicely integrated into the system, it doesn’t necessarily have all the support you need to handle lots of formats. In the open source community, FFmpeg is the clear leader. It’s used all over the place and has support for an incredible number of formats. It’s a command line app, so using it natively means spawning a process, sending it the ffmpeg command, then listening for its progress. Cocoa has all the tools to make this possible so integrating ffmpeg into a native app is pretty easy. And this technique can be used for other command line tools as well. FFmpeg is nice, but you occasionally need a few extra tools to complete your task. For instance, FFmpeg can’t handle WMV3 video inside a Quicktime movie container (which happens if you edit a WMV file in Quicktime Pro and then save). So Video Monkey uses other command line tools to separate the audio and video out of the container. This raw WMV3 video is handled quite well by ffmpeg, so these tools together can get the job done.

Because of the need for this kind of flexibility, I wanted to make it easy for Video Monkey to use many different tools together. And I wanted it to be easy to create new “recipes” (combinations of commands to do an encoding task) for different formats. So I used an XML file to represent all the parameters, commands and recipes, and then I select between them, depending on the input and desired output formats. And to make it more flexible, I built in the ability to use JavaScript in this XML file to adjust parameters as needed.

So the core of Video Monkey has very flexible machinery which maintains a list of video files, determines the internals of those files, and then gives the user the ability to specify what to do with them, all based on the instructions in the XML file. This is a nice starting point and it will allow Video Monkey to grow into a really useful tool. The first version of the tool can convert files into any iTunes format. The next version will allow you to add the result to iTunes. From there, who knows where we go?

Stay tuned…