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


Recommended Posts

Hmmm...  I wonder if it's because the server is still running via unMenu.  Can you stop the server via the button in user scripts section and then switch to terminal and try to start it via the terminal again?

 

FYI, here's a sample of the first few lines of the debug output from my server starting and trying to generate a thumbnail

 

root@AJs_Unraid:~# cd /boot/custom/airvideo/
root@AJs_Unraid:/boot/custom/airvideo# bash air-video-server.sh test.properties
DEBUG: SnapshotCache: Initializing Thumbnail Cache; Java Version: 1.6.0_11
DEBUG: SnapshotCache: Created new Snapshot Index BTree2010-08-03 22:01:22.154::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2010-08-03 22:01:22.191::INFO:  jetty-6.1.x
2010-08-03 22:01:22.221::INFO:  Started [email protected]:45631
DEBUG: PortMapperAction: Scheduling task PortMapperAction$2 (3346521)
/boot/packages/ffmpeg/ffmpeg -ss 900.0 -vframes 1 -i "/mnt/user/Matrix/Movies/300 [2006].avi" -f mjpeg -
DEBUG: Thumbnail: >>
347974746F346B7A78707A7C7E68347D7D766B7E7C347D7D766B7E7C3B3668683B222B2B352B3B366D7D697A767E683B2A3B36723B393476756F346E
687E6934567A6F6972633456746D727E6834282B2B3B40292B2B2D46357A6D72393B367D3B76716B7E7C3B36
<<

I wasn't getting any additional output. I'll try that tonight and see what happens :).

Link to comment
  • Replies 333
  • Created
  • Last Reply

Top Posters In This Topic

I think I found either a or the bug that causes the "unknown error" to appear and the inability to create thumbnails or watch video's. There's a line in the package that creates the path for ffmpeg, but there's an error in the path so the line is ommited.

 

Original:

 

PACKAGE_INSTALLATION echo "path.ffmpeg = "${PACKAGE_DIRECTORY}"/ffmpeg/ffmpeg" >> /test.properties

 

Should be:

 

PACKAGE_INSTALLATION echo "path.ffmpeg = ${PACKAGE_DIRECTORY}/ffmpeg/ffmpeg" >> "${PACKAGE_DIRECTORY}"/test.properties

 

Link to comment

I think I found either a or the bug that causes the "unknown error" to appear and the inability to create thumbnails or watch video's. There's a line in the package that creates the path for ffmpeg, but there's an error in the path so the line is ommited.

 

Original:

 

PACKAGE_INSTALLATION echo "path.ffmpeg = "${PACKAGE_DIRECTORY}"/ffmpeg/ffmpeg" >> /test.properties

 

Should be:

 

PACKAGE_INSTALLATION echo "path.ffmpeg = ${PACKAGE_DIRECTORY}/ffmpeg/ffmpeg" >> "${PACKAGE_DIRECTORY}"/test.properties

 

Good catch.  I've fixed it in my .conf file here.  Just noticed I never include the AirVideo package as part of those distributed by unMENU's update process.

 

Do you think it is ready for mass distribution? 

Did the missing libraries problem get resolved? 

Is is possible that a library installed for the compiler is needed by ffmpeg, and that if you do not re-install the compiler then ffmpeg does not work after you reboot?

 

Let me know what you find.

 

Joe L.

Link to comment

Thank you!!! I made the change dlmh suggested. Deleted the ffmpeg directory and had to manually recompile with the directions that Joe L. suggested but once I reinstalled with that it is working now! I do have some videos that the thumbnail isn't working for but I do suspect the codecs there. Everything else seems to work.

 

I'd say its good to go with one question. Does it make sense to just not include the 3 commands that you suggested regardless of memory size? ie, You mentioned it should only be needed for low memory conditions. I have 4GB RAM and shouldn't have needed it...but I did. What I'm asking is this, does it hurt anything to make everyone issue this command? If it doesn't hurt anything I'd make that the default just to keep someone else from tripping into it.

 

Link to comment

Thank you!!! I made the change dlmh suggested. Deleted the ffmpeg directory and had to manually recompile with the directions that Joe L. suggested but once I reinstalled with that it is working now! I do have some videos that the thumbnail isn't working for but I do suspect the codecs there. Everything else seems to work.

 

I'd say its good to go with one question. Does it make sense to just not include the 3 commands that you suggested regardless of memory size? ie, You mentioned it should only be needed for low memory conditions. I have 4GB RAM and shouldn't have needed it...but I did. What I'm asking is this, does it hurt anything to make everyone issue this command? If it doesn't hurt anything I'd make that the default just to keep someone else from tripping into it.

 

