Video transcoding, Darwin and the iPhone

Project Balti. That name won’t mean a great deal to anyone outside of Wapple HQ, but to those few in the know, it means just one thing – a video transcoding and streaming media solution.

videoThe first part of the project brief was to be able to give Wapple Canvas users the ability to upload a single source video, be that in MP4, 3GP, AVI or whatever, and transcode it into multiple formats. Those formats should be configurable as should resolutions and bitrates – the ability to auto generate thumbnails and place assets into categories and content sets was also a requirement.

On it’s own it’s an enormous project, but in addition to this, all those videos have to be streamable! Aye Carumba!

64-bit install = nightmare!

I’d made a few comments in my article about setting up a Darwin Streaming Server – about how easy it was to install and how you can get up and running in no time, but I may have been a little bit hasty. Configuring DSS on a 64-bit linux machine means you have to apply a number of patches to the source code and compile it rather than go through the handy install file for 32-bit.

Pretty hardcore I’m sure you’ll agree, but I found this awesome tutorial on how to do it – have a read of it here, it’ll explain it a lot better than I can.

As for ffmpeg – to get it running with a decent set of video and audio codecs, you have to install a load of packages (or windows libraries if you’re that way inclined), but get those installed and you’re set and ready to go.

Ffmpeg, perl and crons

If you’ve got a perl script to run ffmpeg transcoding and need to run it in the background, you’ll need a few extra options when starting off your script otherwise it’ll hang at the ffmpeg command and not actually do anything! Your kick-off command should look a bit like this:

$ perl transcode.pl </dev/null >/dev/null &

And if you put it in a cron don’t forget to include the full paths to both perl and your video transcode script.

Streaming now works perfectly to every handset that supports it as well as a few that don’t – we’ve even got embedded iPhone videos with a little play button on top of the video thumbnail! Rock on!

canvasIf you’re a budding Steven Spielberg and fancy creating a load of different videos in a multitude of formats and bitrates, sign up for a free Wapple Canvas account and get to it!

Head of Development @ Wapple

Tea Drinker Extraordinaire

Related posts:

  1. Darwin Streaming Server

Tags: , , , , , , , , ,

Leave a Reply