Posts Tagged xbox

More on XBMC — ‘Lets go to the movies!’

My experiences with XBMC are still happy ones.  I’m learning to live with its lockups (usually caused by me making vicious, unprovoked attacks on it by doing things like pressing buttons on the remote)…  No, that’s too harsh 🙂  In seriousness, I’m very impressed — almost as impressed with it as I am with how much disk space I’m going to have to buy if I want to rip my DVD collection to play on it!  (I’m beginning to wonder why I’m entering this in the Fun topic…)

I was explaining to a friend just the other day about how DVD was different to CD.  “Audio CDs,” I said, “are a completely different format to data CDs, which meant that the first CD drives for computrs could not even read music CDs.  With DVDs it’s easier because all DVDs are basically data discs — the ones with movies on just have a special directory layout, and the movie is just simple computer files on the disc.”

What an idiot.  How I regret ever saying anything so stupid!

Over the last week I have tried more than a dozen combinations of software on Mac OS X, Linux and Windows to do the job of getting thosse “simple conputer files” off the DVD and onto my server so that we can view them on XBMC.  First complication is the fact that XBMC currently does not understand DVD menus, and only understands how to read a VIDEO_TS directory if it’s on a physical DVD.  So my first grand plan of simply copying VIDEO_TS to my server was a failure.

Here started my journey into ripping and transcoding.  A journey that has taken me from Mac the Ripper and Handbrake, through drip and quickrip, past countless forum pages and mailing list archives and a side-trip into Forty-Two, to arrive at ffmpegX (Mac) and dvd::rip (Linux).

I almost gave up on dvd::rip when I first set it up.  It has a cluster mode, and I naturally assumed that my Pentium-4 2.4GHz-HT clustered with my dual-Opteron server would make mincemeat of my DVDs (figuratively of course).  Unfortunately the Opteron is not strong on this sort of work (or perhaps the Gentoo ebuilds for the transcode package are not well optimised for AMD64), and the Pentium-4 was held back because it accessed the files over NFS.  That, combined with the fact that I had repeated errors and failed transcodes, drove me back to the Mac.

Not that that’s a bad thing.  Most of the software around is optimised for and benefits greatly from the Altivec engine.  Having a w00ty dual-G5 Power Mac is also a help 😉  Mac the Ripper takes no time at all (well, okay, about 5 minutes) to rip a DVD — maybe a bit longer for a hefty DVD9 — although I do only rip the main feature to save a little time.  Then, using either Handbrake (for simple jobs) or ffmpegX (for better access to tweaking knobs) I make an AVI or MPG out of it.

There are two costs to all of this: 1) time, and 2) storage.

Time: this is actually a double-edged sword.  Not only does it take a sodding-long time to actually do the transcode (luckily you don’t have to sit by it) but I then have to transfer the file to the server, then light up XBMC and give it a test.  Not necessary to watch the whole thing (usually the first minute or so is enough to tell you how far out of sync the audio is).

Storage: I thought that editing Mini-DV and mastering that to DVD takes storage…  There is no way I will rip my whole DVD collection.  Apart from the fact that there are some movies that you just have to watch in original quality (oh, didn’t I mention that?  Yes, transcoding does require you to sacrifice some picture quality, although you do have a little control over just how much you do lose), I can’t justify putting more storage in the server just to watch the occasional movie.