Good point.  If the buffer cache is hoarding the memory, we need to free it.  It really does no harm, other than the next time you do a directory listing it will spin up a disk if it is not already spinning.

 

Joe L.

Link to comment

 

Do you think it is ready for mass distribution? 

Did the missing libraries problem get resolved? 

Is is possible that a library installed for the compiler is needed by ffmpeg, and that if you do not re-install the compiler then ffmpeg does not work after you reboot?

 

Let me know what you find.

 

Joe L.

 

Hey Joe, I'm ready to test this out and install once you add it to unmenu.  Just let me know what i need to install if anything beside the package in unmenu

Link to comment

 

Do you think it is ready for mass distribution?   

Did the missing libraries problem get resolved?   

Is is possible that a library installed for the compiler is needed by ffmpeg, and that if you do not re-install the compiler then ffmpeg does not work after you reboot?

 

Let me know what you find.

 

Joe L.

 

Hey Joe, I'm ready to test this out and install once you add it to unmenu.  Just let me know what i need to install if anything beside the package in unmenu

The airvideo package is now added to unMENU.  Give it a try.  Use the "Check-for-updates" button on the user-scripts page.

 

The AirVideo package will prompt you if a package it needs for compiling is not installed.  Just install what it is dependent upon and then try the install once more.

 

(Basically, it will need the "gcc" compiler package, and possible the pbzip2 package.)  Do NOT install the Java RTE until after you compile, but it should prompt you for that too.

 

Joe L.

 

Link to comment

