So I sampled a teaser snippet of To Aru “Radio” no Railgun over at Keiri’s place. (for the uninitiated, that’s To Aru Kagaku no Railgun‘s web radio show co-hosted by the Seiyuu’s of Saten and Uiharu) Being completely suckered by it, I trotted down to Hibiki Radio hoping to give the real thing a spin… only to find that I couldn’t play it on Linux.
So what else is new :(
Anyway before I continue my story I should probably state up front here that I didn’t manage to find a “complete”, “elegant” solution, so if you’re a perfectionist you should probably be looking elsewhere. If you’re just desperate to play that damn .asx radio stream though (as I was), read on.
So I spent a whole morning trying to persuade mplayer to play me Radio no Railgun. The mplayer Firefox plugin refused to work, so I did the next best thing any desperate hacker would probably do – find and manually download the target media file. If you’ve never done this before, you download it by finding the url of the target media, which you can do either by manually viewing the page source (View > Page Source in Firefox) and doing some sensible searches (say “asx”), or by inspecting the media player area using Firebug if you’re familiar with that. Anyway the file I downloaded turns out to be an ‘asx’ file, which I later found out is a Microsoft (oh surprise) stream redirector format.
Scouring the Internet I discovered that you could apparently get mplayer to play asx by doing
mplayer -playlist YOUR_FILE.asx
But doing that on Hibiki Radio’s asx yielded an error like the following:
Server returned 302:Found
Failed to parse header.
It looks like mplayer is unable to handle a HTTP 302 redirect! And no amount of nudging and attempting of random stuff would make the asx file play.
Finally, in despair and completely out of ideas, I installed VLC as a last ditch attempt.
…and it worked!!
*shrug* Anyway so there you go. Two things to try if you want to play asx on Linux:
- mplayer -playlist yourfile.asx
- If that doesn’t work, try VLC.
VLC isn’t my favourite media player either, but looks like it one-upped mplayer for this one. Look in your software package manager for VLC and install it. Then just open the file with it, or do
Here’s a screeny of VLC finally playing me my Radio no Railgun:
Of course, after this victory I immediately tried replacing the mplayer Firefox plugin with the VLC one, hoping it’ll let me listen directly from the Hibiki Radio site without needing to download the file. No luck. *sigh*
Oh well, I can live with downloading the file then playing it. And Radio no Railgun was fun stuff by the way, although I probably only understood about 30% of the 38 minutes, thanks to my yowai moonspeak and their bullet-speed conversations :P
Edit: It should have been immediately obvious to me (I must not have been feeling too well that day), but you don’t actually need to download the file to play it. You just need to source out the url, then you can play it directly by doing