Archive for March, 2005


Sharing Media to XBMC

Sunday, March 27th, 2005

Following two posts on MacOSXHints.com, I felt I should mention the easiest way I’ve found to get content over your network to Xbox Media Center.

For those who don’t know what it is, Xbox Media Center (XBMC for short) is an Xbox program that plays just about any kind of multimedia you can throw at it. It’s like the turbo-charged VLC for your TV. Not only does it play standard MPEG-1 (.mpg) video and audio files, is plays MPEG-4, DivX, XviD, WMV, Audio CD, AAC, MP3, AC3, DTS, M4A, JPG, PNG…the whole alphabet soup of media types. The best part is that it all happens behind the scenes. You don’t have to worry about telling it specific information about what kind of file you’re dealing with. It just works. And here’s where this tip comes in - XBMC can also use the Xbox’s built-in networking to access computers on your network via Samba sharing (and various other streaming protocols, too, like XNS) and iTunes sharing (DAAP).

So how do you share media from your computer to your Xbox? You can follow one of the two tips above, but the way you’re about to learn is much quicker, and the program you use to accomplish it is quite handy. A great little tool called SharePoints lets you create Windows and Mac network shares without making a new user for them, as the network sharing is built into the OS, but there is no Apple-provided solution for managing them. With SharePoints open (either the preference pane or the application), fill in Share Name with a short name like “Movies”, set the Owner permissions to “r” for read-only (the Xbox has no reason to write to that directory), and choose a Directory for the new share. The Directory that you set is where the share actually pulls files from on your computer, so you would want to pick something that matches what your Share Name indicates - Movies for movies, Photos for pictures, etc. Then, under the “Windows (SMB) Sharing” popup menu, choose “Shared (+)”, and click “Create New Share.” Now that you have a folder available to your Xbox from your computer, it’s time to tell your Xbox how to get to it.

If you’re previously set up Xbox Media Center, this step should be easy. Inside the XboxMediaCenter.xml UserData/sources.xml configuration file, add a new block of code the line inside the appropriate section (photos, movies, or music). 8/1/2006 Update: See this post regarding changes to the way XBMC handles network shares.

XboxMediaCenter.xml Config Example

Give the share a short name within the name tags, which will be shown onscreen. Then replace username, password, ip, and share above with your Mac user’s username and password, your Mac’s IP address, and the Share Name you created in SharePoints. Save the modified file to your Xbox via FTP, and reboot your Xbox. When XBMC starts, you should be able to browse files on your Mac using your Xbox, and play them right over your network.

Hackers and Painters

Saturday, March 26th, 2005

Hackers & Painters: Big Ideas from the Computer Age is a compilation of brilliant essays by author and Viaweb creator Paul Graham. Covering everything from startups, programming, open source software, web-based software, and more, Graham details the ideas behind technological innovation and the people that make them happen. Hackers and Painters is written in a very down to earth style and clear manner than anyone, not just computer people, can understand.

If you’re at all interested, read the essay “Hackers and Painters” at Paul Graham’s website, and you’ll be hooked. That single essay is what convinced me to buy the book. If you’re still unconvinced, another of his essays, “Great Hackers”, is available in text form and in audio form at IT Conversations.

Hackers and Painters is a fantastic book that covers a wide spectrum of topics in technology, but links them all together seamlessly. It’s one the best I’ve read in a long while and has significantly impacted my views of programming, business, and design. Here are some choice quotes from the book:

“What do hackers want? Like all craftsmen, hackers like good tools. In fact, that’s an understatement. Good hackers find it unbearable to use bad tools. They’ll simply refuse to work on projects with the wrong infrastructure.”

“What worries [Bill Gates] about Google is not the power of their brand, but the fact that they have better hackers.”

“It’s a mistake to try to baby the user with long-winded expressions meant to resemble English. Cobol is notorious for this flaw. A hacker would consider being asked to write ‘add x to y giving z’ instead of ‘z=x+y’ as something between an insult to his intelligence and a sin against God.”

“It is by poking about inside current technology that hackers get ideas for the next generation.”

“[I]f function is hard enough, form is forced to follow it, because there is no effort to spare for error.”

“In the desktop software business, doing a release is a huge trauma, in which the whole company sweats and strains to push out a single, giant piece of code. Obvious comparisons suggest themselves, both to the process and the resulting product.”

“I think [programming] language designers would do better to consider their target user to be a genius who will need to do things they never anticipated, rather than a bumbler who needs to be protected from himself. The bumbler will shoot himself in the foot anyway.”

DVD Studio Pro Markers

Wednesday, March 23rd, 2005

Recently, I needed an easy way to get chapter markers into DVD Studio Pro without re-encoding my video with embedded markers, and I ran across an interesting tidbit of information. DVD Studio Pro has an “Import Marker List” command, but I wasn’t sure what kind of file it was expecting…another multimedia file with embedded markers? A CSV file? A proprietary format marker list? After much searching, I found this site which shows you exactly how to import a plain old tab-delimited file into your DVD Studio Pro track. Slick.

Update: Saved PDF version just in case the site goes away.

My Recent Tunes Code

Tuesday, March 22nd, 2005

Here is the code that I use to power my Recent Tunes list seen at right. It’s a little messy, but at least commented so you have some clue what each part is doing. The cover_update.php script is what does most of the work. You shouldn’t have to change anything in the amazon folder - that’s all there to talk to the Amazon.com API, which you will need access to. I also recommend Recent Tunes for updating your tracks from iTunes. Note that I use the current tune, not the list of recent tunes, as it makes managing the MySQL database easier and lessens the load put on Amazon’s API (which I imagine has a ~1000 query per day limit). If you have questions about using it, post a comment so that others can benefit from the conversation as well.