AirVideo Server for iPhone/iPad- a "how-to"


Recommended Posts

Click on the button to Install AirVideo  (It will take 5 minutes or more to compile.  On my 2 core 2.6GHz Celeron MB it took a bit over 10 minutes.)

Once the browser returns, wait a minute for the AirVideo server to start and then give it a try.

(You can re-start the unRAID server here if you stopped it earlier)

If AirVideo works as desired, press the button to Re-install on re-boot.

 

If Re-install on re-boot is selected, will it have to recomplie it everytime, or will it load quickly?

It'll load quickly. The compile is done once only.

Link to comment
  • Replies 333
  • Created
  • Last Reply

Top Posters In This Topic

Just to keep you on your toes....

 

I just updated the AirVideo package to install the Java Run-Time Environment as part of its installation.  This will eliminate the need to install the Java Run-Time as a separate package. 

 

This should eliminate the issue I described in the previous post where if the JRE was not installed the AirVideo install would abort.

 

So, click on the "Check for Updates" once more.   ;D

 

Oh yes, one more thing.   Once you successfully compile ffmpeg you no longer need to install the gcc compiler.  (or at least that step of compiling will not be needed again)

 

Another note.  On my server it takes nearly 10 minutes to compile ffmpeg.  (When I click on the "Install AirVideo" button it does not return for about 10 minutes.   Be patient.  Compiling takes a while., eventually the package manager will return the results to the browser.)  Once ffmpeg is compiled subsequent installations will be much faster.

 

Joe L.

 

Just to clarify. I'm loading the JRE as a separate package through unMenu. So should I uninstall the JRE through unMenu and then reinstall this or it will figure it out if I already have JRE installed?

Link to comment

Spaces should work fine.

In the example above for "TV Shows" it would be specified like so:

"TV Shows:/mnt/user/TV\ Shows"

 

I'm trying to share 4 folders but only two are showing up.  I have Movies and TV Shows showing up but not Home Movies or Music, any idea?

 

Movies:/mnt/user/Movies,TV Shows:/mnt/user/TV Shows,Home Movies:/mnt/user/Home Movies,Music:/mnt/user/Music

Link to comment

Spaces should work fine.

In the example above for "TV Shows" it would be specified like so:

"TV Shows:/mnt/user/TV\ Shows"

 

I'm trying to share 4 folders but only two are showing up.  I have Movies and TV Shows showing up but not Home Movies or Music, any idea?

 

Movies:/mnt/user/Movies,TV Shows:/mnt/user/TV Shows,Home Movies:/mnt/user/Home Movies,Music:/mnt/user/Music

I only have 1 folder shared and I'm not near my machine to try...but wouldn't it be something like this according to the OP?

 

Movies:/mnt/user/Movies,TV Shows:/mnt/user/TV\ Shows,Home Movies:/mnt/user/Home\ Movies,Music:/mnt/user/Music

 

ie, Not sure if you need to put in the backslash...maybe that is what is fouling it up?

Link to comment

Spaces should work fine.

In the example above for "TV Shows" it would be specified like so:

"TV Shows:/mnt/user/TV\ Shows"

 

I'm trying to share 4 folders but only two are showing up.  I have Movies and TV Shows showing up but not Home Movies or Music, any idea?

 

Movies:/mnt/user/Movies,TV Shows:/mnt/user/TV Shows,Home Movies:/mnt/user/Home Movies,Music:/mnt/user/Music

 

The "TV Shows" and Home Movies" need to be specified differently.  They need to look like:

 

"TV Shows:/mnt/user/TV\ Shows,Home Movies:/mnt/user/Home\ Movies"

 

The way spaces are handled in the path (/mnt/user/TV\ Shows) you need the extra slash in the path.

Link to comment

Movies and TV Shows show up fine, it's Home Movies and Music NOT showing up.

 

I even tried this

Movies:/mnt/user/Movies,TV Shows:/mnt/user/TV\ Shows,Home Movies:/mnt/user/Home\ Movies,Music:/mnt/user/Music

 

EDIT......I had to stop and start air video and it is working now.

 

 

Thanks

 

The reason the last two were not showing up was because of the path error in "TV Shows". It caused a ripple effect that made reading the last two impossible.

Link to comment

