Composite

From AwkwardTV

Jump to: navigation, search

If you have a standard definition TV with a composite input, you CAN use the Apple TV, but only in black and white. Just simply connect a cable from the green (luma) component output to your yellow composite input and select 480i as the resolution for NTSC or 576i for PAL (or else it will flicker). To get color you can consider the converter at svideo.com or the hack below.

I mention this only for those folks (like me) who are waiting to receive their big beautiful flat-screen TV, but can't wait to try out their new Apple TV. Just recognize that this is not a long term solution - who wants to see their iPhoto collection in black and white? --A colorblind person you insensitive clod!  ;-)

It's also worth to note that there's another option to enable full color output from composite that doesn't require code, just some basic adapters (from Mauricio Pastrana, found by mistake but it works), here's the youtube video outlining the procedure: http://www.youtube.com/watch?v=eQNFCjKrVlc, and here's the TUAW entry, check the comments for photos and whatnot.

Sources: http://www.beutelevision.com/blog/apple-tv-on-sdtv-in.html, http://www.appletvhacks.net/?p=125


Contents

With NitoTV

Download the latest version of NitoTV for a Take 2 ATV (NitoTV_Take_2). Now install Turbo's Kext Installer. After that is done, install TvComposite and select your TV type. NTSC is for a 480i North American television and PAL is generally for a 576i European television. After that, go to Kernel Extension Manager and add Composite.kext to rc.local. This will make it load at startup. NOTE: We have fixed the bugs directly in nitoTV that always pointed towards NTSC, and now both tar files have been fixed in addition online (both tar files were identical for some reason) I also realized the original source page was no longer available so i zipped up the copies of the source i still had and posted those as well for anyone who wants to take a look at it here --Nito 03:59, 7 July 2009 (CEST)

Activating color composite output by software

Here is a script for getting color working on Apple TV v2.3. It assumes you have an NTSC television. If you have a PAL television then comment out the NTSC portion of the script. This may also work on 2.3.1, but I have not tried it yet. Before running this create ATV_Color and StartupParameters.plist from the directions below.

Set your Apple TV resolution to 480i. Then run this script.



#!/bin/sh
echo "Remounting filesystem read-write..."
sudo mount -uw /
echo "Downloading the TVComposite kernel extension..."
wget "http://nitosoft.com/awkward/tvcomposite_pal.tar"
tar xvf tvcomposite_pal.tar

# If you have a PAL television set instead of NTSC then comment the next 4 lines by placing a # at the beginning of the line.

echo "Downloading the NTSC bits..."
wget "http://nitosoft.com/awkward/tvcomposite_ntsc.zip"
unzip -o tvcomposite_ntsc.zip tvcomposite_ntsc/TVComposite
cp tvcomposite_ntsc/TVComposite TVComposite.kext/Contents/MacOS
rm -r tvcomposite_ntsc
sudo chmod -R 755 TVComposite.kext
sudo chown -R root:wheel TVComposite.kext
echo "Installing TVComposite into /System/Library/Extensions..."
sudo mv TVComposite.kext /System/Library/Extensions
echo "Downloading the turbo_atv_enabler..."
rm turbo_atv_enabler.bin*
wget http://0xfeedbeef.com/appletv/turbo_atv_enabler.bin
chmod u+x turbo_atv_enabler.bin
sudo rm -r /System/Library/StartupItems/ATV_Color
sudo mkdir /System/Library/StartupItems/ATV_Color
sudo touch /System/Library/StartupItems/ATV_Color/ATV_Color
sudo echo '#!/bin/sh
. /etc/rc.common
/Users/frontrow/turbo_atv_enabler.bin
kextload /System/Library/Extensions/TVComposite.kext' > /System/Library/StartupItems/ATV_Color/ATV_Color
sudo chmod +x /System/Library/StartupItems/ATV_Color/ATV_Color
sudo touch /System/Library/StartupItems/ATV_Color/StartupParameters.plist
sudo echo '{
Description     = "Load Composite Kext";
Provides        = ("Composite");
OrderPreference = "First";
}' > /System/Library/StartupItems/ATV_Color/StartupParameters.plist
sudo chown -R root:wheel /System/Library/StartupItems/ATV_Color/
rm -r TVComposite*
rm tvcomposite_ntsc*
echo "Enabling composite-colour mode..."
sudo ./turbo_atv_enabler.bin
sudo kextload /System/Library/Extensions/TVComposite.kext

