Tuesday, 14 February 2006

,

Amiga plug and play TV joystick closer than ever

The Commodore 64, Sega Mega Drive, Atari 2600 and various arcade systems have been lovingly shoe-horned into handheld TV devices and marketed to the masses. Regrettably there's no Amiga equivalent in existence. This is predominantly because much of the hardware architecture is undocumented and so must be reverse engineered before it can be recreated; not an impossible task, but one that is tantamount to hiking up Mount Kilimanjaro sporting a rucksack laden with bricks and wearing Mafia-fodder concrete boots.

A handful of dedicated Amigan hobbyists have attempted similar projects, though none have come as close to realising this remarkable feat as Dutch hardware engineer, Dennis van Weeren. Working single-handedly since last January, Dennis has managed to transform a digital semi-conductor known as an FPGA (Field Programmable Gate Array) into a functioning Amiga 500 capable of running Workbench and a small selection of games. When complete, the souped-up device will load ADF (Amiga Disk File) images from a standard, FAT16-formatted, MMC flash card by way of a simple overlayed menu system, which will be manipulated using a mouse or joystick.

Dennis says he was able to progress this far through a combination of "calculated guessing", poring over hardware reference manuals and scrutinising the nuts and bolts of Amiga emulators, WinUAE and Winfellow. It's not yet known if his device will be snapped up by a major toy retailer (Dennis has already received 7 offers!), shared freely with the open source community or kept under wraps for personal use owing to licensing complications. In any case such considerations are probably not at the top of Dennis' agenda at present as he slogs away squishing bugs in preparation for the unveiling of his MiniMig prototype on 18th February before the Dutch HCC Commodore User group in Maarssen.

If you can't wait until then to find out more, you can track this thread on the Amiga.org forum where Dennis can be spotted posting regular updates and answering the questions of gob-smacked onlookers.

Sunday, 5 February 2006

,

Pick 'n' Mix BitTorrent downloads

For convenience's sake, many torrents take the form of all-encompassing bundles; you can either download every release, issue, image or whatever of a set, or none at all. If you've ever found yourself transferring several gigabytes worth of data, and discarding the bulk of it, having retrieved a select few files from the package, this tip is for you.

A limited number of popular BitTorrent clients now support selective downloads, making wasted bandwidth (and time) a thing of the past; the list includes Azureus, BitComet and uTorrent.

As Azureus is the only multi-platform client amongst these candidates, I'll use it to elucidate the process - in any case, the technique can easily be extrapolated for use with the Windows-only clients:-
  • Open a torrent file in Azureus and allow the client to initialise it.
  • Right-click on the entry in your download queue and select 'show details'.
  • Bring the 'files' tab into view, highlight all the files within the torrent you don't wish to download and right-click.
  • The resultant context menu includes a 'priority' option. Hover your pointer over it until the menu expands to display your choices and select 'do not download'.

Wednesday, 1 February 2006

Downloading and converting Real Audio radio streams

One of my favourite radio talk programmes is the Jeremy Vine show, a topical news and popular culture symposium, which airs five days a week, nationally on BBC Radio 2 and world-wide over the web. Ever since I bought my first MP3 player I've been recording Jeremy's shows using a combination of the BBC Radio Player and iRecordMusic, and listening to it a bit at a time, on the move and at my convenience.

iRecordMusic (or Audio Hijack if you prefer) is an excellent tool for capturing non-podcast audio streams as it can discriminately record sound on a per web browser window basis (whereas Audio Hijack Pro is capable of capturing audio from any application). While this enables you to record multiple streams simultaneously, you are limited to recording them in real time. That is, if the show you want to capture is two hours long, it takes iRecordMusic or Audio Hijack Pro two hours to save it to disk. Another snag both applications suffer from is their tendency to capture whatever annoying pauses and stutters the streaming server generates.

Out of curiosity (and my anal proclivity for boosting efficiency) I set about finding a better solution.
Common sense suggests the ideal way to achieve this would be to use a resumable download manager to transfer the Real Audio files, and then convert them to the MP3 format using some kind of audio editing application (very few portable devices are capable of playing back .ra files directly).
This poses two challenges; finding a download manager which can make sense of URLs containing references to streaming protocols, and deciphering the precise locations of the Real Audio files you wish to transfer.

Several download managers which can handle RTSP (Real Time Streaming Protocol) and similar protocols include Flashget, HiDownload, Net Transport and Offline Explorer Pro. Flashget would be my first choice if you want a personal recommendation.

Now we need a means of disentangling the real location of the audio files from the melange of javascript, flash and whatever else they tend to be buried beneath when embedded in web pages. There are a number of ways of going about this:-

1. Make sure you're visiting the audio-embedded web page using Firefox. Right-click and select 'View Page Info'. Click on the 'Media' tab and scroll down the list of objects until you stumble across the address of something resembling an audio file (or at least an audio container).

2. Isolate the .rpm file by delving into the source code of the audio-embedded page using Firefox's (or any other browser's) 'View Page Source' button.

