Richard Shaw
Cadet
- Joined
- Mar 13, 2012
- Messages
- 3
Hi,
I've just completed the relatively tortuous process of getting the latest version of Air Video server (Linux Alpha 6) and the custom FFMPEG 2.4.5 b7? working in a jail for FreeNAS 8.0.4 and I'm now making it available for anyone who wants it.
Live Conversion works, full file convert doesn't, i'll repeat, live conversion does, but full file doesn't, so be aware of that before you set this up and some kind soul out there might be able to help fix that bit.
It's been built for FreeNAS-8.0.4-RELEASE-x64 (10351) and is available from http://dl.dropbox.com/u/11298902/airvideo_jail.tgz (511MB compressed 1.1GB uncompressed)
As a bit of a background, I created a jail based on 8.2 base, then had to install a shed load of 9.0 packages to get x264, MPEGIP, AirVideo's custom FFMPEG, openjdk6 and other things compiled and working.
To get this working on your FreeNAS box follow the steps below. Importantly, i'm not responsible for you killing your FreeNAS box if you break something, but if you can't get it working I will try and help. I've stripped the jail down as much as I am comfortable doing without breaking other things, those with more experience should be able to shrink it further.
1.) Download the jail from from http://dl.dropbox.com/u/11298902/airvideo_jail.tgz
2.) Decompress onto your main storage dataset, i had mine in /mnt/storage/airvideo_jail
3.) Set your root to rw
$ mount -uw /
4.) Add the following to your /etc/rc.conf and change the IP to whatever you want, also make sure the interface name matches that of your server, you can find this from ifconfig
#
jail_enable="YES"
jail_set_hostname_allow="YES"
jail_list="airvideo"
jail_airvideo_hostname="airvideo"
jail_airvideo_flags="-n 99"
jail_airvideo_ip="192.168.0.100"
jail_airvideo_interface="bge0"
jail_airvideo_rootdir="/mnt/storage/airvideo_jail/airvideo_root"
jail_airvideo_devfs_enable="YES"
jail_airvideo_mount_enable="YES"
#jail_airvideo_fstab="/etc/fstab.airvideo"
5.) Add the following to your /etc/sysctl.conf
#
security.jail.param.cpuset.id=0
security.jail.param.host.hostid=0
security.jail.param.host.hostuuid=64
security.jail.param.host.domainname=256
security.jail.param.host.hostname=256
security.jail.param.children.max=0
security.jail.param.children.cur=0
security.jail.param.enforce_statfs=0
security.jail.param.securelevel=0
security.jail.param.path=1024
security.jail.param.name=256
security.jail.param.parent=0
security.jail.param.jid=0
security.jail.enforce_statfs=2
security.jail.mount_allowed=1
security.jail.chflags_allowed=1
security.jail.allow_raw_sockets=1
security.jail.sysvipc_allowed=0
security.jail.socket_unixiproute_only=1
security.jail.set_hostname_allowed=1
security.jail.jail_max_af_ips=255
security.jail.jailed=0
6.) Change root back to read only
$ mount -ro /
7.) Start the jail
$ /etc/rc.d/jail start
8.) Check the jail's running, also note the ID
$ jls
9.) Get shell on the jail, replace $ID with the ID from 8.)
$ jexec -U root $ID bash
10.) Startup AirVideo
$ /usr/local/airvideo/start.sh
11.) Copy a vid into the vids /usr/local/vids
12.) From the client, add the IP of the server
You can also SSH into the server directly on the IP you set in step 4.) there's a user called admin with the password 'password' root pass is also 'password'
Props go out to the following which aided me in my painful journey.
#libav on free node for help getting ffmpeg compiled
This guide for setting up the jail - http://protosd.blogspot.com/2011/12/howto-install-serviio-in-freebsd-jail.html
And this one - http://www.inmethod.com/forum/posts/list/1778.page
Regards
R
I've just completed the relatively tortuous process of getting the latest version of Air Video server (Linux Alpha 6) and the custom FFMPEG 2.4.5 b7? working in a jail for FreeNAS 8.0.4 and I'm now making it available for anyone who wants it.
Live Conversion works, full file convert doesn't, i'll repeat, live conversion does, but full file doesn't, so be aware of that before you set this up and some kind soul out there might be able to help fix that bit.
It's been built for FreeNAS-8.0.4-RELEASE-x64 (10351) and is available from http://dl.dropbox.com/u/11298902/airvideo_jail.tgz (511MB compressed 1.1GB uncompressed)
As a bit of a background, I created a jail based on 8.2 base, then had to install a shed load of 9.0 packages to get x264, MPEGIP, AirVideo's custom FFMPEG, openjdk6 and other things compiled and working.
To get this working on your FreeNAS box follow the steps below. Importantly, i'm not responsible for you killing your FreeNAS box if you break something, but if you can't get it working I will try and help. I've stripped the jail down as much as I am comfortable doing without breaking other things, those with more experience should be able to shrink it further.
1.) Download the jail from from http://dl.dropbox.com/u/11298902/airvideo_jail.tgz
2.) Decompress onto your main storage dataset, i had mine in /mnt/storage/airvideo_jail
3.) Set your root to rw
$ mount -uw /
4.) Add the following to your /etc/rc.conf and change the IP to whatever you want, also make sure the interface name matches that of your server, you can find this from ifconfig
#
jail_enable="YES"
jail_set_hostname_allow="YES"
jail_list="airvideo"
jail_airvideo_hostname="airvideo"
jail_airvideo_flags="-n 99"
jail_airvideo_ip="192.168.0.100"
jail_airvideo_interface="bge0"
jail_airvideo_rootdir="/mnt/storage/airvideo_jail/airvideo_root"
jail_airvideo_devfs_enable="YES"
jail_airvideo_mount_enable="YES"
#jail_airvideo_fstab="/etc/fstab.airvideo"
5.) Add the following to your /etc/sysctl.conf
#
security.jail.param.cpuset.id=0
security.jail.param.host.hostid=0
security.jail.param.host.hostuuid=64
security.jail.param.host.domainname=256
security.jail.param.host.hostname=256
security.jail.param.children.max=0
security.jail.param.children.cur=0
security.jail.param.enforce_statfs=0
security.jail.param.securelevel=0
security.jail.param.path=1024
security.jail.param.name=256
security.jail.param.parent=0
security.jail.param.jid=0
security.jail.enforce_statfs=2
security.jail.mount_allowed=1
security.jail.chflags_allowed=1
security.jail.allow_raw_sockets=1
security.jail.sysvipc_allowed=0
security.jail.socket_unixiproute_only=1
security.jail.set_hostname_allowed=1
security.jail.jail_max_af_ips=255
security.jail.jailed=0
6.) Change root back to read only
$ mount -ro /
7.) Start the jail
$ /etc/rc.d/jail start
8.) Check the jail's running, also note the ID
$ jls
9.) Get shell on the jail, replace $ID with the ID from 8.)
$ jexec -U root $ID bash
10.) Startup AirVideo
$ /usr/local/airvideo/start.sh
11.) Copy a vid into the vids /usr/local/vids
12.) From the client, add the IP of the server
You can also SSH into the server directly on the IP you set in step 4.) there's a user called admin with the password 'password' root pass is also 'password'
Props go out to the following which aided me in my painful journey.
#libav on free node for help getting ffmpeg compiled
This guide for setting up the jail - http://protosd.blogspot.com/2011/12/howto-install-serviio-in-freebsd-jail.html
And this one - http://www.inmethod.com/forum/posts/list/1778.page
Regards
R