Setup
Currently I’m using the following software packages on one of my FreeBSD servers. I have used some flavor of BSD for ages and usually stick with this form of Unix. It has made things a bit more difficult to compile since a lot of these are developed for Linux, so its really up to you what feel comfortable with.
If you stick with FreeBSD don’t use anything in the 4.x builds other wise you will be pulling your hair out cause most things will need a lot of tweaking to compile. I have spent many hours and been on many support forums, IRC chats and googling around to get things to work so trust me.
Getting these to compile properly is a huge task on its own, I wont be able to provide you support on how to get this software to compile with your server configuration, unfortunately you own your own.
- FreeBSD 5.5 Release - I don’t recommend 4.x
- Darwin Streaming Server (DSS) CVS build
- FFmpeg CVS built with various compile options * (encoder)
- Mplayer - Mencoder SVN build (encoder)
- GPAC - MP4Box CVS buid (video hinting and 3gp optimization)
- MPEG4IP (video hinting and 3gp optimization)
Ill try to give you hints and tips on compiling some of this software. As stated before I have spent many hours trying to figure out why something wouldn’t compile and as I may give you hints I cannot solve the compile issues for you unfortunately.
FreeBSD 5.5 Release - was set up by my ISP with default configuration. If you need a good web host check out WebAir. I have known those guys personally for some time, anyhow..
Darwin Streaming Server - This was a bit complicated to run and I recommend you get the latest SVN build you will need to get a Free Apple ID first. I spent a lot of time reading though support forms as well which you can find here. From what I remember I didn’t have to do much tweaking to it to get it running on FreeBSD. If I happen to compile it again on another box Ill write down what I did and post it here or somewhere in the blog.
FFmpeg - I compiled from the svn version, most people on the support pages wont talk to you unless you have compiled the latest build. Here is my compile options.
--extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-libmp3lame --enable-libvorbis --enable-libfaad --enable-libfaac --enable-pthreads --enable-libxvid --enable-libx264 --enable-liba52 --enable-liba52bin --enable-libamr-nb --enable-libamr-wb --enable-memalign-hack --enable-shared --enable-gpl
Most important things to note is to compile Adaptive Multi-Rate (AMR). This is fairly easy and most phones support this audio codec compiled with h.263. These two codec’s will create your basic foundry for video streaming to 90% of the phones.
Other things to make sure you add during compile time are:
- faad -ISO AAC audio decoder (decoder) –enable-faad and –enable-faadbin
- faac - Freeware Advanced Audio Coder (encoder) –enable-faac
- x264 - Open source h.264 (encoder/decoder) –enable-libx264 also requires –enable-pthreads
A lot of the additional flags are for decoding and encoding the video files that you want to convert to mobile. A quick test to see what video encoding/decoding options you have in ffmpeg after compiling is running this command: ffmpeg -formats | grep
ffmpeg -formats | grep mpeg4
DEVSDT mpeg4
D A mpeg4aac
DEVSD msmpeg4
DEVSD msmpeg4v1
DEVSD msmpeg4v2
The most important factors to look at are the D and E options which well mean Decoding the video you have, and what You can Encode it to.
Mencoder - This is another encoder and I go back and forth on which I find better to solve my issues, Ill try to post video clips compiled with these 2 encoders. This is a part of mplayer but I only use mencoder to encode the video tests. I compiled this with just the default configuration on my machine. Keep in mind their are binary codec packs that you can also install, this helps with the decoding and encoding.
GPAC + MPEG4IP - I haven’t decided on which one im going to settle with yet, and I still need a bit of testing. They both seem to the what I need and that is the hinting of my encoded videos and the optimization of the 3gp format (removing unnecessary information in the video). Both where compiled with the default configuration and for the life of me I cant remember If i had issues getting them to compile.
This gives you the basic software to encode your video to , hint the video for streaming and make it available via the DSS server to the general public.