If you just ran the script above and you didn't encounter any errors then you are done. Reboot and enjoy the color.

Note for 2.4 and 3.01 you may have to modify the above script slightly to avoid permission denied errors:

Instead of this line:

kextload /System/Library/Extensions/TVComposite.kext' > /System/Library/StartupItems/ATV_Color/ATV_Color

try substituting these two lines:

kextload /System/Library/Extensions/TVComposite.kext' > ATV_Color
sudo mv ATV_Color /System/Library/StartupItems/ATV_Color/

And again further down, instead of this line:

}' > /System/Library/StartupItems/ATV_Color/StartupParameters.plist

try substituting this:

}' > StartupParameters.plist
sudo mv StartupParameters.plist /System/Library/StartupItems/ATV_Color/


This method was orginally posted by loop in Awkwardtv Forum


1. Download tvcomposite_pal.tar . mirror NOTE: PAL mirror fixed properly, both tar's were NTSC version by accident, originally nitoTV pointed both towards the ntsc tar file, then after that bug was fixed it was pointed out to me that both the pal and ntsc versions were the same on our website this is now fixed. --Nito 03:53, 7 July 2009 (CEST)

2. Extract TVComposite.kext to your Apple TV (inside /Users/frontrow/)

sudo mount -uw /
sudo chmod -R 755 TVComposite.kext
sudo chown -R root:wheel TVComposite.kext
sudo mv TVComposite.kext /System/Library/Extensions/TVComposite.kext

3. If your TV is NTSC (US, 480i) download tvcomposite_ntsc.tar mirror extract it and copy the TVComposite file over the one included in the pal version (under TVComposite.kext/Contents/MacOS)

4. Download the turbo_atv_enabler from (http://0xfeedbeef.com/appletv/turbo_atv_enabler.bin) and save to /User/frontrow/bin/turbo_atv_enabler.bin, OR (easier) use NitoTV to enable kext loading

5. Set ATV to 480i (NTSC) or 576i (PAL)

6. Reboot ATV

sudo reboot

7. Turn the enabler and load your kext file

/Users/frontrow/bin/turbo_atv_enabler.bin
kextload /System/Library/Extensions/TVComposite.kext

8. Use one of the methods below to auto start your color hack when the apple tv is rebooted.

Autostart using an Application Menu Plugin

NOTE: Enabling TVComposite.kext via rc.local does not seem to work. Here is d_ced's solution using Applications Menu Plugin: Create a file called color.sh and put the 2 lines of code below in it, and save it as /Users/frontrow/Documents/color.sh

#!/bin/sh
echo "frontrow" | sudo /sbin/kextload -v /System/Library/Extensions/TVComposite.kext

Add an Application Menu Plugin item to /Users/frontrow/Documents/Applist.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Applications</key>
  <dict>
    <key>0</key>
    <dict>
      <key>args</key>
      <string></string>
      <key>remotewatcher</key>
      <true/>
      <key>fireandforget</key>
      <false/>
      <key>menu</key>
      <string>Color</string>
      <key>killfinder</key>
      <false/>
      <key>path</key>
      <string>/Users/frontrow/Documents/color.sh</string>
    </dict>
  </dict>
</dict>
</plist>

Alternatively using a StartupItem

(sudo password is "frontrow"):

sudo mkdir /System/Library/StartupItems/ATV_Color

Create a file called ATV_Color in /System/Library/StartupItems/ATV_Color:

sudo nano -w /System/Library/StartupItems/ATV_Color/ATV_Color

Enter the following lines:

#!/bin/sh
. /etc/rc.common
/Users/frontrow/turbo_atv_enabler.bin
kextload /System/Library/Extensions/TVComposite.kext

Make it executable :

sudo chmod +x /System/Library/StartupItems/ATV_Color/ATV_Color

Create a StartupParameters.plist:

sudo nano -w /System/Library/StartupItems/ATV_Color/StartupParameters.plist

Enter the following contents:

{
  Description     = "Load Composite Kext";
  Provides        = ("Composite");
  OrderPreference = "First";
}

Change ATV_Color directory owner :

sudo chown -R root:wheel /System/Library/StartupItems/ATV_Color/

That's it.

Adjusting to SDTV 4:3 Aspect Ratio

You can adjust the Apple TV to your screen's aspect ratio using displayutil by Jonathan Bringhurst. This hack only seems to work on Apple TV firmware 2.1 and earlier, a limited workaround is explained few lines down.

You can download displayutil from http://www.codecrazy.net/topic/software or http://www.versiontracker.com/dyn/moreinfo/macosx/32982 . The previous two links appear to be dead. A working location is http://mac.majorgeeks.com/download6271.html .

The following command will set up 640×480 SDTV resolution (NTSC). You can replace "640x480" with your screen's resolution (e.g. 800x600 which is close to PAL, 768x576 would be the correct PAL values, but don't work for everybody).

