|
|||||||
| Applications Talk/Review Apps for Dell's Axim |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||||||
|
Contributing Reviewer ![]()
|
The Radio Stream Transcoding Bible
With the advent of cheap and/or unlimited data plans, good coverage and the increasing presence of Internet radio stations, the importance of listening to streaming radio stations have become much bigger than ever. In this Bible, I mostly elaborate on practices that
This article is part of my “Multimedia Bible” series and will, eventually, be incorporated in some way in the final version of Multimedia Bible, which, hopefully, will be published this month. Note that I'll also elaborate on TV (video) streaming and transcoding in a later Bible. We’ll use many of the tools / technologies introduced in this Bible in there; most importantly, Orb and VLC. This Bible, as with my last multimedia-related articles, multiplatform. Don’t get offended by this if you're a fanboy of either of the platforms and just hate everything related to the other: both Windows Mobile and Symbian software developers need to know what the other operating system offers so that they can improve on their products. In addition, should you have devices of both operating systems, you'll be able to optimize the usage of these devices. Just an example: I mostly use the Nokia N95 as my main entertainment and light Web browser / mailer / communicator device because of its, compared to any Windows Mobile device, superior A2DP quality, built-in, stereo speakers, acceptable battery life and lightweight (120g), small body. Therefore, when I know I won't need a Pocket PC (and its high-resolution VGA screen), I know I can safely leave my comparatively heavy and "brick" HTC Universal at home, and go to, say, a quick walk with my N95 only. And, of course, when I do know I will need a Pocket PC and/or a high-resolution screen (for example, to do some serious (!) Web browsing or remote desktop access/control), I take my Universal with me too. (For phoning purposes, I still use my HTC Oxygen (s310) WM5 MS Smartphone because it's cheap - no problem if I'm robbed / it's stolen -, very sturdy and is one of the very few Windows Mobile devices that support flawless, two-party call recording capabilities. I always keep it in my trousers' pocket.) Note that I planned to review the Palm OS as well. As, currently, I don’t have a Wi-Fi card for my Tungsten T3 and I just couldn’t make it use an external IrDA / Bluetooth modem (unlike with my old Zire 71), I couldn’t test streaming on it. By the time I publish the final Multimedia Bible, I’ll try to get hold of a Wi-Fi card and update this Bible so that Palm OS is also covered. (Sorry, I can't affort a 750p just to be even more multiplatform. If you have one lying around unused, of course, you can send it to me, particularly if you're inside the EU to avoid customs issues ;-) ). After all, on Palm OS, Pocket Tunes is a freaking good audio player well worth comparing other mobile operating systems to. Introduction While trying to listen to a radio stream, you surely have run into not being able to play back an Internet radio station either entirely or without severe quality and/or battery life degradation. After you read this Bible – and digest all its contents –, you’ll know how to fix problems like these. 1.1 When it’s completely impossible to listen to a stream... First, let’s take a quick look at what can cause your handset to not be able to play back a particular Internet radio station.
1.2 When you prefer optimizing an, otherwise, working stream... Now that we’ve seen what can make it completely impossible to listen to a particular stream, let me also take a look at when you may still want to go for an optimized version of a radio station.
Note that, currently, on Windows Mobile, you’ll want to use TCPMP to play back your streams. See THIS article for more info on HE-AACv2 compliance. It’s only later that CorePlayer and, probably, Conduits Pocket Player / PocketMind Pocket Music (the developers of these apps promised they'd look into implementing support for them) get HE-AACv2 support. Keep in mind the following: if you install TCPMP on a MS Smartphone (WM6 Standard), as opposed to “regular” Pocket PC’s, just extract 00000aac.001 from the AAC CAB file, rename it to aac.plg and copy it to the home directory of TCPMP on your Smartphone. On Symbian, currently, Nokia Internet Radio (see remarks & quick review HERE) is the best way to play back SHOUTcast MP3 streams. Now, let’s take a quick look at what tools we have at our disposal. 1.3 Our tools: transcoders, stream formats 1.3.1 You must run a transcoder on your desktop PC! First and foremost, for ALL the alternate technologies, you’ll need to have a desktop computer attached to the Internet and switched on when listening to music. The sole reason for this is that it’s on this machine that the so-called ‘transcoding’ (converting between two stream formats; Wiki page HERE) takes place. Your handset will connect to this desktop PC instead of the original radio station URL. Why no purely desktop PC-less setup, you might ask. Why can’t you just connect to a third-party server to do the trick for you? The reason for this is pretty simple: transcoding is a pretty much CPU-intensive task. A typical transcoding process, in VLC, takes about 10% CPU cycles on a contemporary 3.2 GHz P4. You can’t expect for example the Orb folks to install a supercomputer or some hundred PC’s to offer transcoding to their clients – for free. Of course, in the future, companies / services specialized in providing server-side, commercial transcoding services may turn up. This is why you MUST have a desktop PC running your transcoder, independent of their particular type. 1.3.2 Stream formats In my quick review of streaming audio formats, I’ve already elaborated on the different playback capabilities of the available media players. You may already also know that you should go for the currently best, most effective audio format, HE-AAC v2 if you have a Windows Mobile device. If you have a Symbian one, then, either MP3 or, if you have a non-NAT’ed network connection, even Orb's RealAudio or RTSP/AAC will work for you. Quality differences (in which, HE-AAC v2 is certainly the winner) and generic operating system compliance (again, streamed HE-AAC v2 is, currently, only compatible with Windows Mobile but not with Symbian) aside, there are some other factors you should consider when going for a given streaming format; for example, the CPU usage, which, at least on some architectures, may have a huge effect on the power usage and battery life of the handset. The following screenshot shows playing back MP3 (which is a less CPU-hungry operation) and HE-AAC v2. ![]() Note that this, mostly, affects Intel Xscale PXA-2xx users only – that is, users with HTC Universals, Athenas / X7500’s and several earlier PDA’s and handsets. Users of for example TI OMAP-based handsets won’t really notice any increase in battery life if they go for MP3 instead of HE-AAC v2. The reason for this has already been explained in my H.264 Bible: the TI OMAP platform is much more battery-friendly than the Intel PXA-2xx one. I can only hope Marvel, the new owner / developer of the old PXA architecture, have indeed improved on power usage in the brand new, 3x0-series PXA’s. (I still haven't had the chance to verify this as these new CPU's are used in very few and, in Europe, still not available, disconnected, traditional PDA models.) 1.4 Transcoders Now, let’s elaborate on all the transcoder alternatives. 1.4.1 Orb Currently, the most widely known and popular transcoder (and generic radio streaming) service is that of Orb. It is hugely popular with both the Windows Mobile, Symbian and iPhone folks. It certainly deserves this: while, in some cases, it’s definitely lacking, the web access module it provides is by far the best of all. And, it not only allows for transcoding radio stations, but also accessing the files on your desktop computer and streaming multimedia files from there – as if they were located on your handset. After installing, if you want to add your own radio stations to Orb, right-click the Orb icon in the Windows tray in the lower right corner, select Configuration and go to the Media tab. There, click the Add button in the “Music” group to add the directory of your playlist files. ![]() They’ll, then, be shown under Audio / Playlists: ![]() Of course, under Audio / Internet Radio, you’ll still see the radio stations shipping with Orb – you might also want to take a look at them. I REALLY recommend giving Orb a try. Even if you don’t start to actively use it (because of the severe Orb restrictions and the vast superiority of the HE-AAC v2 format (Orb only uses the “dumbest” AAC-LC)), it’s still worth paying a try. 1.4.1.1 Restrictions of Orb If you take a look at the online Settings / Stream page of Orb, you see it offers several output stream types: ![]() (Incidentally, it’s this page that allows for selecting the streaming format. All this when accessed from a mobile browser like Internet Explorer on Windows Mobile, Nokia Web on Symbian or Opera Mobile on both operating systems.) As can clearly be seen, WMA, RealAudio, some 3G formats (ALL in RTSP!), Winamp PLS and Flash are supported. Unfortunately, many of them (the 3G formats and RealAudio) are RTSP-only, which means they are completely useless if your mobile operator uses NAT’ing – that is, doesn’t expose your handset directly to the Internet. As far as the Flash support of Orb is concerned, on Windows Mobile, the Flash player (screenshot running under Opera Mobile), while it starts with the official, latest MM7 Flash player plug-in, crashes after about 10 seconds when used from the built-in Internet Explorer (tested on two devices). On Opera Mobile 8.65, it keeps playing; however, it utilizes the CPU at 100% as can clearly be seen in HERE. And, in addition to the huge CPU usage, it also has a major problem: it uses a temporary file in the built-in storage of the device, which will, sooner or later, result in the storage’s entirely filling up and stopping / crashing the machine. A screenshot of these temporary files is HERE. Flash Lite 2.1 is totally incompatible with Orb’s Flash streams as can also be seen in HERE. Under Symbian, it doesn’t even start under the “old” but still official Flash Lite 2 support of Nokia Web as can also be seen in HERE. All in all, under the two mobile operating systems, using the Flash mode is in no way recommended. Also note that the Winamp .pls format it offers internally just uses WMA streams – don’t think it’s a SHOUTcast-compatible stream meaning compatibility with Nokia Internet Radio / LCG Jukebox on Symbian or with many SHOUTcast clients (GSPlayer etc.) on Windows Mobile. Two compatibility charts follow, which show the two major mobile operating systems in both NAT’ed and non-NAT’ed (direct) cases: Windows Mobile: ![]() Symbian: ![]() As can clearly be seen, if your connection is NAT’ed, your only choice is WMA (which, incidentally, uses 32 kbps 44 kHz mono (!) sound in the 40 kbps, that is, GPRS setting). This will work on Windows Mobile but, currently, not on Symbian. All in all, Orb is a decent choice if you have a faster (for example, EDGE or the even faster 3G, assuming you aren’t afraid of the huge battery usage of the latter) connection and/or a non-NAT’ed environment. In these cases, its technical inferiority (the lack of SHOUTcast stream support and, most importantly, the lack of HE-AAC v2 – that is, the only high-quality streaming format for GPRS connections) won’t cause you problems. Finally, it has pretty nice Sirius and XM support. See THIS for more info on the latter. Let me, however, reiterate its disadvantages again:
you will definitely want to take a look at the SHOUTcast / Icecast2-based alternatives; most importantly, Oddsock.org’s excellent apps. Note that I’m pushing the Orb folks to add Icecast2-based HE-AAC v2 and MP3 stream support. See THIS thread for more info. 1.4.1.2 Other Orb-related discussion threads of interest Mobile Phone Streaming Issues XM and Sirius SKY.FM, DI.FM Note that, while the old "High quality" option under 3GP, had a separate checkbox to switch to AAC(-LC); the new, 2beta version has a separate, top-level radio button for this mode. That is, don't let you be mislead by THIS, THIS, THIS and THIS threads, which still refer to the old approach. Streaming, additional aac codec 1.4.2 Icecast2-based streaming The following alternatives all require the usage of an Icecast2 server. (Note that, as an exception, VideoLAN VLC doesn’t necessarily need it unless you stream to a Symbian handset from it. The same stands for WME as well - it's a server on its own.) 1.4.2.1 Icecast2 Icecast2 (Wiki page HERE) is an open source equivalent of Nullsoft’s SHOUTcast server, which does exactly the same. There, effectively, there isn’t much difference between SHOUTcast and Icecast2; geeks and other pros tend to prefer the latter; therefore, I also elaborate on it in here, instead of the closed-source, proprietary SHOUTcast. You can get it HERE. The download links are on the top of the page; if you have Windows, you’ll want to download the icecast2_win32_v2.X.X_setup.exe file. After installation, start it. Go to Configuration / Edit Configuration and edit the file in the following way:
After editing, just close the Notepad window and answer Yes to saving it. Now, when you click the Start Server button, it starts listening to incoming streams as can be seen in HERE. You won’t need to do anything else to Icecast2, other than starting / stopping the server if you need it or don’t need it any more. Note that, by itself, Icecast2 doesn’t stream anything; it needs other clients (“source clients”), whose streams it just relays to the Net. That is, effectively, it uses the famous three-tiered Web application server model already known to many IT gurus, where the listening client equals to the Web browser, the middle tier (the application / Web server) is Icecast2 and the database back-end is, in this case, the transcoding source clients. It’s the stream of the latter that Icecast2, in the middle tier, “just” relays further to the client listener(s). The streaming clients introduced in the next subsections are all geared towards using Icecast2 as the real streaming server. The only exceptions are:
1.4.2.1.1 Mount points You must be aware of the so-called ‘mount points’. Particularly when you stream more than one radio stations at the same time (in cases, you’ll want to prefer this solution to the others because it frees you from having to remote control the sound source), you will want to know what a mount point is. When you configure an Icecast2 source client (VideoLAN VLC, Oddsock.org’s apps etc) to stream their contents to an Icecast2 server, you not only pass these clients the Internet address of the Icecast2 server they’ll need to connect to, but also an additional parameter that, later, uniquely identifies the stream: the mount point. For example, let’s assume you stream two streams to your Icecast2 server from your VideoLAN VLC client. To quickly fire up the streams, you create a batch file with the following contents: start vlc.exe --sout-shout-name="Iskelmä Radio" --sout-shout-description="Iskelmä Radio (Finnish)" http://217.30.180.250:8050/ :sout=#transcode{acodec=mp3,ab=32,channels=2}:dupl icate{dst=std{access=shout,mux=ogg,dst=source:menn pwd@127.0.0.1:8000/iskelma}} start vlc.exe --sout-shout-name="Radio Vaasa" --sout-shout-description=" Radio Vaasa (Finnish)" http://webcast.vlp.fi:8000/radioVaasa :sout=#transcode{acodec=mp3,ab=32,channels=2}:dupl icate{dst=std{access=shout,mux=ogg,dst=source:menn pwd@127.0.0.1:8000/radioVaasa}} Here, look for the iskelma and radioVaasa parameters. It’s there that you tell Icecast2 where to “map” these streams to. If you use these two mount points, you can access (listen to) these streams from a SHOUTcast/Icecast-compliant mobile client (TCPMP, CorePlayer, GSPlayer, Nokia Internet Radio, LCG Jukebox etc.) by simply supplying the mount point after the address and IP of your server like in the following direct URL you can directly enter in any of these players: http://111.222.333.444:8000/iskelma and http://111.222.333.444:8000/radioVaasa (111.222.333.444 is my desktop computer's imaginary IP address. You'll, of course, will need to provide yours. Use What Is My IP if not sure.) Of course, prefer defining a playlist .pls file instead of entering URL’s like these into a player to make your life even easier because of the direct file access in most of these apps. The contents should be as follows: [playlist] numberofentries=2 File1= http://111.222.333.444:8000/iskelma Title1=Radio Iskelmä Length1=-1 File2=http://111.222.333.444:8000/radioVaasa Title2=Radio Vaasa Length2=-1 Version=2 (Note that you can leave out the Title and Length attributes. However, if you do so, the current beta of Nokia Internet Radio will crash and will be needed to reinstalled for it to work again.) You can use any mount point name and you don’t need to explicitly configure the Icecast2 server to know anything about them. That is, you don’t need to tell Icecast2 “hey, I want to use the mount point “mystation”; let me configure you” at all. This is certainly very good news: only the original clients (transcoding the original Internet radios and streaming the transcoded contents to Icecast2) and the mobile players need to be aware of (that is, use) the same mount points. An Icecast2 screenshot of showing several mount points being in use at the same time, with VLC acting as a streaming client: ![]() 1.4.2.1.2 Connecting to your Icecast2 server In this section, I elaborate on how streaming clients and mobile multimedia players can connect to your Icecast2 server. 1.4.2.1.2.1 Streaming clients As has already been mentioned, for a streaming client to connect to Icecast2, it must know the streaming source password (set in the icecast / authentication / source-password), the address: port (127.0.0.1:8000 if it’s running on the same desktop PC) and, finally, the arbitrary mounting point. For example, in the above-shown VLC batch file, start vlc.exe --sout-shout-name="Iskelmä Radio" --sout-shout-description="Iskelmä Radio (Finnish)" http://217.30.180.250:8050/ :sout=#transcode{acodec=mp3,ab=32,channels=2}:dupl icate{dst=std{access=shout,mux=ogg,dst=source:mennpwd@127.0.0.1:8000/iskelma}} the bold text, source:mennpwd@127.0.0.1:8000/iskelma, contains all this information. Here, “source” is the username by default for streaming clients like VLC or the Oddsock.org apps. “mennpwd” is the password I use; “127.0.0.1:8000” is the IP address and port number of the Icecast2 server. In this example, it’s running on the local PC; hence the localhost address. Finally, “iskelma”, as we’ve already seen, is the mount point name. 1.4.2.1.2.2 (Mobile) receiver clients As has already been mentioned in section “1.4.2.1.1 Mount points”, you can either directly enter the URL (of the form http://your desktop computer IP : port (8000 by default)/mount point) into the player or, alternatively, can create a .PLS and/or (preferably extended, so that it also contains the station name) .M3U file with the URL and a description. Note that these playlist files can have several URLs with separate descriptions. (Also note that I only use PLS files as examples in this tutorial because Nokia Internet Radio doesn’t support M3U files.) An example PLS file having seven entries: [playlist] numberofentries=7 File1=http://111.222.333.444:1234/ Title1=Radio Peili Length1=-1 File2=http://111.222.333.444:8000/iskelma Title2=Radio Iskelma Length2=-1 File3=http://111.222.333.444:1236/ Title3=Arkisto Length3=-1 File4=http://111.222.333.444:8000/radioVaasa Title4=Radio Vaasa Length4=-1 File5=http://111.222.333.444:8000/rspo Title5=RSPO Length5=-1 File6=http://111.222.333.444:8000/klf Title6=KLF Length6=-1 File7=http://111.222.333.444:8000/rhesa Title7=Radio Helsinki Length7=-1 Version=2 Note that it has two non-8000, that is, two non-Icecast2 ports: 1234 and 1236 in the first and third records. I’ll elaborate on this a bit later, in the VLC section. All the other URL’s point to the same Icecast2 server with, of course, different mount points. Colleting your favorite stations into one PLS file is pretty much useful because, then, it’ll become far easier for you to switch between the radio stations after opening the playlist file. For example, the above PLS file is rendered by Nokia Internet Radio the following way: ![]() By TCPMP, this way: ![]() and, by CorePlayer, this way: ![]() Note that the two latter apps automatically start playing the first station in the playlist (Nokia Internet Radio doesn’t); if it’s a problem, you will want to separate your stations in separate PLS (or M3U) files. Also note that you can transfer these streams to your built-in "favorite" playlists in all these radio clients. Then, you won't need to click / import PLS files more than once. | |||||||
|
Microsoft MVP - Mobile Devices, 2006, 2007. See my PPC & SP blog HERE.
|
||||||||
|
|
|
| sponsor links |
|
|
#2 (permalink) | |||||||
|
Contributing Reviewer ![]()
|
1.4.2.2 Oddsock.org apps
Oddsock.org is the most important source of both MP3- (for Symbian users, the best solution) and HE-AAC v2- (for WM users) compliant encoding / transcoding server with direct output to Icecast. Note that for some of them (except for the most recommended WinAMP plug-in version) to work with HE-AAC v2, you’ll need to copy two DLL’s to the home of the app (and NOT to the WinAMP home directory, no matter what the installer states): enc_aacplus.dll and nscrt.dll from the WinAMP plugins directory and home, respectively, if you’ve already installed WinAMP (you don’t need to install it for these apps to work). You’ll find all the two DLL’s (along with libfaac.dll – see next paragraph) in THIS RAR file. After decompressing, just copy the DLL’s to the home (c:\Program Files\StreamTranscoderV3\ or C :\Program Files\OddcastV3 if installed on the c: drive in an English-language Windows). For simple AAC(-LC), you’ll only need libfaac.dll if you plan to use it at all. I wouldn’t – it doesn’t seem to work with mobile clients. TCPMP announces it’s plain incompatible with the stream; CorePlayer and Nokia Internet Radio just endlessly buffer it – without playing anything. With desktop clients (for example, WinAMP) that do play it back, the sound is seriously distorted and is MUCH worse than with even MP3, let alone Ogg. I, however, have included it in the RAR file, should you still want to play with it. (Again, it’s not recommended.) For MP3 streaming under OddcastV3, you’ll need to acquire the Lame MP3. I haven't included it in the RAR file. 1.4.2.2.1 StreamTranscoderV3 One of the most useful, albeit in no way flawless Icecast2 source clients is StreamTranscoderV3, which, as the name implies, transcodes an input radio stream to another format. Note that the input stream must be either an MP3 or an OGG one. That is, it can’t transcode RealAudio and WMA streams at all. For the latter two, you must use other alternatives: Orb (if the problems – lack of HE-AAC v2 and MP3 etc. – aren’t an issue), OddcastV3 or WME (the latter if RealAudio is the source). 1.4.2.2.1.1 Installation, configuration After installing the app, go to c:\Program Files\StreamTranscoderV3\ and, after you’ve copied the AAC DLL’s in there (if you want to transcode into HE-AAC v2), start streamTranscoderUIv3.exe. (Note that you can also do the same by clicking the streamTranscoderUIv3 icon on the desktop. It isn’t put in the Start menu.) Using the ST3 is pretty straightforward. All you need to do is giving it the (source) stream URL (for example, http://81.175.250.3:8000/) in the uppermost text input field, pressing the upper arrow in “Num encoders” so that it becomes at least 1 and double-clicking the resulting, just-displayed “Disconnected” row in the main text area. An instance of Notepad pops up with an XML configuration file. In there, first, you must set the source password in the fifth row (ServerPassword=sourcepwd in the screenshot below) and the mount point to your choice (in the example, /iskelma) in the (sixth) row just under it. Then, set the “Encode” attribute in the “# Output codec selection” section to “AAC Plus” and set BitrateNominal to, say, 32 (corresponding to 32 kbps). Note that you don’t need to alter the BitrateMin and BitrateMax parameters at all – the HE-AAC v2 encoder doesn’t take their value into account. Also note that you don’t need to touch the parameters in the “# AAC (FAAC) specific settings” section either. It’s only with streaming in AAC-LC (that is, using the old faac.dll) that these values have any meaning. For ~32 kbps streams, then, you’ll need to use AACQuality about 10 instead of 100. Again, streaming plain AAC-LC with ST3 is in no way recommended – even MP3 produces far better results at these low, GPRS-friendly bit speeds. ![]() The above configuration assumes you want to stream HE-AAC v2 contents. If you’d prefer MP3 (because, for example, you’d like to stream to Nokia Internet Radio, which, currently, doesn’t support HE-AAC v2 – or, for that matter, would like to use a non-HE-AAC v2-compliant Windows Mobile radio app), of course, you’ll need to use the string “MP3” in the Encode attribute. Then, in addition, you will want to reduce the sampling frequency as well. You shouldn’t do the same with HE-AAC v2: there, you must use the default 44.1kHz; otherwise, the encoder will fail right at connecting. Note that you may also want to change at least the “ServerName=This is my server name” attribute so that meaningful values are displayed as the server name in your clients, instead of “This is my server name”. After this, you can press the Start button and the streaming to Icecast2 will start: ![]() You can easily check this with the Icecast2 console: ![]() As can clearly be seen, Icecast2 is already broadcasting the stream coming from the stream source; in this case, StreamTranscoderV3. 1.4.2.2.1.2 Problems with ST3 Most importantly, it doesn’t seem to have a (working) dynamic volume limiter. This means some sources will be far too loud, which results in very annoying distortion in the transcoded stream. Some affected radio streams are as follows: Basso, Iskelmä, and, to a lesser degree, Radio Voima. You will NOT want to transcode these (and similar) radio stations with ST3 but go for an alternative solution; for example, OddcastV3 or, if low-bitrate MP3 is sufficient / preferable (instead of HE-AAC v2), VLC. Second, the transcoded version of original OGG streams (as opposed to MP3 ones), like Radio Suomipop or Radio Classic will have heavy skips, while their MP3 stream (HERE and HERE, respectively) of the same stations work OK. It seems ST3 has similar problems with other OGG sources as well. If you encounter cases like these, go for an alternative solution - fortunately, there’re several of them. 1.4.2.2.2 OddcastV3 It’s the WinAMP plug-in version of OddcastV3 that I recommend the most of all these transcoders, particularly when you are a Windows Mobile user and only have GPRS access and, therefore, would like to prefer HE-AAC v2 all the way. It has unmatched capabilities, which, paired with the excellent remote controllability features of WinAMP, make OddcastV3 without doubt the best solution for transcoding. First, I explain the usage of the WinAMP plug-in; after this, the standalone one. You can download both HERE. Select either the WinAMP or the Standalone version. I heavily recommend the former; only go for the standalone version if you know, for some strange reason, you hate WinAMP and would never touch it because it can be used with any sound source, not only WinAMP. 1.4.2.2.2.1 WinAMP plug-in version This version is integrated into WinAMP and should be accessed / controlled from in there (not as a separate entity, unlike with the standalone version). After installation, start playing a stream (the one you’d like to transcode) in WinAMP (this is VERY important – something must be played back in order the plug-in to be able to connect to Icecast2), go to Options / Preferences / Plug-ins / DSP/Effect and click oddcast DSP v3 (dsp_oddcast_v3.dll): ![]() Click Add Encoder and, inside it, configure everything like with the standalone version of the same OddcastV3. That is, click “Add encoder” first. After adding one, double-click it (just like in ST3) to configure the outgoing stream. It can be configured in a much easier way than ST3: instead of having to edit an XML file, you can edit the stream encoding parameters in a dialog box. For example, the following dialog box shows a 32 kbps HE-AAC v2 stream going to the Icecast2 server installed on the localhost, using the source password “menneisyyspwd” and using the mount point /iskelma: ![]() After this, just click “Connect” in the main OddcastV3 GUI and the streaming will start right away. Note that, as, by default, it uses the output of WinAMP, you don’t need to click the crossed-out mike icon, One of the best features of the plug-in version is the ability to directly transfer song-specific metadata. Several Internet radio stations (for example, 977music.com) stream title-specific metadata along with the streamed audio. An example of this is shown HERE, showing both the stream source (WinAMP in the background) and the mobile client running in SOTI's excellent Pocket Controller). Very few alternative technologies are capable of this feat – for example, anything based on the system audio mixer (and not direct stream transcoding) isn’t, including the standalone version of the plug-in. A screenshot of the WinAMP plug-in version of OddcastV3 streaming the direct output of WinAMP: ![]() The problem with this plug-in is the lack of support for original streams not played back by WinAMP; most importantly, RealAudio. However, you can stream them too (if you plan to stick with this stream source) if you quickly change the audio source from the WinAMP (internal) DSP to the system-level mixer of the PC in exactly the same way as with the standalone OddcastV3 client. This will also be elaborated on in the next section. Note that, as with all the other Oddsock.org apps, the WinAMP plug-in OddcastV3 supports several output streams of the same input. The following screenshot shows it producing both a HE-AAC v2 and a plain MP3 stream, both at 32 kbps: ![]() There are many cases you’ll want to make use of this feature. Just an example. I, generally, keep several Windows Mobile and Symbian handsets with me. Without having to remote control my desktop computer with a fully-fledged, bandwidth-hungry desktop controller (see their Bible HERE), I can quickly select from between the Windows Mobile-compliant, high-quality HE-AAC v2 and the Symbian-compliant, low-quality MP3 stream. That is, I don’t need to use the “lowest common denominator” approach to streaming (that is, streaming using the low-quality MP3) when I don’t know beforehand what operating system I will want to listen to radio stations – I can select the right one at runtime. 1.4.2.2.2.2 Standalone OddcastV3 client ![]() This utility is vastly different from both ST3 and the WinAMP plug-in version of the same OddcastV3 introduced in the previous section in that it gets its source from the sound card mixer and not an external stream (as with ST3) or directly WinAMP (as with the WinAMP plug-in version of OddcastV3). That is, only stick to this if you in no way want to use WinAMP as the stream source. This also means, compared to the WinAMP plug-in version, it has an extra configuration step (in addition to the initial AAC / MP3 encoder DLL copying to the home, C :\Program Files\OddcastV3, of course, which is also necessary with ST3). After installation, start it and set it up in exactly the same way as the WinAMP version. In addition, however, you’ll also need to set the default audio mixer of your desktop PC in the “Live recording” group. On my desktop PC, it’s “Realtek HD rear audio input”; on yours, it will be something else. If you’re a newcomer to utilizing the built-in audio mixer of Windows, do the following in order to be absolutely sure you’re using the right input (and not, say, the default mike): click the loudspeaker / volume icon in the system tray (if you can’t find it, go to Start / Programs / Accessories / Entertainment / Volume Control), select Options / Properties and select the input mixer device you’ve defined (see the “Mixer device” drop-down list): ![]() Now, click OK and make sure the “Stereo Mix” checkbox is ticked in: ![]() In the above screenshot, the mouse cursor is just hovering over the checkbox so that you can easily find it. 1.4.2.3 VideoLAN VLC There may be cases when you will want to prefer VLC to the other solutions, particularly when you have several streams you’d like to broadcast at the same time without relying on remote switching between them from a Web browser running on your handset. In this regard, VLC is probably the best solution. Also, it’s heavily scriptable, which means, in general, you only need to create a batch file to quickly start transcoding. You just click on a batch file and a whole slew of transcoding processes start. It, while is able to act as an Icecast2 / SHOUTcast source client, can also be directly connected by clients (it has server functionality too). Then, the stream it sends out won’t be SHOUTcast/Icecast2-compliant, which means for example no compatibility with Nokia Internet Radio. However, for other (for example, Windows Mobile) clients, it will still be usable and connectable. This is the mode you’ll need to use when transcoding WMA. Finally, opposed to Orb (exactly like the other clients in here), it is completely SHOUTcast-compliant when used with an external Icecast2 client, which means it’s able to broadcast (some – unfortunately, not all!) SHOUTcast streams. This also means it’s fully compatible with Nokia Internet Radio (currently, the only really usable SHOUTcast client) on Symbian – and, of course, all the SHOUTcast-compliant clients on Windows Mobile. However, it has problems as well; most importantly, it in no way supports HE-AAC v2 output (transcoded) streams. In addition, it’s not possible to remote control it, unlike with WinAMP-based solutions (most importantly, the most recommended OddcastV3) or Orb. Finally, VLC only supports (also see THIS) one codec type (of the many), Cook, of RealAudio. This means it’s unable to play back for example Sipro Lab Telecom ACELP-NET (sipr) streams used by, for example, YLE (example stream at rtsp://ra.yle.fi/live/radiopeili.rm). As there are a lot of tutorials explaining how the GUI should be used for streaming, I don’t elaborate on these issues. Instead, I provide you with something that you’ll find much more interesting, particularly if you need a way to mass-invoke the encoding process. Here, I show you how you can invoke VLC from the command line to quickly start transcoding (as opposed to the GUI-centric tutorials written by others). I’ve already shown you a batch file (excerpt) in section “1.4.2.1.1 Mount points”. Let’s go over it again; this time, I explain what the parameters mean. First, these two commands (preferably when put in a batch file) invoke the main executable, vlc.exe, and pass several parameters to it, telling it which source stream to transcode and what Icecast2 server to send the transcoded stream to. In addition, it has additional parameters (static station names). Let’s start with the first command, start vlc.exe --sout-shout-name="Iskelmä Radio" --sout-shout-description="Iskelmä Radio (Finnish)" http://217.30.180.250:8050/ :sout=#transcode{acodec=mp3,ab=32,channels=2}:dupl icate{dst=std{access=shout,mux=ogg,dst=source:menn pwd@127.0.0.1:8000/iskelma}} Here, I used the Windows batch command “start” to start vlc.exe in the background. Should I have left this out, the batch file wouldn’t go on after invoking the first vlc.exe – that is, only the first stream would be transcoded. --sout-shout-name="Iskelmä Radio" instructs vlc to use a user-defined string, “Iskelmä Radio”, to identify the station. The next parameter, --sout-shout-description="Iskelmä Radio (Finnish)" provides a somewhat more elaborate description of the station. These are in no way mandatory parameters. (Note that there're other SHOUTcast parameters usable with VLC; they, however, didn't work with me.) The next parameter, http://217.30.180.250:8050/, is the source stream’s URL and, therefore, much-much more important than the first two. Finally, the last parameter: :sout=#transcode{acodec=mp3,ab=32,channels=2}:dupl icate{dst=std{access=shout,mux=ogg,dst=source:menn pwd@127.0.0.1:8000/iskelma}} is pretty much intimidating at first. Don’t be afraid, however, I explain it all. The first section between the {} marks, acodec=mp3,ab=32,channels=2, tells the system to 1, use the MP3 encoding; 2, use 32 kbps and, 3, use two channels (stereo) in the transcoded stream. This section is very easy to modify; for example, if you want a mono MP3 stream, just change 2 to 1 after channels=. This will give you somewhat better audio quality and is preferable when you wouldn’t, otherwise, benefit from the source being stereo – for example, with mono talk programs. However, if you listen to streamed music via headphones, you’ll want to stick with the stereo mode, even at the expense of the (slight) sound quality degradation. Similarly, if you need a 16 kbps MP3 stream instead of the 32 kbps one, just change 32 to 16 after ab=. (Then, you’ll also want to switch to mono mode, of course.) The contents (access=shout,mux=ogg,dst=source:mennpwd@127.0.0.1: 8000/iskelma) of the inner parentheses after “duplicate” defines some other parameters; namely, the target of the stream, which, in this case, is an Icecast2 server. “source” is the standard name for Icecast2 (‘back-end’) stream sources; mennpwd is the password I use. 127.0.0.1:8000 is the address of the Icecast2 server I (and, most probably, you also will) use (that is, as can clearly be seen, it’s running on the same PC) and /iskelma is an old friend of us: the mount point. Based on the information above, you’ll recognize everything in the following direct invocation batch file snippet: start vlc.exe --sout-shout-name="Radio Vaasa" --sout-shout-description=" Radio Vaasa (Finnish)" http://webcast.vlp.fi:8000/radioVaasa :sout=#transcode{acodec=mp3,ab=32,channels=2}:dupl icate{dst=std{access=shout,mux=ogg,dst=source:menn pwd@127.0.0.1:8000/radioVaasa}} Now, let’s take a look at a somewhat different batch file snippet: two VLC invocations that don’t use an external Icecast server as the middle tier in the transcoding process, but opens two ports in itself and waits for incoming client connections. (In this way, it implements the classic two-tier, client-server architecture.) start vlc.exe mms://mediau.yle.fi/liveradiopeili :sout=#transcode{acodec=mp3,ab=32,channels=1}:dupl icate{dst=std{access=http,mux=mpeg1,dst=:1234}} start vlc.exe http://194.252.88.103/eanettiradio :sout=#transcode{acodec=mp3,ab=32,channels=1}:dupl icate{dst=std{access=http,mux=mpeg1,dst=:1236}} These commands are pretty much similar to the previous ones, except for: 1, they completely lack the --sout-shout-name and --sout-shout-description parameters (they can only be used together with an external Icecast2 server) 2, here, the dst (destination) parameter only has one port number (1234 with the first and 1236 with the second commnd) – and nothing else. This instructs VLC to open up server ports in itself, waiting for listening clients (for example, your handset) to connect. Instead of making an external Icecast2 server do this task. Why would you want to use the second case? It’s pretty easy: there are streams that VLC is just unable to correctly transcode into an Icecast2-compliant format. WMA streams (just like the two in this example; that is, THIS and the WMA stream at mms://mediau.yle.fi/liveradiopeili) too belong to this category. In these cases, you can still directly access VLC. Incidentally, if you encounter Icecast2 vs. VLC compatibility problems with some source stream types (like the above), you can easily determine if a given stream type can’t be streamed to VLC by checking out the total_bytes_read (highlighted HERE) of the particular stream. If it’s 0 (as in the just-linked screenshot), then, the stream is just not compatible with Icecast2. WMA streams are exactly like these. Note that I haven’t managed to test the RealAudio transcoding capabilities of VLC because of the limited compatibility. In this regard, Orb fares without doubt the best – that is, use Orb to transcode an initially RealAudio-only stream into a more handset / NAT-compliant one. 1.4.2.4 Windows Media Encoder (WME) This free, system audio mixer-based (meaning it also needs a system-level audio source like WinAMP) and easy-to-use tool doesn’t require an outgoing Icecast2 server. That is, you can directly connect to it from your handset. However, its usability is pretty much hampered, particularly if you are stuck with GPRS because HE-AAC v2 delivers MUCH better sound quality at the same (low, GPRS-compliant) bitrates. Therefore, you’ll always want to prefer HE-AAC v2-capable transcoding solutions (for example, WinAMP with the OddcastV3 plug-in and an external Icecast2 server) to WME. I don’t elaborate on configuring it in server mode because
The only reason I include it in this Bible (and in the final Comparison Chart) is that you can compare its capabilities with the competing technologies. 1.5 Remote controlling WinAMP As has already been seen, currently (before Orb finally introduces Icecast2-based HE-AAC v2 streaming) WinAMP, together with the OddcastV3 plug-in, is probably the best way to transcode your streams. And, if you use a transcoder getting its audio input from the operating system mixer, you may still want to prefer WinAMP because of its high compatibility ratio (of the major radio streaming formats, it’s only RealAudio that it doesn’t support; Windows Media Player is far worse in this respect, unless you manually install additional codecs for it) and excellent remote controllability. As using WinAMP (both with the OddcastV3 plug-in and a third-party, mixer-based encoder like WME or the standalone version of OddcastV3) it’s strictly a one-stream-at-a-time solution (as opposed to VLC or StreamTranscoderV3), you MUST know how it can be remotely controlled from your handset when you want to switch to another station. Fortunately, there’re several remote media controller tools compatible with WinAMP. I’ve elaborated on all of them in the Remote Media Controllers Bible. Please make sure you VERY thoroughly read it and go for a solution that supports both WinAMP and remote, TCP/IP-based access. 1.6 Other goodies All of the reviewed tools allow for not only transcoding radio stations, but also saving the stream to your desktop computer, into a file. Note that, however, none of them has the same functionality as that of Streamripper. That is, even if they support music metadata, they don’t create separate files based on them. As has already been mentioned in my previous, radio streaming-related “sneak peek”, Resco’s excellent SHOUTcast client, Pocket Radio also supports this on Windows Mobile. 2. Feature & comparison chart In the following chart, I compare the reviewed applications. The three main groups are as follows: Input compares the input formats they’re able to transcode; Output compares the streaming formats they are able to produce and, finally, Misc elaborates on issues already touched on in this Bible. ![]() ![]() ![]() 3. Verdict As usual, there’s no winner because several factors may influence your decision. Let’s walk over some of them.
| |||||||
|
Microsoft MVP - Mobile Devices, 2006, 2007. See my PPC & SP blog HERE.
|
||||||||
|
|
|
|
|
#4 (permalink) | |||||||
|
Contributing Reviewer ![]()
|
Yeah, the usual problem with the Menncyclopedias ![]() It's worth printing it out and reading it when you have more time. If you (or anyone) want(s) to optimize your/his/her radio station streaming, you can do it very easily, based on this Bible. | |||||||
|
Microsoft MVP - Mobile Devices, 2006, 2007. See my PPC & SP blog HERE.
|
||||||||
|
|
|
|
|
#6 (permalink) | |||||||
|
Contributing Reviewer ![]()
|
UPDATE (01/03/2008): as an addition to bullet 3 of section “1.2 When you prefer optimizing an, otherwise, working stream...”, I’ve made some 3G vs 2G power consumption tests on the HTC Trinity / P3600 running the official February 2007 ROM version so that I can prove that the “streaming over 3G consumes way more power than streaming over pre-3G connections, even at the same bitrate” rule-of-thumb is right with every single chipset used in contemporary handsets. The results speak for themselves:
![]() The first section shows playing back a stream over HSDPA, the second shows playing over exactly the same HE-AACv2 stream over GPRS, in TCPMP. Let’s do some math: ~500 mA / ~280 mA = 78%! That is, if you stick with 3G on the Trinity for streaming, your battery life will be about 80% worse! CPU usage vs power usage Still looking at the above screenshots, the third (and all section after that) shows switching from the more CPU-intensive HE-AACv2 stream to an MP3 stream (still using GPRS – as in the next benchmarks) to find out whether the decreased CPU usage results in any change in the power usage. As can clearly be seen, there’s not much difference – they’re unmeasurable. In the following screenshot: ![]() I’ve enabled A2DP audio transfer to stereo Bluetooth headphones. A2DP, for some (for me, unknown) reason, is very CPU-intensive on all Samsung-based Windows Mobile devices. As I’ve already stated in some of my articles (see for example THIS), it raises the CPU usage by about 50 (fifty) percents. (For comparison, at 400 MHz, the same Microsoft A2DP implementation “only” results between 10...20% of CPU usage increase on Intel Xscale (pre-PXA-3xx, where I still haven’t tested this) and on TI OMAP CPU’s.) Therefore, switching on A2DP is a great way to quickly “bump up” the CPU usage. In the first (short) test, I’ve continued playing the same MP3 stream (for quite a short time; therefore, the (relative) results aren't very dependable); in the second (much longer) test, I switched back to the original, more CPU-intensive HE-AACv2 stream. Then, the CPU usage was constantly at 100% (again, "thanks" to the huge CPU usage of A2DP on all Samsung-based Windows Mobile handsets) and the audio started to stutter. As can be seen, there was no measurable increase in power usage, compared to the case of only about 30% CPU usage. This certainly shows the Samsung CPU’s do have some strengths; albeit, in many other ways, they’re definitely behind the current crop of CPU’s. For example, they still use the ancient ARMv4T architecture (approximately the same as that of the 9-year-old Intel StrongARM - yes, the CPU used in the first, h31xx/h36xx-series iPAQ's released in May 2000), while
| |||||||
|
Microsoft MVP - Mobile Devices, 2006, 2007. See my PPC & SP blog HERE.
|
||||||||
|
|
|
![]() |
| Tags |
| bible, radio, stream, transcoding |
| sponsor links |
| Thread Tools | |
|
|