How to install Subsonic on a first generation Apple TV

Tutorials, tips and tricks.

Moderator: moderators

How to install Subsonic on a first generation Apple TV

Postby ok » Sun May 29, 2011 1:32 pm

Installing Subsonic on an Apple TV

Note: I now have solutions available for the the lame binary and boot on startup issues that I initially ran into (look three replies down):

1) Upgrade Apple TV to v3.0.2

2) Use patchstick to enable SSH - see http://code.google.com/p/atvusb-creator/

3) Login to your Apple TV using ssh (I used WinSCP, but there are lots of options out there)

4) (Optional) update if you'd rather not have to enter the password 'frontrow' when you run sudo

Code: Select all
sudo -s
echo -e '%frontrow ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers


5) Enable kext loading - from http://www.megacz.com/thoughts/appletv.html

Code: Select all
sudo bash
cd /tmp
wget http://nitosoft.com/nitoTVInstaller_tt.zip
unzip nitoTVInstaller_tt.zip
cd 'nitoTV Take Three/'
./installme


6) When Apple TV interface restarts, go to the “nitotv” menu and choose Settings, Install Software, Smart Installer.

Note: The smart installer puts kextstat in the wrong place, so run:

Code: Select all
sudo ln -s /usr/bin/kextstat /usr/sbin/kextstat


7) Install Java - adapted from http://wiki.awkwardtv.org/wiki/Install_Java

a) copy java directory (i.e. 'soylatte16-i386-1.0.3') to an intermediate location (i.e. '/tmp')

Code: Select all
sudo -s
mkdir -p /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
mkdir -p /Library/Frameworks/JavaVM.framework/Versions/1.6
mkdir -p /Library/Frameworks/JavaVM.framework/Home
ln -sf /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0 /Library/Frameworks/JavaVM.framework/Versions/1.6
 