Just to clarify. I'm loading the JRE as a separate package through unMenu. So should I uninstall the JRE through unMenu and then reinstall this or it will figure it out if I already have JRE installed?

If you are using the newest airvideo.conf file I uploaded last night it is not necessary to load JRE through unMENU as a separate package. 

 

It does no harm if you are installing it, but it is no longer needed as a separate step, as installing AirVideo will install it too at the right time.  Yes, re-install using the newest AirVideo.conf file, otherwise it will not install and start on reboot as it is supposed to.

 

As you said, You can disable the Re-Install on Re-Boot of the Java Run-Time package, and leave only the re-install on re-boot of the AirVideo package.

Link to comment

Now can I set this up so it works outside my network?

Yes, if you know how to punch a hole through your firewall or router. If you're getting a NAT address from your ISP, you'll probably also need to do dynamic DNS on top of that.

AND you'll need a good password, since the example is 5 digits, and since computers are REALLY good at trying every combination of 5 digits.  If they try 10 a second, it is only 2.77 hours before all combinations are tried, and the bad-guys get in.
Link to comment

 

Thanks Joe!

 

Do we have a step by step installation now that is up to date with all Joe L's contributions?  

 

 

 

Just to keep you on your toes....

 

I just updated the AirVideo package to install the Java Run-Time Environment as part of its installation.  This will eliminate the need to install the Java Run-Time as a separate package.  

 

This should eliminate the issue I described in the previous post where if the JRE was not installed the AirVideo install would abort.

 

So, click on the "Check for Updates" once more.   ;D

 

Oh yes, one more thing.   Once you successfully compile ffmpeg you no longer need to install the gcc compiler.  (or at least that step of compiling will not be needed again)

 

Another note.  On my server it takes nearly 10 minutes to compile ffmpeg.  (When I click on the "Install AirVideo" button it does not return for about 10 minutes.   Be patient.  Compiling takes a while., eventually the package manager will return the results to the browser.)  Once ffmpeg is compiled subsequent installations will be much faster.

 

Joe L.

That is easy...

 

install unMENU.

If you less than 1GB of RAM, stop the unRAID server.  This will free up the ram used by user-shares and if you do run out, you'll not be faced with a full parity check if you have to reboot.

Go to the Package-Manager

Click on the "gcc" compiler package.

Click on the button to download it.  Click on the button to Install it.

Click on the button to Show All Packages.

If running an early version of unRAID you'll also need to download and install the pbzip2 package.  

Click on the "pbzip2" package.

Click on the button to download it.  Click on the button to Install it.

Click on the button to Show All Packages.

Click on the AirVideo package.

Click on the button to Download the files affiliated with AirVideo

Edit the configuration fields on the AirVideo package to specify the folders you wish shared and the "password"

Save the edited values

Click on the button to Install AirVideo  (It will take 5 minutes or more to compile.  On my 2 core 2.6GHz Celeron MB it took a bit over 10 minutes.)

Once the browser returns, wait a minute for the AirVideo server to start and then give it a try.

(You can re-start the unRAID server here if you stopped it earlier)

If AirVideo works as desired, press the button to Re-install on re-boot.

 

Joe L.

Link to comment

The Start AirVideo and Stop AirVideo user scripts don't seem to be working for me.

 

Here's stop:

av_pid=$(ps -ef | grep AirVideo | grep -v grep | awk '{print$2}');

ps -ef | grep AirVideo | grep -v grep | awk '{print$2}'

++++ ps -ef

++++ awk '{print$2}'

++++ grep AirVideo

++++ grep -v grep

+++ av_pid='22899

23283

23284'

test "$av_pid" != "" && kill -0 $av_pid && kill $av_pid

+++ test '22899

23283

23284' '!=' ''

+++ kill -0 22899 23283 23284

./41-unmenu_user_script_stop_airvideo: line 8: kill: (23284) - No such process

+++ kill 22899 23283 23284

Link to comment

The Start AirVideo and Stop AirVideo user scripts don't seem to be working for me.

 

Here's stop:

av_pid=$(ps -ef | grep AirVideo | grep -v grep | awk '{print$2}');

ps -ef | grep AirVideo | grep -v grep | awk '{print$2}'

++++ ps -ef

++++ awk '{print$2}'

++++ grep AirVideo

++++ grep -v grep

+++ av_pid='22899

23283

23284'

