4
Apr

Update, for latest Air Video for linux alpha5, the ffmpeg 2.4.5 is required.
I cannot use csw source to configure 2.4.5 ffmpeg anymore. Remove old x264 and lame first.

pfexec /opt/csw/bin/pkgutil -r CSWffmpeg CSWx264 CSWlame

Thus, I downloaded x264 build 1947 from Sean_McG and installed it.
Next, download yasm and libmp3lame source and make/install them.

wget http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz
tar -xfv yasm-1.1.0.tar.gz
cd yasm-1.1.0
./configure
make && make install clean

wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz/download
tar -xf lame-3.98.4.tar
cd lame-3.98.4
./configure
make && make install clean

And, export things

export PATH=/usr/xpg4/bin:/opt/SMCGx264/bin:/usr/local/bin:$PATH
export LD_LIBRARY_PATH=/opt/SMCGx264/lib:/usr/local/lib:$LD_LIBRARY_PATH
export LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
export CFLAGS='-I/opt/SMCGx264/include -I/usr/local/include'
export PKG_CONFIG_PATH=/opt/SMCGx264/lib/pkgconfig

To compile patched ffmpeg 2.4.5, do the following

./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame

And gmake it!


Original post

Picture 1.png

$2.99 full version (an update supporting iPad has been submitted)
E848EAE8-96A3-48D6-9AE4-A9D142D353D6.jpg
free version (limit the number of videos in your folder, worthy try it out before the purchase - I am 100% sure you will buy the full version, it is the best!)

Here is some communication I had with their customer support

Matej Knopp
InMethod

* Air Video for iPad has been submitted to Apple for review
http://inmethod.com/forum/posts/list/749.page#4840

* The latest server version (2.2.5) should lift this limitation for
iPad. However for full 1024x768 resolution you would need a fairly
powerful computer.

* You can't do this with current Air Video client. It needs the iPad
version (which is waiting for approval). The current iPhone client
doesn't let you increase the resolution above 640x480.

* The settings on server are only relevant with old Air Video 1 client.
All newer Air Video version have configuration on clients.

The focus of this blog post is to give a step-by-step instruction on how to install the Air Video server on other platforms other than windows and mac. I test it on Ubuntu Intrepid and OpenSolaris 2009.06.

While their mac/windows version Air Video server runs nicely, because most of my video collections are stored on linux servers, especially after the purchase of iPad, I feel it is time to make the Air Video server run on my linux computers. Thanks for the open-mind developer of Air Video, what I really need to do is to get a patched ffmpeg running!

