Deployment

Why should your hello world remain boring?

The first ceremonial action many developers take when playing with a new language or framework is running the “Hello World”. I have done many myself. Its that sort of need for this developer instant gratification before pressing forward. Lately my take on it, has been to have a little fun with it.

Case and point, Xzibit A:

I have been wanting to try out the Mack Framework after hearing Jason talk about it on the Rails Envy Podcast. As I was playing with it, I started noticing,,, well just check out the “Pimp-My-Ride” version.

Where is my audio support FFMpeg?

you failed
I have been feeling some pain lately. No, not physically(thanks for caring).
It has to do with the licensing wrapped around the “ffmpeg” tool.

Heres why I care. I’ve been thankfully included on some really kick butt projects. One of which is
to create a video conversion sharing service which is client agnostic. Users have to be able
to upload large videos to which will be shared with other web users.

For now, lets ignore all of the framework fairies and service trolls that will wrap this problem domain and address the basic “soil” of this project which is CONVERSION.

Enter FFMpeg
Exit sanity

FFMpeg is easy enough to install. You can even (in my case) apt-get install ffmpeg. Thats
were I started out. Awesome, no errors! Lets test it out

This was mine test:

ffmpeg -i /path/to/movie.mov -ar 44100 -r 12 /path/to/movie.flv

It did the conversion, but when I played the movie.flv, there was no sound.
Let me rephrase. All of the movie content was there but nothing was coming out of the speakers.
Guess what, out of the (apt-get) box ffmpeg does not convert the sound.

Ubuntu even has a busted wiki page titled “Fixing ffmpeg on Ubuntu “. I say its busted because
the instructions are outdated.

In order for FFMpeg to convert movies audio you must compile it with Lame MP3 encoding support.
I know that now. You know that as well now. This reminds me of a personal “development” belief.
In troubleshooting, 90% of your time is spent solving the problem, and the final 10% is used
fixing the problem. In other words most all of my time was spent figuring out “how” to fix this,
and very little fixing this.

So actually its not that hard once you understand the caveats. So, Im hoping help you save what
left of your healthy hair follicles.

Install Ubuntu server. I used Ubuntu 8.04.1.

Once you have a prompt, install all of the FFMpeg dependencies:

sudo apt-get build-dep ffmpeg

Now install the conversion support libraries:

sudo apt-get install liblame-dev libfaad-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libdts-dev checkinstall

Now we need to get source code of ffmpeg:

apt-get source ffmpeg

Doing that will download a folder containing the source of FFMpeg. Change directories into it:

cd ffmpeg-*/

Now configure and compile FFMpeg with audio and friends support:

./configure --enable-liba52 --disable-debug --enable-libfaad --enable-libfaac --enable-gpl --enable-xvid --enable-pthreads --enable-libvorbis --enable-pp --enable-libtheora --enable-libogg --enable-libgsm --enable-swscaler --disable-debug --enable-shared --prefix=/usr

make

This will build a debian package with can be managed easier by the system then just doing a “make install”

sudo checkinstall -D make install

Bask in glory and success with the FFMpeg having audio support.