test "$av_pid" != "" && kill -0 $av_pid && kill $av_pid

+++ test '22899

23283

23284' '!=' ''

+++ kill -0 22899 23283 23284

./41-unmenu_user_script_stop_airvideo: line 8: kill: (23284) - No such process

+++ kill 22899 23283 23284

Looks to me like there were three processes running.  I did not  expect that. I guess you can change the line to be

test "$av_pid" != "" && kill $av_pid

Link to comment

So I'm still unable to get AirVideo to work via unMenu :(, and I think I'm close to tracking down a culprit.  Unfortunately, I'm way out of my league here since I don't know how these things work...  unRAID's my first foray into Linux, so any help would be much appreciated.

 

I have ps3 media server installed and running via my go script.  And it appears that after starting via the PMS.sh command, nothing else runs (since it appears to take over the entire screen, at least when I connect my monitor to the server).  I think air-video-server is running into this process.

 

Does this make sense?  Is something like this possible?

 

If so, would it be solvable by using something like adding > /dev/null 2>&1 (which appears to send all output to a "black hole") after the PMS.sh command?

 

Or would it require something like GNU Screen (which is also available from unMenu and from the brief descriptions seems like it'll solve my problems) to "split" the ps3 media server process onto another screen?

 

thx!

Link to comment

Here's my go:

 

note, I've already moved it to be the last command, since avahi wasn't starting.  I also commented out my custom install of air-video since I'm trying to get the unmenu version to work.  (my custom wasn't starting, and I'm thinking it was b/c of ps3 media server process)

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c 

/boot/unmenu/uu

# PS3 Media Server
cd /boot/custom/pms/mencoder
installpkg *.txz
installpkg *.tgz

# Start AirVideo Server
#installpkg /boot/packages/faac-1.26-i486-1gds.tgz
#installpkg /boot/packages/faad2-2.6.1-i486-2gds.tgz
#installpkg /boot/packages/git-core-0.99.6-i486-1mik.tgz
#installpkg /boot/packages/jam-2.5-i486-2gal.tgz
#installpkg /boot/packages/lame-3.98.2-i486-1gds.tgz
#installpkg /boot/packages/mpeg4ip-1.5.0.1-i486-1ahl.tgz
#installpkg /boot/packages/pbzip2-1.0.4-i486-1mac.tgz
#installpkg /boot/packages/xvidcore-1.2.1-i486-1sl.tgz
#installpkg /boot/packages/yasm-0.7.2-i486-1sl.tgz
#installpkg /boot/packages/x264-20100425-i486-1alien.tgz
#installpkg /boot/packages/libX11-1.1.5-i486-1.tgz
#installpkg /boot/packages/libxcb-1.0-i486-1ced.tgz
#installpkg /boot/packages/libXau-1.0.4-i486-1.tgz
#installpkg /boot/custom/airvideo/unmenu_packages/*.txz
#cd /boot/custom/airvideo
#bash air-video-server.sh test.properties

# Start Avahi
echo "Installing Avahi dependencies..."
installpkg /boot/packages/libcap-2.14-i486-1.tgz
installpkg /boot/packages/dbus-1.2.6-i486-1.tgz
installpkg /boot/packages/gcc-4.2.4-i486-1.tgz
installpkg /boot/packages/avahi-0.6.25-i486-1as.tgz

echo "Starting Avahi daemon..."
cp /boot/custom/avahi/multi.service /etc/avahi/services
/usr/bin/dbus-daemon --system
/etc/rc.d/rc.avahidaemon restart

# Start PS3 Media Server
cd /boot/custom/pms
./PMS.sh

 

and my PMS.sh script:


#!/bin/sh

DIRNAME=`dirname $0`
JAVA_HOME=/usr/lib/java

# OS specific support (must be 'true' or 'false').
cygwin=false;
case "`uname`" in
CYGWIN*)
cygwin=true
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$PMS_HOME" ] &&
PMS_HOME=`cygpath --unix "$PMS_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Setup PMS_HOME
if [ "x$PMS_HOME" = "x" ]; then
PMS_HOME=`cd $DIRNAME/; pwd`
fi
export PMS_HOME

# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
	JAVA="$JAVA_HOME/bin/java"
else
	JAVA="java"
fi
fi

# Setup the classpath
PMS_JAR="$PMS_HOME/pms.jar"

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
PMS_HOME=`cygpath --path --windows "$PMS_HOME"`
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
PMS_CLASSPATH=`cygpath --path --windows "$PMS_CLASSPATH"`
fi

# Execute the JVM
exec "$JAVA" $JAVA_OPTS -Xmx768M -Djava.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -jar "$PMS_JAR" "$@"

 

I'll try appending the "&" to my go script...

Link to comment

So, I have to report some good and bad news.  Unfortunately, adding the "&" didn't help me with my unMenu install of air-video-server.  But since I had a semi-working instance via my manual/custom/hybrid install, I decided to switch back to it and give it another try :(

 

Good news is that with the "&" now added to the PMS.sh start command, things have been working like a charm, even after reboots!  Oh well, thanks for everyone's help with this...  I'm definitely learning a lot about linux and command lines from you guys and I really appreciate your efforts and patience with this newbie! :)

 

Link to comment

The Start AirVideo and Stop AirVideo user scripts don't seem to be working for me.

 

Here's stop:

av_pid=$(ps -ef | grep AirVideo | grep -v grep | awk '{print$2}');

ps -ef | grep AirVideo | grep -v grep | awk '{print$2}'

++++ ps -ef

++++ awk '{print$2}'

++++ grep AirVideo

++++ grep -v grep

+++ av_pid='22899

23283

23284'

test "$av_pid" != "" && kill -0 $av_pid && kill $av_pid

+++ test '22899

23283

23284' '!=' ''

+++ kill -0 22899 23283 23284

./41-unmenu_user_script_stop_airvideo: line 8: kill: (23284) - No such process

+++ kill 22899 23283 23284

Looks to me like there were three processes running.   I did not  expect that. I guess you can change the line to be

test "$av_pid" != "" && kill $av_pid

 

While 3 processes might be a bit much, I have seen a couple of processes running for me. Will this be included in a future update or do I need to change it myself?

Link to comment

The Start AirVideo and Stop AirVideo user scripts don't seem to be working for me.

 

Here's stop:

av_pid=$(ps -ef | grep AirVideo | grep -v grep | awk '{print$2}');

ps -ef | grep AirVideo | grep -v grep | awk '{print$2}'

++++ ps -ef

++++ awk '{print$2}'

++++ grep AirVideo

++++ grep -v grep

+++ av_pid='22899

23283

23284'

test "$av_pid" != "" && kill -0 $av_pid && kill $av_pid

+++ test '22899

23283

23284' '!=' ''

+++ kill -0 22899 23283 23284

./41-unmenu_user_script_stop_airvideo: line 8: kill: (23284) - No such process

+++ kill 22899 23283 23284

Looks to me like there were three processes running.   I did not  expect that. I guess you can change the line to be

test "$av_pid" != "" && kill $av_pid

 

While 3 processes might be a bit much, I have seen a couple of processes running for me. Will this be included in a future update or do I need to change it myself?

I can fix it in a future release of the unMENU package. 
Link to comment

The Start AirVideo and Stop AirVideo user scripts don't seem to be working for me.

 

Here's stop:

av_pid=$(ps -ef | grep AirVideo | grep -v grep | awk '{print$2}');

ps -ef | grep AirVideo | grep -v grep | awk '{print$2}'

++++ ps -ef

++++ awk '{print$2}'

++++ grep AirVideo

++++ grep -v grep

+++ av_pid='22899

23283

23284'

test "$av_pid" != "" && kill -0 $av_pid && kill $av_pid

+++ test '22899

23283

23284' '!=' ''

+++ kill -0 22899 23283 23284

./41-unmenu_user_script_stop_airvideo: line 8: kill: (23284) - No such process

+++ kill 22899 23283 23284

Looks to me like there were three processes running.   I did not  expect that. I guess you can change the line to be

test "$av_pid" != "" && kill $av_pid

 

While 3 processes might be a bit much, I have seen a couple of processes running for me. Will this be included in a future update or do I need to change it myself?

I can fix it in a future release of the unMENU package. 

It is now fixed and uploaded to code.google.com.  You can get the updated .conf file by using the "Check for Updates" button on the user-scripts page.  You'll need to reset the configuration variables.  When you go to re-install it, it will skip the ffmpeg compile step since it is already compiled.  (no need to re-install the gcc compiler)
Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.