[Util] Open PLS Playlist in Windows Media Player

[UPDATE: I finally built an installer and added some error handling, so this should  be  easier to set  up and use. Download the setup from http://www.codeplex.com/openplsinwmp.

Some web radio stations (like the super cool SomaFM) only offer PLS playlists, and Windows Media Player doesn't support PLS playlists even though they're about the simplest file imaginable.

I whipped up a simple app (OpenPlsInWMP) that parses the stream url out of a PLS file and shells out to WMP, so if you associate PLS files with OpenPlsInWM it'll seem like Windows Media Player decided to play nice with PLS files.

It's working pretty well for me. If the stream is interrupted you may have to kill WMP and click the PLS link again - it doesn't seem to restart as well as with ASX streams. YMMV.

Download It [updated]
Dirt Simple Code:
using System;
using System.IO;

namespace Jon.Galloway.Wrote.Me
{
    class OpenPlsInWM
    {
        [STAThread]
        static void Main(string[] args)
        {
            if (args.GetUpperBound(0) > -1)
            {
                string filename = args[0];
                using (StreamReader sr = new StreamReader(filename)) 
                {
                    string line;
                    while ((line = sr.ReadLine()) != null
                    {
                        if (line.ToLower().StartsWith("file1="))
                        {
                            string url = line.Split('=')[1];
                            System.Diagnostics.Process.Start("wmplayer.exe",url);
                            break;
                        }
                    }
                }
            }
            else
            {
                Console.WriteLine("Usage: OpenPlsInWM \"playlist.pls\"");
                Console.WriteLine("Associate PLS file extension with this application to allow Windows Media Player to play them.");
            }
        }
    }
}

95 Comments

  • Hi there. How do I "associate PLS files with OpenPlsInWM"? Thanks in advance!

  • Joe - One way to associate PLS files with OpenPlsInWM:

    1) Save a PLS file to your desktop

    2) Right click / Open with

    3) Browse to where you saved OpenPlsInWM.exe

    4) Check the "Always use the selected program..." checkbox.

    5) Hit okay.

  • Absolutely brilliant program. Thanks a lot!

  • this rocks... thanks for making it... I don't like having multiple pieces of software on my machine, all doing the same thing, and winamp isn't as good as WMP all around.... thanks again

  • nice program. i just have one small problem... i use live365.com which requires a login. in linux, xmms handles this fine but wmp+openplsinwmp doesnt seem to be able to. any ideas?

  • I encountered the error message C00D11CD through windows media player. I'm running Media player 9.0 with windows XP.



    Any ideas? I'd be delighted if this works.

  • Jason -

    Man, that C00D11CD error is a pain. It's basically a "catch all" message meaning something bad happened. I looked at this a little, but don't have any ideas yet.

  • Pen-n-Paper -

    Interesting - I hadn't thought about Live365 for this - it can work with WMP as an internal player. I'll have to poke around when I get a chance. If you beat me to it, let me know.

  • This works great! Thanks for sharing!

  • Awesome program...works great!

  • Hey it sounds cool, but I have Windows Media Player 10.00.003473 and Windows XP SP2 so do you think you can make it support the new Windows Media Player?

  • davo -

    i'm running XP SP2 and WMP 10.00.003473 and it's working for me. can you give me info on what problems you're having? did you read the other comments for things other users have run into?

  • I'm using wmplayer 11, and it's working fine with it. Only the problem is, that it can't log into live365.com.
    I can listen live365 if:
    1. copy the string beginig http://......
    2. open wmplayer -> file -> open url, and paste the full address.

  • Thx :D
    Very good job

  • This program doesn`t work as it should do.
    I know what i`m talking about.
    It doesn`t support WMP 10, and when i downgrade to 9.0, it won`t work at all.
    Maybe a new fix for your program.
    I tried it at several sites, and always does your program appear wit great results, but ity doesn`t work with wmp 10.
    Tried on several pc`s

  • actually, it does work with WMP 10. because thats what i'm using and have no problems at all.

  • He he he excellent! Using the Version 11 Beta of WMP and it works fine :-)

  • I am so glad people share

  • I love this man. Just what I was looking for and so easy to use.
    Thanks.

  • I am using Windows Media player 10.

    And I would so love to be able to play pls files. Please update this thing! I'm an idiot, and do not have the foggiest idea how it works. If it doesn't have gears and bearings, I'm lost.

  • I have no idea how to use this. I enter the .pls location in my browser and hit enter and it says it cant play it. I try to save it as a file and there's no "open with". There's only "send to"

  • Totally Cool, you are my Person Of The Week!!!!!

  • Agreed with Steve above - would love to see the "Now Playing" feature

  • Great.
    Thanks man.

  • @Das - That's exactly what the program does. I distribute the source with it, so you can see. The point is that it's a stupid waste of time to have to download the pls file, edit it, find the mp3 stream, and open it in Windows Media Player. What's the point of doing that? Why not use a tiny program to do that for you? If you only want open one pls stream the manual solution may be fine, but try browsing through shoutcast that way.

  • Very nice tool!! Works fine, though it has a hard time playing AAC+ files, it gives an error and than play it anyway ;)

    tnx!

  • Jon:
    Since installing .PLS APP and .NET Framework, I lost all audio. Any ideas ?
    Thanks.......

  • This is great.Keep up the good work.

  • Dude you rule! I've been looking for something to make this easy for a while!

  • great program... but everytime i open a pls. file a cmd.window will flash before the media player play, is it normal?

  • I am trying to load a .pls link with your program and get the following error message:

    "Windows Media Player cannot play the file. One or more codecs required to play the file could not be found."

    OW: Windows XP Pro Version 5.1 SP2
    Windows Media Player version 10.00.00.4036

  • Ignore my above comment, silly me, forgot to reboot after install.

  • Uh oh, the link to download is broken!

  • @Chris Hills - Thanks! I updated the link.

  • @hara - Thanks, I updated the other download link. You'll need Javascript enabled to download from http://tools.veloc-it.com.

  • The download link still does not work. Also, I got the app from another site but no function on wmp 11. Hope you can get it working soon. I like ultra player but I don't like having multiple apps. Oh check out BS Player. Can I modify the source to play .pls is BS.

  • @Chad - Do you have Javascript disabled? I just downloaded it from the site.

  • I have the .PLS file associated with your program, and it parses the file to open in WMP11. However right when that happens and mp opens i get "You've encountered error message C00D109B" "Windows Media Player cannot play the file. One or more codecs required to play the file could not be found."

    i have the orbit plugin and the k-lite pack. Am I missing something?

    thanks for the hard work.

  • Hi could somebody sent the file to me via email. gonzalo_duque@yahoo.com

    When I tried to download it nothing happens

    thanks

  • I need to play vedio files which is stored in webserver onclick event. How can I do this in asp.net 1.1......Thanks in advance

  • Hey thanks alog for this app, I would never say WMP is better than winamp... If you use winamp these days you wouldn't have anyway to say that... The sound quality for one is superior on my X-Fi with winamp. It glitches less then WMP, especially with streaming music. Theres so many things winamp can do by default that WMP needs to be configured for, or apps like these made to get it to do a simple task... If you dont want multiple programs on your computer, delete WMP and use winamp... Then we dont have to waste our time MAKING windows media player do what it should by default... Just my two cents.

  • Please host this file somewhere else so we can grab it

  • I fixed the link on the download page.

  • i got the error "the specified module could not be found"

    what should i do in order to fix this problem?

  • Excellent. Thanks.

    Anyone know how to stream video via shoutcast to media player?

  • Im stuned to see all those comments in favor of WMP, instead of WINAMP. is this what shows the grasp of M$ since some of you probably cant install winamp at work bcos you may not use non M$ programs? and since WMP comes "free" installed with u know what.
    eat fish... lol.
    ps. Jon good work! no disrespect! was just looking for a way to get rid of the WMP streaming annoyance and try to get it working in Winamp and came across your site. since many windows people use wmp you helped a lot of them and thats good work.
    -ps english no good me sorry me dutch- :)

  • @Obelix - No disagreement. I switched to Winamp when WMP 11 came out.

  • Since I can't get Winamp to run reliably in Vista, this application has made living with Windows Media Player much more bearable. Thanks tons!

  • hi Jon, this worked like a charm with wmp11. thanks!

  • Thx for sharing it but it cant show song title

  • Thanks. Worked as described. Now to get more streaming stations to fly in linux....a different story. This worked well.

  • Quick question, I was playing around with the included file "OpenPlsInWMP.cs" that comes with the installer and trying to get it to do more stuff and noticed that you include both MeesageBox and Console code, is there a newer version coming, or should I add a reference to Sys.Win.Forms.


    Thanks,

    jim

  • You can download Live365 right into WMP10, not WMP11. I followed the notepad cut n paste and it worked great, even for WMP11 which is only wants to push "Urge." So, either roll back to WMP10 or do the notepad thing. Works great.

  • Okay after a late night I figured out why it would not work.

    The program did not automatically associate itself with the pls files, rather WMP bypassed the openpls altogether.

    Once i realized that I changed the association and Presto. Works like a charm.

    Thanks John for a great piece of Work...

  • Works awsome,no need to use WinAmp,thanks for
    giving that gem for free.

  • hi - thanks for sharing this tool - i'm a bit stuck trying to get it working with live365 though - using wmp10 and XP, would like to use to add radio stations from live365 to wmp so that I can then stream them to a media streamer.
    OpenPls seems to work a treat but I keep getting aplayed an audio file saying my session is invalid - assume this is something to do with login on live365?
    any thoughts?

  • so simple, yet makes something i wanted to do possible. thanks for doing this and offering it.

  • dude you are the man!!!

    this fix works great. u r awsome!

  • Hi Jon,is there a new version for Vista 32 bit,or the actual version works with it?,thanks
    for any information.

  • Jon, outstanding little program. Worked 1st time perfectly (as predicted) on my P4 XP-Pro SP2 machine at work running WMP9. The basic theory of parsing the stream url out of a PLS file then opening in WMP worked as well but obviously without the convenience of the program's file association.

    Before installing the program on my PCs at home, I tried the parsing of the stream URL routine to see if WMP8 would work. It didn't work. Could this be because WMP8 is incapable of playing playlist files (.pls) using this technique or perhaps that the Microsoft.NET framework is not installed? Apologies in advance...I did not check to see if it was there on the home machines. I only read that it was required just prior to sending this note. The version of .Net on the work PC is v2. Home PCs are all XP-Pro SP1a w/WMP8.

    Any thoughts?


  • works like a CHARM! bless you.

  • The program is working great in Windows Media Player 11, however would like to know how can I get it to display the artist name and son

  • nice programm,works fine ( i just gets an error message because of acc blalba but this seems to be my firewall).thanks:]

  • Simple solutions:
    Play PLS file in Media Player Classic
    Download Codec Pack free:
    K-Lite Codec Pack 3.4.5 Full
    and associate PLS files with
    Media Player Classic (installed with K-Lite)
    ------------------------------
    and K-Lite Codec Pack allows you to play almost every movie file
    in Windows Media Player

  • Will it work with PLS files that simply list a series of MP3 files located on a local or network drive? I have ripped most of my CDs to MP3 and created PLS files for each. I would like to try M3U so I can listen in WMP but this is hundreds of files so an easy conversion tool would be welcomed.
    Cheers

  • Nice job! Haven't done any programming in years, so have no idea how to do this but - how could you suppress the cmd window? Set it to run minimized might be less obvious. Is it the console.writeline statements that cause it to pop up? Just curious, as it works exactly as described with XPProSP2 and WMP11.

    Thanks!

  • works perfectly.
    firefox, wmp11, xp sp2.
    awesome work.

  • Hello and thanx for a great program.
    AAC+ streams doesnt work, not in WMP11 anyway.
    The workaround is to drag the saved pls file into the playlist window and doubleclick. Still it would be nice if it could work with your program.

  • Genius. Thats great works nicely. Thanks dude.

  • You're program is awesome. Even winamp wasn't running the .pls file I was trying to get to.

    I have Windows XP and WMP ver. 11.05721.5230, if you're keeping track. :-)

    Thanks a bunch!

  • you the man!, thank-you so much for this really useful app....absolute brilliance.

  • Great Utility!!!!
    I like the toolbar option of WMP and have been listening to Bluemars radio, but they use the pls format. Thanks to you I can use the WMP toolbar for Bluemars.

  • Wow, fantastic little program- works like a dream! Thanks!

  • Hi I have tried and tried to get this radio station to play in real player in winamp player and now windows media player that link you sent i could not get it to work i have windows xp and you said something about java enabled how do i find out if it is,,,thanks in advance

  • I get an error page when I click on your download link:

    DotNetNuke Error: - Version 04.06.02

    Index was outside the bounds of the array.

  • When I try to download your compiled proramme I get this:
    A critical error has occurred.
    Could not find file 'D:\Websites\tools.veloc-it.com\Portals\2\Repository\OpenPlsInWmp2Setup.45a14f27-82ff-4ef9-9b6e-3a29d3d34c26.zip'.

  • When I go to the place you specify in your link and try to get the programme, I get the following:

    A critical error has occurred.
    Could not find file 'D:\Websites\tools.veloc-it.com\Portals\2\Repository\OpenPlsInWmp2Setup.45a14f27-82ff-4ef9-9b6e-3a29d3d34c26.zip'.

    regards: Nick

  • this is soo HACKS!

  • I tried to use this program with the file from the URL that i've given. It doesnt work. Im using Windows Media Player Fileversion 11.0 And my OP is Windows Vista

  • Same problem as GLyndon. Hostname is bad.

  • "Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file."
    error message C00D1199

    Got Windows Vista and WMP11

    What am I supposed 2do?

    Thanks

  • Same as the last person. Its very flakey under vista with WMP11. It worked the first time I installed it. Then clicked on a PLS link after 10 times and it finally worked.

    Vista 64 SP1

  • THANKS! I can finally stream my college radio station! (via WMP 11.0.6001.7000 on Vista SP1) Works great.

  • Thanks!!
    I was scared that it wouldnt work because I have Vista and well, things dont work for it sometimes, but this does.

  • Jon, can your app be loaded onto a smartphone such as the samsung saga, which runs Windows Mobile 6.1 with Windows Media Player Mobile edition? Will it work once it's loaded? Thank you.

  • ewe. BSD bracket style

  • It'a working also on Vista?

  • I'm asking if it's working under Vista because I tried and still can't listen pls files

  • U rock, it works! haha

  • Does not work on my computer. I have an mp3 song that opens with windows media player classic but not with media player 11. How can i make it work with WMP 11? or make it work with classic without changing the default program of all my other songs?

    sv1296@hotmail.com

  • düğün davetiyesi ve davetiye örnekleri

  • Thanks for this app. Since I am a perfectionist I try not to install two different applications which can do the same thing in a single operating system. I just thought that in version 12 of WMP Microsoft would finally come to senses and allow .pls (on a front door not backdoor :)). Now I don't have to install Winamp since WMP can actually play .pls. And btw thanks for the C# code... Sine I am a programmer it is most useful to see what was lies beneath the executable.

    Greetings from Serbia :)

  • Thanks for this Jon, I can finally ditch winamp. Works great with the shoutcast site. Tune in and it opens in WMP12 which you can then save as a playlist file if you like. :)

    Neal

  • thanks a lot..
    your small program works great....

  • Is there a way to get the old install method? Executables not allowed to download.

Comments have been disabled for this content.