kill `ps awx | grep [F]inder | awk '{print $1}'`; sleep 1; ./displayutil -r640x480 -b32
Note: If you get a syntax error form aux you probably typed a
 ' 
instead of

Note: If you used displayutil (and restarted Finder), your color will be black/white again. You can reload the TVComposite.kext in this case:

sudo kextunload /System/Library/Extensions/TVComposite.kext
sudo kextload /System/Library/Extensions/TVComposite.kext

This solution was originally posted at AppleTVhacks.net

Adjusting to SDTV 4:3 on version 2.3.x Workaround

The above steps also work with version 2.3.1 but only when the Apple TV displays an application instead of the main menu. Foghorn provided the following modified script in the Discussion page. Run it via sudo while playing a song in Music > My Music > Shuffle Songs and it should do the trick.

#! /bin/sh
kill `ps awx | grep [F]inder | awk '{print $1}'`
sleep 5
# Changes the resolution
/Users/frontrow/displayutil -b 32 -r800x600
sleep 2
# Re-Enables the color output
/sbin/kextunload -q /System/Library/Extensions/TVComposite.kext
/sbin/kextload -q /System/Library/Extensions/TVComposite.kext

Note: If the color doesn't come back at all make sure that turbo_atv_enabler.bin has already been executed once prior to running this script

Note: If the color is greenish, unplug and replug the composite cable from the back of the ATV

Note: The 800x600 resolution exceeds the PAL size a bit but 720x576 doesn't seem to work with displayutil

Note: This still must run manually while in the right menu, any help making this possible at startup is much appreciated

Startup Screen Resolution Changer

The above screen changing script will not work on its own from init scripts.

Here is rst's solution for a StartupItem (install to /System/Library/StartupItems) using a perl based screen resolution changer which uses displayutil. Download it from screenrestar.gz

There are three things to notice:

1) It's a .tar.gz file, not a .gz file, so extract it with the following command

tar -xzf screenrestar.gz

If you want to do that on Apple TV, you have to copy gzip to it.

2) You have to setup correct permissions on files and folder using sudo chown root:wheel

3) Appletv has a watchdog, which restarts Finder when Finder crashes. But if finder crashes TOO quickly (faster than 1 second), it won't start it again. So, if you don't see any UI but apple on the screen, after applying this patch, change delay to something like a 1-2 seconds between calls of killfinder in the ResolutionChanger script.

Note: Not sure if you need such a startup script at all, because Apple TV remembers your resolution set by displayutil after a reboot. See Talk:Composite for a discussion.

You may also want to disable watchdog


Same Thing Under Linux

On Linux, the video output can be controlled by editing /etc/X11/xorg.conf just as for any NVidia video adapter, as described on the atv bootloader page. Some options can be changed at runtime with the nvidia-settings program.

Personal tools