Why Ubuntu? It is the best home server platform, I think. Low maintenance requirement and full system remote control! Intrepid is "old", but it is running nicely on my old computer - why worry updating? Why OpenSolaris? It is the ONLY operation system supports full function ZFS. While ZFS is still the best file system, my home file server has to run OpenSolaris :-(


For Ubuntu/Intrepid (based on Mbirth's wiki)

1. Update x264. I followed an instruction from ubuntu forums.

First

sudo apt-get remove x264 libx264-dev

Then, install the latest version of x264 from git

git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --backup=no --default

2. Compile the patched ffmpeg from InMethod.

First, download the patched version of FFmpeg from: http://www.inmethod.com/air-video/licenses.html (use the 2.2.5 version) and unpack it

tar xvfj ffmpeg-for-2.2.5.tar.bz2

Prepare the system for compiling and install mp4creator (included in mpeg4ip-server)

sudo apt-get install libmp3lame-dev libfaad-dev mpeg4ip-server git-core pkg-config

I have compiled ffmpeg before and run the following commands successfully. If you encounter errors, try google :-p

cd ffmpeg
./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame --enable-libfaad --disable-decoder=aac
make

3. Install the linux Air Video server.

First, download the linux server and configuration file as suggested in http://www.inmethod.com/forum/posts/list/60/34.page#3935

Now, edit the file test.properties
* path.ffmpeg should point to your just compiled ffmpeg-binary, such as

/opt/AirVideoServer/ffmpeg/ffmpeg

* path.mp4creator is

/usr/bin/mp4creator

* path.faac is

/usr/bin/faac

* folders format is:

label1:path1,label2:path2,…,label9:path9

* add a password (in plain text) or leave the other options as they are

Finally, run the server by the following command (I run it in a screen section)

java -jar AirVideoServerLinux.jar test.properties

Picture 1.png

If you want the server to auto-start, follow Mbirth's note

* create a file /etc/init/airvideo.conf

start on runlevel [2345]
stop on shutdown
respawn
exec sudo -H -n -u mbirth /usr/bin/java -jar /opt/AirVideoServer/AirVideoServerLinux.jar /opt/AirVideoServer/test.properties

* manual control by

sudo start airvideo

or

sudo stop airvideo

4. Set the Air Video client on your iPod/iPhone/iPad.

Bonjour and remote access are disabled in the release. The only way to access server is by specifying the IP address or domain name (and port 45631).


For OpenSolaris

Please notice that this only tested under OpenSolaris Dev Repository (snv_132), NOT the 2009.06 release.

uname -a
SunOS opensolaris 5.11 snv_132 i86pc i386 i86pc Solaris

The ffmpeg compile process was a little challenging on Solaris. Thanks for BlanchardJ's help. Here is the How-To!

Initially, I just installed ffmpeg, x264, faad and mpeg4ip from blastwave. But the blastwave's ffmpeg does NOT support conversion_id. I need to compile my own version using patched source.

To setup blastwave, follow this webpage http://www.blastwave.org/jir/blastwave.fam. For me, since I have used it before; what I need was just updating the blastwave packages by the following command

pfexec /opt/csw/bin/pkgutil -u

But, precompiled x264, faad and mpeg4ip packages from blastwave are useful! Install them by the following commands

pfexec /opt/csw/bin/pkgutil --install CSWmpeg4ip
pfexec /opt/csw/bin/pkgutil --install CSWfaad2 CSWfaad2mpeg4ip CSWfaad2xmms
pfexec /opt/csw/bin/pkgutil --install CSWx264
pfexec /opt/csw/bin/pkgutil --install CSWfaac

If right now I directly go to the patched ffmpeg (about how to get it, please check step 2 above), configuration won't go through unless I disable libx264 libfaad libmp3lame. We need those for live conversion!

I initially tried to setup PATH and LD_LIBRARY_PATH to include blastwave's packages. But, it doesn't help and doesn't required.

PATH=/usr/bin:/usr/sbin:/opt/csw/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ccs/bin
LD_LIBRARY_PATH=/usr/lib:/opt/csw/lib:/usr/openwin/lib:/usr/ccs/lib

One thing I found, which is not documented in google search, is that to enable local bash setting in OpenSolaris, I need to create a linked .bash_profile file, because .bashrc file is not being read automatically by the system in default setting.

ln -s .bashrc .bash_profile

Here is the correct way to compile ffmpeg in OpenSolaris, after install x264 faad2 ... libraries from blastwave.

First, specify several environmental values by running the following commands

export LDFLAGS='-L/opt/csw/lib -R/opt/csw/lib'
export CFLAGS='-I/opt/csw/include'
export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig

Second, configure the patched ffmpeg

./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame --enable-libfaad --disable-decoder=aac --prefix=/opt/csw

After that, everything should be the same as in Ubuntu. Please check the how-to in Ubuntu section.

One more thing: while I was trying to make the configuration know the libx264 library, I tried to compile x264 from source - which failed and actually made the CSWx264 package defective. To fix the x264 from blastwave, I did the following

pfexec /opt/csw/bin/pkgutil -r CSWffmpeg CSWx264
pfexec /opt/csw/bin/pkgutil -i CSWffmpeg CSWx264

Leave a Reply