How-To: DVD Player Kiosk
The words “Home Theater PC” have become a new example of Ernie’s Invisible Ice Cream Cone—it comes in any flavor you can imagine. A vendor might offer a PC-based PVR, or play your own digital video or music, or manage your digital library. The combination depends on what you’re looking for and what they’re selling. The HTPC crowd is descending on the Mac mini like buzzards on road kill, but while the PC market offers many different solutions, Mac folks tends to wait until a Clearly Superior Entry shows itself.
Herein, we offer our first HTPC solution. We use the Mac mini as a simple DVD player—utilizing Apple’s DVI-to-Video Adapter, the software DVD Player, a couple of AppleScripts and Keyspan’s Digital Media Remote.
Hardware
Apple’s DVI-to-Video connector outputs NTSC to either RCA composite or S-Video connectors. Our first trial was with the RCA composite connector; the mini boots into 800x600 (NTSC) pixels, with many options from 640x480 to 1024x768. The video image has a lot of overscan, bleached colors and odd banding. As one might expect, switching to S-Video results in better colors, and the banding is gone. Sadly, the overscan is present regardless of resolution or connector type. (We find 800x600 yields a tolerable representation of the Mac OS X interface, but movies look best at 1024x768.)
For a remote control, we turn to Keyspan’s Digital Media Remote, the precursor to their new Express Remote. It is a svelte 17-button IR remote with buttons for volume control, menu navigation, Stop/Play/RW/FF and chapter advance functions; the IR receiver plugs into one of the mini’s USB ports. The Keyspan software issues keyboard commands or executes scripts as you press buttons on the remote. Keymaps are provided for 14 applications, including DVD Player, iTunes, and PowerPoint.
The mini’s sound output jack is both a headphone jack and a line-out. (Given that Apple’s Power Mac G4 developer notes warn against plugging a line-out into a headphone jack due to impedence differences, we conjecture that the mini senses impedence on the audio out, and adjusts accordingly.) As such, attaching the mini to the home stereo is a simple matter of a seven-dollar minijack-to-RCA wire cable.
Software
We need the mini to automatically recognize an inserted DVD, launch DVD player in Full Screen Mode, play the movie and eject it when we’re done. The first is easy enough; just verify that the CDs & DVDs system preference pane is in its default configuration, “Launch DVD Player”. One can instruct DVD Player to always use Full Screen Mode, but it doesn’t retain that mode in all circumstances; when you issue the Eject command, it reverts to a window and does not return to Full Screen Mode. Clearly, some assistance is needed.
Applescript: DVDlaunch
Download the script or place the script text in a new Script Editor window; save as DVDlaunch in “modmini Scripts” in your /Library/Scripts folder.
That assistance comes in the form of AppleScript. Instead of having the OS launch DVD Player, we run our DVDlaunch script.
DVDlaunch activates DVD Player, puts it in Full Screen Mode and plays the DVD. With this setup, the mini will play DVDs in Full Screen Mode, every time.
Configuration: Automatically run the DVDlaunch script
- Open “CDs & DVDs” in System Preferences
- Change the “When you insert a DVD” preference to “Run script…”
- Navigate to your /Library/Scripts/modmini Scripts folder
- Select the DVDlaunch script and click Open.
After watching our DVD, we want to eject the disk and return to OS X’s attractive desktop. The Keyspan remote doesn’t have an Eject button, but it does have a global action for the “Cycle” button. By default, this button maps to the application-switching Command-Tab key command. As we rely on the OS’s media-handling to launch DVD Player, the Cycle button is available for other uses. Demand, meet supply.
We could send the Eject command by mapping the Cycle button to Command-E. However, this has the side effect of removing DVD Player from Full Screen Mode, leaving it in an unsightly window; we’d prefer the application to quit.
Applescript: DVDeject
Download the script or place the script text in a new Script Editor window; save as DVDeject in “modmini Scripts” in your /Library/Scripts folder.
We once again turn to AppleScript. As DVD Player doesn’t have Eject as a scriptable action, our DVDeject script sends Command-E with Apple’s GUI Scripting, and then tells DVD Player to quit.
Reconfiguring the button’s actions
- Launch the KeyspanDMR application.
- Click the Configure button to open the Map Editor.
- Highlight the Cycle button in the list, click “Use App Specific Button” and then “Edit Button”.
- In the Edit Button Action window, select AppleScript from the Action Type menu. Click Browse, navigate to your /Library/Scripts/modmini Scripts/ folder and select the DVDeject script we saved earlier.
- Click OK to return to the Map Editor.
- Save your changes.
Result
This solution turns your mini into an effective DVD player kiosk. Pop in the DVD, the player launches full-screen and you use the Keyspan remote to navigate the DVD menus per normal. It’s pretty basic, but it gets us started. Join us as we build from here toward greater HTPC solutions.