So what will I use this for?  Some things are ideal — I can see the kids videos that get played on endless repeat being done this way.  Nicholas will be able to do it himself without us worrying about DVD drawers and smudges on discs (just have to make sure I can lock out the “educational videos” from his set 😉  And, some things like the Bottom stage shows and episodes that we put on just for a laugh sometimes.  But not Matrix — not in MPEG4, anyways 😉

Tags: , ,

XBox modding

Fun for young and old!  Seriously, if you’ve got some time to kill (and potentially an XBox to kill as well!) you can take the opportunity to stick it to ol’ Bill Gates up in Redmond and hack his little console machine.

Depending on the application it can be a pretty cheap way to get the power you need: I can get a brand-new console for A$244 retail (without going to a real discount shop, or I could brave the second-hand and private sale market and save even more) and then sell the controller on eBay for a few bucks — for that money, I get a Celeron/Pentium (reports vary) 733MHz with 64MB of RAM, a 8-10GB hard disk, built in 100MBps Ethernet, in a low-power moderately compact form-factor.

That’s right — the XBox is just a PC.  Sure, it has no keyboard or mouse, but it is made of standard PC components.  The only thing stopping anyone from running normal PC programs (such as Linux, or normal Windows) is the software protections that Microsoft designed into the XBox system to stop it — and it is these protections that XBox modding defeats.

There are quite a few people about building clusters of XBoxes for doing…  well, whatever someone who wants a cluster but can’t afford a real one would do with a cluster.

Anyway, back to my modding adventure.

Late in 2003, I was invited to present at the Darwin Linux User Group annual Install-Fest.  One of the presentations (not mine) was a cracker — basically, the presenter stopped at the local shopping centre on the way to the venue and bought a brand-new XBox, and proceeded to apply a software exploit and install Linux.  It was what I’d always wanted to do to the XBox I bought when I was working in Auckland, but never got around to.  Even after having seen it done, though, I didn’t get my finger out and do it myself.

The exploit that the presenter at DarLUG used is known as “MechInstaller”.  It was one of the early programs that exploited bugs in games.  The first game with an exploitable bug was “007: Agent Under Fire” by Electronic Arts, but soon afterwards Microsoft themselves released the game “Mech Assault” that contained a similar bug.  Basically, you “obtain” special files that look to the game like a “save-game” (a file containing saved progress through the game).  Instead of being real game progress data however, the file contains code that triggers the bug in the game and defeats the protection that Microsoft built into the XBox to prevent it from running unauthorised programs.

MechInstaller was the first exploit that I tried — but first I had to get a copy of the game.  Having heard that Microsoft had fixed the exploitable bug in later versions of the game, I figured that buying a “pre-played” copy of the game would increase my chances (and save me a few bucks on a game that I’d rarely play).  What I should have done is research if there was a way to determine if you had a patched copy of the game — because sure enough, I got home and found that the exploit didn’t work with my copy of MechAssault.  Boo hoo.  At this late stage I did the research and found that the DVD media of the original game had different identifying markings than the patched version, and what the markings were.

Susan joins the story at this point — she volunteered to go back to the game shop and play “Gamer’s Girlfriend” to try and get me the right version of the game.  Whatever she said to them worked, because she got it!  MechInstaller was GO, and before long I had a Linux system running on the XBox!

Now I had to choose which Linux to run.  Being a long time Gentoo user I was interested in Gentoo or Gentoox (a customised Gentoo specifically for XBox), but Xebian (or Ed’s Debian) has the best and longest track record in the XBox Linux scene so I pulled down the CD and went for it.  Before long I was booting the CD, installing, and rebooting off a real Linux system on the XBox.

Now what?  It was always my intention to use Linux on the XBox for media streaming.  Xebian comes with the Freevo package already installed, but I didn’t see that it would really suit the task.  I found the XBMP and XBMC projects (XBMC the descendant of the first, XBMP) which looked very attractive.  There was also a XBMC competitor that looked like a customised Gentoox build running MythTV, but again it did not seem to be exactly what I needed.  So, XBMC it was.

The folks that maintain XBMC do not build binaries of it.  Legally, XBMC can only be built using the Microsoft XDK — which is well beyond my price reach and far beyond the budget of this project (from what I understand the XDK is one of these “if you have to ask the price you can’t afford it” things).  A project to build a Free DK for the XBox, but XBMC will not build cleanly this way.  So how can you get it?  I cannot say — but if you poke around places like XBox-Linux and XBox-Scene for long enough you will find out.

Having found a way to get XBMC, I had to install it.  This is where things got interesting…  The MechInstaller was good only to perform a very basic modification to the XBox Dashboard (the program that provides the funky green blobby control panel on the XBox when it’s not running a game) that allows you to boot Linux.  Using MechInstaller, you always had to first boot up the XBox to the Dashboard, then select the “Linux” option that appeared, in order to run Linux.  Booting automatically to Linux, or running some other program (like XBMC) from the Dashboard, did not seem to be possible.  I started to face the possibility that the only way to proceed would be to replace the BIOS in my XBox with a BIOS that would allow other programs to run.  I set the project aside for a little while (during Christmas and New Year) while I contemplated doing possibly irreperable damage to my XBox…

When I came back to the XBox, I stumbled onto a new breed of software exploits: the UBE, and its descendant the UXE.  The original exploits like MechInstaller had a flaw — they were a two-part exploit.  The main bug they exploited was the buffer-overrun exposure in the game, but they also needed a gap in the way the Dashboard operates to make the needed Dashboard change.  Microsoft was busily patching this up, using updates to the XBox kernel and Dashboard in later builds of the XBox, but also using the “XBox Live” service to update the software on XBoxes without warning or permission from owners.  Some games also had updates to the XBox software, that were automatically applied when the game ran.  Consequently, by the very latest versions of the XBox software it was getting very difficult to use the existing exploits.

Then came the UBE.  While it still relied on a game with the exploitable bug, the trick it did on the XBox was different.  I don’t know the details, but apparently by the time the second version of the UBE was released (called UBE2) only the very latest PAL XBoxes could not be modded out-of-the-box — and even those could be done with a small and reversible change before running the exploit.  The UXE takes this even a step further — apparently any XBox can be modded.  There is a utility called ltools that you can use to install an exploit (now it provides UXE) and install one of a variety of alternative Dashboards which run at bootup instead of the Microsoft one.

UXE provided my answer to running XBMC.  I used MechInstaller’s Emergency Linux system to get the ltools files over the network to the XBOX, then I used the MechInstaller to restore the previous Dashboard (probably didn’t have to do this, but figured that the ltools installer might not handle a box that already had an exploit installed).  Then, I started MechAssault and loaded the ltools savegame.  What appears is one of the available alternative Dashboards for the XBox, and by pressing a couple of buttons I got the ltools installation script.  When it was time to run, a mini Linux system booted and did the work: first, it made a compressed copy of the XBox C: partition, then it did its real work (copying or modifying files, etc).  When I restarted, the XBox booted into my chosen Dashboard (MXM).

After that I installed XBMC by copying the files over the network using MXM’s built-in FTP service.  After selecting “Reset Menu Cache” in MXM and rebooting, XBMC was available in a new Applications menu of MXM.  My fun with XBMC was about to start!

About the only thing I’d like to do now is make the XBox boot up to XBMC.  Running via MXM only adds two button presses to the startup sequence, but if I’m going to be running XBMC all the time I might as well boot straight there (and if I need to run the M$ Dashboard or MXM I can do so from XBMC).

Tags:

XBox Media Centre

Only a couple of weeks after going all gooey over SqueezeBox and SlimServer, I’ve found another way of doing media streaming at home.  I’ve now joined that rebel group known as “XBox-modders”, and have a machine at home now running the XBox Media Centre.

XBox Media Centre requires a modded XBox to operate, though as I found out a software-mod-only XBox is fine (given the apparent illegality of mod-chipping in Australia).  See another post for more info about how I modded.

XBMC lets me play my library of MP3s, listen to Internet Radio, watch movies (including ripped DVDs, apparently), and (perhaps most importantly to us right now) browse our digital photo gallery — all using the XBox DVD remote.  It comes with its own streaming protocol server, which appears not to stream as such but rather just serve files, but does run on Linux (an ebuild for Gentoo was all ready to go).  The interface is via TV, which makes sense for viewing movies and pictures but not so much for audio (of course you can turn the telly off once you’ve made your selection, or buy/build one of the LCD screen modules that XBMC knows how to address).  For the truly keen there is a web server built into XBMC as well, that lets you control some functions from a browser (it worked alright with IE, but Safari on our Power Mac gave it trouble, and there are reports of unfriendliness with Firefox).

Cost-wise, XBMC has really only cost me an XBox (yes, I already had one, but unfortunately for one who said that he only ever bought an XBox in order to run Linux I’ve built a bit of a game collection, and until only very recently I believed that the only way I could run Linux or XBMC from bootup was to replace the XBox BIOS, an operation that would have rendered the XBox unable to play games.  So I bought a new XBox for playing games, and modded the existing one.  Then I found out that I didn’t need to replace the BIOS…  Sigh…).  I also bought the “Advanced AV Pack”(?), the little output box that gives you S-Video and optical audio output from the XBox.  XBMC knows how to handle the digital output, and generates a superb-sounding AC-3 stream to our Yamaha amplifier (I never thought 128kbps MP3 could sound so good).

So is XBMC the “way to go”?  Well, I’ll let you know.  I’m happy so far — except for the freezes that have happened a few times, and the extraordinary amount of noise that comes out of the thing to keep the heat down (heat being a possible cause of the lockups, because I had not turned on a setting in XBMC that instructs it to increase the fan speed in response to rising temperature).  I’ve yet to try a DVD in it yet, and the promised visualisations do not appear when playing music…  Its competition is media streaming boxes like the Netgear MP-101 (which only does audio, has no digital output and requires proprietary Windows-only server software), the D-Link Media Gateway (?) (which does video and pictures but again requires Windows-only server software), Pinnacle’s media box (similar to the D-Link), and the SqueezeBox (great design, terrific software and community, but ghastly expensive by the time it lands in AU, with no video or picture capability).  For now I think I’ve made the right call.

Tags: ,