I’ve been enjoying the ability to spend some quality time over the holidays with my gadgetry (and, I suppose, my family).
Among the gadgets that I dusted off and played around with was my GP2X and breakout board. The GP2X is a handheld Linux based device, primarily aimed at Linux hackers and gamers but also quite good as a video and MP3 player. The breakout board is an add-on which provides TV out, audio out, and USB host capabilities. Plug it into your TV, insert a keyboard and USB hard drive, and you have something pretty close to a Linux based PC.
(Incidentally, back in the day when the greenback was strong and the GP2X was considered the Yugo of the handheld world, I would have said a “dirt cheap Linux PC”. This Engadget article from the summer of 2006 prices the breakout board at US$46. Now, the breakout board is US$75, and the new version of the GP2X is US$250. On the other hand, both the handheld and board have been given hardware upgrades, so you’re getting more of a Kia than a Yugo).
While most aspects of the breakout board require nothing more than plugging in the cables, I had a problem with the TV-out. The board only supports S-Video, and my aging TV only has RCA jacks. Converter cables exist, but at a price that offends my do-it-yourself sensibilities. Fortunately, it isn’t hard to find DIY solutions to this problem, and I went with the one described here.
The solution involves splicing together an S-Video and RCA cable, along with 1 small capacitor. One of the nice things about analog video (especially when combined with a Yugo-quality TV-out source) is that you can do this kind of splicing fearlessly, since all of parts involved can be found for $1 or less.
I’m a software guy, not hardware, so the approach I took is undoubtedly not the optimal one. But the steps I followed were:
1) The above web page shows the pin out of the S-video connector, but I wanted to avoid working within the narrow confines of the connector plug. So, before lopping off the connector, I needed to confirm which of the inner cables were connected to which pins. When I slit open the outer cover of the S-video cable, I saw that the inner cables had four colours: red, orange, brown and black. The web page pinout shows that 2 of these are ground and 2 are video. It seemed reasonable to assume that the black and brown were ground, and the other 2 video, but which was which?
Half an hour of Googling convinced me that there isn’t a standard for such things, so I had to get my answer the hard way, by tunneling into the hard plastic which shields the connector. As it turns out, red is luminance (Y), orange is crominance (C), black is Y-ground and brown is C-ground. Naturally your cable’s colour scheme may differ, but hopefully you’re either a good guesser or a good tunneler.
2) Chop off one of the S-video cable connectors (leaving a male plug at the other end), then strip off a couple of centimeters of the outer rubber. Carefully strip off about 1 centimeter from each of the 4 inner cables. The cables were a little 2 thin for my dollar store wire stripper, so I had to score the cable with a box cutter before pulling off the cable. (People who use box cutters for wire stripping probably shouldn’t preface their instructions with the word “carefully”).
3) Twist the brown and black wire together. (Yeah, I know, so who cares which ground is crominance and which is luminance? But a little scientific exploration never hurt anyone.)
4) Here’s where the capacitor comes in. If you have no idea where to find a capacitor, then go to Radio Shack and pay their ridiculous mark-up. Stop off for some caviar while you’re at it, Mr. Trump. Otherwise, scrounge one from your junkpile, or somebody else’s junkpile. The web page suggests a 470 pF capacitor. I tried a couple of varieties, one 510 and the other 550, with no discernable difference in picture quality. Twist the wire from the orange cable around one leg of the capacitor, and the wire of the red cable around the other. (This type of capacitor isn’t polarized, so it doesn’t matter which leg you choose.
5) Take an RCA cable and snip off one connector, leaving a male plug on the other end. Strip off about 2 centimeters of the outer cable.
6) Unless you have a fancy shmancy gold-plated RCA cable (in which case you probably shouldn’t have picked it for step 5, Mr. Trump), you’ll find one inner cable, probably white, and a bunch of wire strands. The white cable is for the video, and the strands are the ground. Strip a centimeter off the white cable.
7) Twist the wire from the white RCA cable around the same leg of the capacitor that the red S-video cable is connected to. Twist the ground cable around the brown/black joint from step 3.
And you’re done. Plug the S-video connector into your GP2X breakout box, the RCA connector into your TV, select TV-out in the GP2X’s Settings menu, and you should have a glorious colour GP2X menu on your TV, full of crominance and luminance.
SVideo To RCA Connection Hack
Assuming you want your cable to keep working if someone happens to trip over it, or breathe on it, you’ll need to strengthen the connections you just made. I suppose that electrical tape is better than nothing, but using a soldering iron would be advisable. I’m no whiz with the iron, but even I was able to solder these connections without doing any damage to the cable or myself. I added some heat shrink tubing to prevent shorting and for, ahem, aesthetics, resulting in the glorious wonder of electrical workmanship that you see to the left.
While on the subject of the GP2X, I made another discovery recently — nothing new to the GP2X, but new to me.
The GP2X’s built-in video player, a variant of Linux’s MPlayer handles a good variety of codecs, but with the conspicuous exception of the commonly used AC52 audio codec. It turns out that AC52 support, along with a few other codecs missing from the GP2x’s built-in player (notably .wmv) have been available for some time in the MP2X player, which was built upon the source code released by the GP2X’s makers, Game Park Holdings. MP2X has handled every video and audio format I’ve thrown at it so far.
I also played around with MP2X’s support for subtitles (i.e. captioning). Support for SMI sub-titles is nice and simple: just give the .smi file the same name as the corresponding .avi file. If you already have some .avi files without captions and have no idea how to extract captions from the DVD (or are a shameless pirating scofflaw), you can download just the caption files here.