3. For the source-code-allergic among us there's URL Helper or URL Snooper.

Let's take URL revealing method 1 and Jeremy's Monday show as an example. Visit the following URL...

http://www.bbc.co.uk/radio/aod/radio2_aod.shtml?radio2/r2_vine_mon

...and open up the media info pane. Gaze down the 'type' column until you reach the only embedded object; an .rpm file. Copy the location into your clipboard and then append it to the site's root URL in your address bar. This...

http://www.bbc.co.uk/radio/aod/shows/rpms/radio2/r2_vine_mon.rpm

...should be the result. You can test that you've grabbed the right URL by pressing enter - all being well, the show should begin playing as it would if you'd launched it from within the BBC Radio Player.

Download the .rpm file using your download manager and open it with Notepad or a similar text editor. You should see a single line of text, much like this...

rtsp://rmv8.bbc.net.uk/radio2/r2_vine_mon.ra

This is the true location of the Real Audio file. Copy this into the clipboard and instruct your download manager to begin transferring the .ra file to your computer. It should download in a fraction of the time it would normally take to stream (obviously depending on the speed of your connection) and the end product will be blip-free.

Mac and Linux users can achieve the same results (albeit in real-time, just for now?) using the command line version of MPlayer in conjunction with the reallibs package (click on 'download' in the 'all clients' column adjacent to the operating system of your choice). Having extracted the contents of the reallibs package to the relevant area of your '/Library/Application Support' folder (within the 'ffmpegX' sub-folder in my case as I'm using the build of MPlayer I placed here for use with this video/audio encoding tool), the procedure is as follows: figure out the true URL of the file you wish to download, open a terminal window and type:-

"mplayer -noframedrop -dumpstream rtsp://rmv8.bbc.net.uk/radio2/r2_vine_mon.ra -dumpfile jv_monday.rm".

For those of you not accustomed to typing UNIX commands, remember that you are required to navigate to the folder where MPlayer resides before typing this string - that is unless you include the full path to begin with i.e. "/Applications/mplayer" or place MPlayer in an executable-from-anywhere folder such as "/usr/local/bin". Also bear in mind that you won't get a progress report of any kind, so don't harangue MPlayer; leave it alone to finish its task. Make a mental note of the time you ran the script and return to your computer when the duration of the show has expired if you like.

The .ra output, when fully transferred, can be converted into a more flexible wave file using MPlayer's 'ao' operator, or better still, why not skip the first stage and convert the .ra file on-the-fly? The command string you'd need to use looks a lot like this:-

"/Applications/mplayer -ao pcm:file=jv_monday.wav rtsp://rmv8.bbc.net.uk/radio2/r2_vine_mon.ra"

Executing this command dumps a humongous, uncompressed audio file into your '/Users/' folder. Last time I tried this, MPlayer managed to massage a two hour 32kbps audio stream into a 1.2gb wave file!

Once you've encoded your wave file, the hard work is done. You can either bung it on your portable audio device as it is (if you have a hard drive based player with ample storage for instance), or use Audacity to export it as a nicely condensed MP3 file. My tests indicate that it's possible to pack two hours of Jeremy into a sub-30mb MP3 file. Forget your faddy diets; now that's what I call weight loss!

Meanwhile back on the Windows ranch, there are plenty of applications you can use to convert Real Audio files to the MP3 format. The trouble is, nearly all of them are shareware, and a great many are of dubious quality. This is why WavePad is such a fantastic gift to radiophiles. It's an audio editor with a similar feature set to Audacity; the crucial difference being that WavePad supports Real Audio conversions, while Audacity momentarily chews .ra files, swishes the taste around its mouth and spits them out again in disgust.

To convert an .ra file to .mp3 with WavePad, open the former within the 'file' menu, wait for it to be decoded and then export it to the latter format using the 'save as' option, again from within the 'file' menu. As the BBC's streams tend to be encoded at a standard 32kbps, it makes sense to follow suit when you transcode them to .mp3; selecting a bitrate any higher than this will not improve the quality of the source audio, and will result in larger file sizes.

Of course none of this faffing about would be necessary in the first place if the Beeb would only AGREE TO PODCAST MORE OF THEIR SHOWS! To be fair to them though, the reason they don't is because they have to answer to the overbearing publishers of the music they play in between the chat. I assume these Luddites have got it into their thick skulls that if their music was included in freely available podcasts, listeners would pick them apart to harvest it rather than paying for CDs or legally downloaded songs (or worse still, distribute their yield for profit).

What they fail to comprehend is that you'd have to be suffering from a severe case of mush-for-brains to go to all the hassle of hacking out individual music tracks from such low quality streams. This line of reasoning is especially incredulous when you consider how facile it is to nab their superior quality counterparts from a million and one more accessible sources, on or offline. Really, how many people are there out there who have even attempted it? Not enough to pose a serious threat to the music industry, that's for sure.