cd /tmp
cp -Rp soylatte16-i386-1.0.3/* /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
 
chmod -R 755 /System/Library/Frameworks/JavaVM.framework
chown -R root:wheel /System/Library/Frameworks/JavaVM.framework
 
echo "export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home" >> ~/.profile
echo "export PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin:$PATH" >> ~/.profile
reboot


8 ) (Optional) Samba Mounts - see http://wiki.awkwardtv.org/wiki/Mount_a_ ... _via_SMBFS - I went the NitoTV route, which worked great for me

9) Install Subsonic - from http://forum.subsonic.org/forum/viewtopic.php?p=19184

Note: I chose to setup Subsonic using the 'frontrow' user (may not be the best approach)

Code: Select all
cd
mkdir subsonic
cd subsonic


I then used WinSCP to copy the Subsonic files to the '/mnt/Scratch/Users/frontrow/subsonic' directory

Get the standalone version from http://www.subsonic.org, and unzip it into the subsonic directory

Edit the 'subsonic.sh' file

1) set SUBSONIC_HOME=/mnt/Scratch/Users/frontrow/subsonic
2) set SUBSONIC_MAX_MEMORY=160
3) update the subsonic-booter-jar-with-dependencies.jar starup line by adding ${SUBSONIC_HOME} to the path
a) i.e. -jar ${SUBSONIC_HOME}/subsonic-booter-jar-with-dependencies.jar > ${LOG} 2>&1 &

Code: Select all
chmod 744 subsonic*


I also had to run
Code: Select all
cp -p subsonic.war ..
(I'm probably doing somthing wrong here, but I moved the file one level down, because that was where it was looking for it)

to start, run
Code: Select all
./subsonic.sh


Cheers
Last edited by ok on Mon Jul 04, 2011 6:59 pm, edited 1 time in total.
ok
 
Posts: 14
Joined: Mon May 11, 2009 2:24 am

Help requested

Postby ok » Sun Jul 03, 2011 12:03 pm

Bump
ok
 
Posts: 14
Joined: Mon May 11, 2009 2:24 am

Postby dcuellar » Sun Jul 03, 2011 4:14 pm

This is awesome. I plan on getting an Apple TV soon!

Sorry, I am of no use to you with the development. Best of luck to you.
dcuellar
 
Posts: 97
Joined: Sat Feb 05, 2011 3:23 pm

Update: restarting subsonic on reboot now working

Postby ok » Sun Jul 03, 2011 10:13 pm

To enable restarting subsonic on Apple TV reboots

1) Connect to the Apple TV using (putty, etc.)
2) cd to "/etc"
3) Run the command "sudo nano rc.local"
4) Add the following lines to the bottom of the rc.local file (change path if you used a different path)

Code: Select all
# Start Subsonic
sleep 30
cd /mnt/Scratch/Users/frontrow/subsonic
sudo -u frontrow sh ./subsonic.sh


5) Save the rc.local file
6) Reboot your Apple TV

Note: Adding the "sleep 30" line will make your boot times 30 seconds longer. I might experiment with a shorter period of time (i.e. "sleep 15") in the future, but I don't really mind waiting 30 seconds longer for this Apple TV to boot. It's not one of my primary Apple TV's.

Note: Don't skip the "cd /mnt/Scratch/Users/frontrow/subsonic" line. I initially just had two lines. The first being the sleep line and the second was "sudo -u frontrow sh /mnt/Scratch/Users/frontrow/subsonic/subsonic.sh". This didn't work as it was unable to find the subsonic.war file.

Setting up transcoding capability with lame. (The key here is to find a version of lame that is compatible with the Apple TV)

1) Download "iTunes-LAME-2.0.9-34.zip" from http://download.cnet.com/iTunes-LAME-Encoder/3000-2140_4-22494.html
2) Unzip "iTunes-LAME-2.0.9-34.zip" and navigate to iTunes-LAME.app -> Contents -> Resources.
3) Grab the "lame" file from the above location
4) Use a scp tool (I used WinSCP) to copy the "lame" file to the "transcode" (create this directory if it doesn't already exist) directory (located under your subsonic directory).
5) Connect to the Apple TV using (putty, etc.)
6) cd to the "subsonic/transcode" directory
6) Run a chmod command (i.e. "chmod 755 lame") to make the file executable.
7) Now you're ready to use transcoding in Subsonic

Enjoy
ok
 
Posts: 14
Joined: Mon May 11, 2009 2:24 am

Re: How to install Subsonic on a first generation Apple TV

Postby CasN » Mon Aug 22, 2011 9:20 pm

Would this also work on the second generation appletv?
CasN
 
Posts: 35
Joined: Wed Jan 12, 2011 2:24 pm

Re: How to install Subsonic on a first generation Apple TV

Postby BKKKPewsey » Mon Aug 22, 2011 10:09 pm

No - there is no hard drive.
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: How to install Subsonic on a first generation Apple TV

Postby CasN » Tue Aug 23, 2011 10:34 am

That is where you are wrong, there is a hard disk :D . It is a 8GB solid state disk so should be enough room.
I already installed XBMC on it, now with the SubSonic plugin.
But would not mind running just Subsonic if posisble.
CasN
 
Posts: 35
Joined: Wed Jan 12, 2011 2:24 pm

Re: How to install Subsonic on a first generation Apple TV

Postby librainian » Tue Feb 14, 2012 1:21 am

@ok

This worked like a charm for the most part. Thanks for your detailed step by step. It was most helpful. I got it all working with the exception of the autostart. Still haven't been able to get it to load without SSH and running the script manually. It's like the load command in RC.local is simply ignored or the ATV version I have doesn't like it. I know that the RC.local file is being accessed because NitoTV has inserted some kext load commands there as well and they are working. Not sure what the issue is.

On a related note: the info on megacz.com was also useful. The part on installing NitoTV seems to work ok as well, but I was curious because the AwkwardTV wiki shows Take THree and for the ATV 2 only. Any thoughts there? Also, somehow when I installed NitoTV and ran the Perian installer it broke my AC3 audio passthrough on playing h264 videos. It's like the apple quicktime h264 component is hosed or non functional. I may have to do a factory restore and start all over but I thought I would run that by you in case you have a clue.

Thanks Again!
librainian
 
Posts: 23
Joined: Sat Feb 06, 2010 6:45 pm
Location: Portland, OR


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 7 guests