Pre-built Air Video Jail for FreeNAS 8.0.4

Status
Not open for further replies.

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
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Richard,

Thanks for the props, nice job! Next you'll have to follow my tutorial for creating a plugin.... that's after I figure it out myself!

Cheers,

-- Proto
 

Richard Shaw

Cadet
Joined
Mar 13, 2012
Messages
3
My pleasure, your guide was essential, i'd have driven myself mad without it as a basis.

I'm just starting to look at moving mine into a plugin, how have you got on?

BTW, loads of great content on your site, have you thought about doing a FreeNAS cookbook?

Regards

R


Richard,

Thanks for the props, nice job! Next you'll have to follow my tutorial for creating a plugin.... that's after I figure it out myself!

Cheers,

-- Proto
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I've had to postpone work on the Serviio plugin because there were too many problems with 8.2 beta-2. The Plugin Jail for 8.2 is really quite nice as well as the ability to open a shell from the GUI, it saves having to do a lot of the configuration of creating the jail. It would be nice if the GUI would let you install multiple jails. It's also nice because you're not required to have a plugin, you can just jexec into the plugin jail and install packages like you would in FreeBSD.

Trying to create a plugin, especially if the app you want to create one for doesn't have a port is a bit challenging, but not any worse than what you went through to create your pre-packaged jail. The documentation is a good start, but there some details left to the imagination.

A cookbook sounds like a great idea, I have thought about it a little, it could be fun. I have so many topics drafted to post, but I like to go through thing to verify the details before I post and it's pretty time consuming. I'll probably make some more videos once 8.2 is ironed out.

Cheers!
 

bajan_on_ice

Cadet
Joined
Jun 23, 2012
Messages
6
I was trying to build AirVideo by hand in a 8.2Beta4 install inside the jail, but I was having issues with live conversion. Any clues/RTFMs for installing this prebuilt jail on 8.2B4? Or will it work with minimal massaging?

-chris
 

thunder

Cadet
Joined
Jun 28, 2012
Messages
4
How did you add the jail on 8.2? Can it coexist with other plugin jails?
 

TXvsCA

Cadet
Joined
Sep 25, 2012
Messages
1
Looks like the dropbox link is no longer available. Does anyone have a working download link for this? Interested to try it out. Thx!
 

Gusmax

Cadet
Joined
May 15, 2013
Messages
6
Hi,

I work quite a lot with AirVideo but on Mac. This is a perfect piece of software. To get this running on FreeNAS would be exactly the piece that would fill the gap I still have. Can you update/repost the link and a status on the project?

Cheers, Thomas
 
Status
Not open for further replies.
Top