I've also installed via unmenu, restarting unmenu, and even restarting my server, and now I get no response from my ipad or iphone/ipods.  fyi, after restart, unmenu told me that it wasn't installed (even though I'm positive i selected to re-install upon reboot).  clicking to install refreshed the page, and said that it would be re-installed on re-boot without me having to click the button again.

 

btw, on a configuration note, does the user editable config support folders with spaces in their names?

 

e.g., I'm wanting to add:

 

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

 

Link to comment

I used the update function and it found a few packages, updated, installed and restarted like normal, but it doesn't seem to want to update my airvideo conf file. I've tried it a few times, started/stopped airvideo if that mattered as well while I updated.

It seems to have been coded to write the configuration stuff to a file named test.properties.  To get it to re-install, press the "Edit config" button and then save without changing anything.  That will enable a Re-Install with new values button.  You must then press it.

 

Joe L.

Link to comment

I've also installed via unmenu, restarting unmenu, and even restarting my server, and now I get no response from my ipad or iphone/ipods.  fyi, after restart, unmenu told me that it wasn't installed (even though I'm positive i selected to re-install upon reboot).  clicking to install refreshed the page, and said that it would be re-installed on re-boot without me having to click the button again.

 

btw, on a configuration note, does the user editable config support folders with spaces in their names?

 

e.g., I'm wanting to add:

 

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

 

I have no clue about the supported folder names, as I do not own an ipad or iphone, or use AirVideo. 

 

As far as no response... Did you re-install the Java-Run-Time Environment?  It is needed for the connection to the ipad/pod

 

Joe L. 

Link to comment

I've also installed via unmenu, restarting unmenu, and even restarting my server, and now I get no response from my ipad or iphone/ipods.  fyi, after restart, unmenu told me that it wasn't installed (even though I'm positive i selected to re-install upon reboot).  clicking to install refreshed the page, and said that it would be re-installed on re-boot without me having to click the button again.

 

btw, on a configuration note, does the user editable config support folders with spaces in their names?

 

e.g., I'm wanting to add:

 

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

 

One last thing.  I updated the package file after uploading it to google.code.  You might want to check for updates once more.  The first version I uploaded would not compile ffmpeg. (I has set the limit on virtual memory used during the compile too low)
Link to comment

I've also installed via unmenu, restarting unmenu, and even restarting my server, and now I get no response from my ipad or iphone/ipods.  fyi, after restart, unmenu told me that it wasn't installed (even though I'm positive i selected to re-install upon reboot).  clicking to install refreshed the page, and said that it would be re-installed on re-boot without me having to click the button again.

 

btw, on a configuration note, does the user editable config support folders with spaces in their names?

 

e.g., I'm wanting to add:

 

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

 

I have to start air video with one of the buttons in unMenu. I don't think it starts automatically for me. If you go into the ps info does it show it running?

Link to comment

it didn't restart for me either and now I see it didn't reinstall, I followed the instructions about about editing and saving it with no changes.  Do I need to have the GCC thing install on reboot also?

No.

 

If you type

/boot/packages/ffmpeg/ffmpeg -version

What do you see?

 

If you type

/usr/lib/jre1.6.0_11/bin/java -version

what do you see?

 

I think the issue is that the AirVideo package is aborting the installation because the java runtime is not installed.  But... the java run-time alphabetically comes after AirVideo, so it gets installed second.

 

The fix is not too hard, but for now, you'll just need to manually install the AirVideo package, then the Java Run-time, then the AirVideo package once more.    The auto-install will not work with these two lines in the package.conf file

PACKAGE_INSTALLATION test ! -f /usr/lib/java/bin/java && echo "Java runtime-environment has not been installed.  Please install it before continuing
PACKAGE_INSTALLATION test ! -f /usr/lib/java/bin/java && exit

 

Once you've successfully compiled ffmpeg, and it responds with version information when given the command listed above, you can put THEN these three lines in your "go" script

/boot/packages/jre-6u11-i586-1.tgz.manual_install

/boot/packages/AirVideoServerLinux.jar.manual_install

/boot/unmenu/41-unmenu_user_script_start_airvideo

With them in place, you do not need to enable the Auto-Install on Re-Boot, since it will be performed by the commands in the "go" script.

 

 

 

The auto_install will not work as coded with the names of the files used and the dependencies.

 

Joe L.

Link to comment

here is what it says

root@Tower:~# /boot/packages/ffmpeg/ffmpeg -version
FFmpeg version UNKNOWN, Copyright (c) 2000-2010 Fabrice Bellard, et al.
 built on Aug 17 2010 23:04:49 with gcc 4.2.4
 configuration: --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-x11grab --disable-shared --enable-static --disable-decoder=aac
 libavutil     50. 8. 0 / 50. 8. 0
 libavcodec    52.52. 0 / 52.52. 0
 libavformat   52.50. 0 / 52.50. 0
 libavdevice   52. 2. 0 / 52. 2. 0
 libswscale     0.10. 0 /  0.10. 0
 libpostproc   51. 2. 0 / 51. 2. 0
FFmpeg UNKNOWN
libavutil     50. 8. 0 / 50. 8. 0
libavcodec    52.52. 0 / 52.52. 0
libavformat   52.50. 0 / 52.50. 0
libavdevice   52. 2. 0 / 52. 2. 0
libswscale     0.10. 0 /  0.10. 0
libpostproc   51. 2. 0 / 51. 2. 0
root@Tower:~# /usr/lib/jre1.6.0_11/bin/java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
root@Tower:~# 

 

So now I should copy those 3 lines to my go script?  Can I just put them at the bottom?

 

Also how can use this outside my own home network?

 

Link to comment

I used the update function and it found a few packages, updated, installed and restarted like normal, but it doesn't seem to want to update my airvideo conf file. I've tried it a few times, started/stopped airvideo if that mattered as well while I updated.

It seems to have been coded to write the configuration stuff to a file named test.properties.  To get it to re-install, press the "Edit config" button and then save without changing anything.  That will enable a Re-Install with new values button.  You must then press it.

 

Joe L.

 

Sorry I wasn't clear. It wouldn't update the unMenu files. I click on check for unmenu updates and it kept finding the air-menu package. I just it again today and it seems to work just fine so maybe it didn't like me yesterday for some reason :).

Link to comment

I used the update function and it found a few packages, updated, installed and restarted like normal, but it doesn't seem to want to update my airvideo conf file. I've tried it a few times, started/stopped airvideo if that mattered as well while I updated.

It seems to have been coded to write the configuration stuff to a file named test.properties.  To get it to re-install, press the "Edit config" button and then save without changing anything.  That will enable a Re-Install with new values button.  You must then press it.

 

Joe L.

 

Sorry I wasn't clear. It wouldn't update the unMenu files. I click on check for unmenu updates and it kept finding the air-menu package. I just it again today and it seems to work just fine so maybe it didn't like me yesterday for some reason :).

After you "Check for Updates" a second button will appear the "Install Updates" if there are any are present.

 

Joe L.

Link to comment

I used the update function and it found a few packages, updated, installed and restarted like normal, but it doesn't seem to want to update my airvideo conf file. I've tried it a few times, started/stopped airvideo if that mattered as well while I updated.

It seems to have been coded to write the configuration stuff to a file named test.properties.  To get it to re-install, press the "Edit config" button and then save without changing anything.  That will enable a Re-Install with new values button.  You must then press it.

 

Joe L.

 

 

Sorry I wasn't clear. It wouldn't update the unMenu files. I click on check for unmenu updates and it kept finding the air-menu package. I just it again today and it seems to work just fine so maybe it didn't like me yesterday for some reason :).

After you "Check for Updates" a second button will appear the "Install Updates" if there are any are present.

 

Joe L.

Did that multiple times, restarted it a few times, etc. Air kept popping up. Worked just fine today so no idea what was goofy for me.

Link to comment

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.

Link to comment

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.

Link to comment

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

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?

Link to comment

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.