After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 545646 - Doesn't play some Internet Radios
Doesn't play some Internet Radios
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Internet Radio
1.2.0
Other Linux
: Normal normal
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
: 510782 545775 546146 566201 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-07-31 08:17 UTC by Alexander Hunziker
Modified: 2009-03-29 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the xml parsing of asx files (1.01 KB, patch)
2008-08-01 12:50 UTC, Bertrand Lorentz
none Details | Review
Support mixed case asx parsing (1.48 KB, patch)
2008-08-05 06:31 UTC, Félix Velasco
needs-work Details | Review
final (hopefully) version (1.30 KB, patch)
2008-08-05 20:57 UTC, Félix Velasco
committed Details | Review
http to mssh (1.06 KB, patch)
2008-08-15 19:17 UTC, Félix Velasco
committed Details | Review
Support for "Reference" files (4.26 KB, patch)
2009-03-19 20:38 UTC, Félix Velasco
needs-work Details | Review
ASF Reference playlist format (4.42 KB, patch)
2009-03-27 21:54 UTC, Félix Velasco
none Details | Review
ASF Reference playlist format (4.37 KB, patch)
2009-03-28 08:47 UTC, Félix Velasco
committed Details | Review

Description Alexander Hunziker 2008-07-31 08:17:17 UTC
There are some stations that play for me using Totem (GStreamer), but don't play using Banshee 1.2.0

Example URI's:

* http://www.dr.dk/netradio/Metafiler/asx/dr_p2_64.asx

No error reported to command line, just doesn't play.

* mmsh://dms-cl-021.skypro-media.net/drs3?MSWMExt=.asf

Error reported to command line: System.InvalidOperationException: Only HTTP and local playlist access is supported
Comment 1 John Carr 2008-08-01 10:56:04 UTC
I see this a lot:

[Error 11:53:22.907] GStreamer stream error: TypeNotFound
System.InvalidOperationException: Only HTTP and local playlist access is supported
  at Banshee.Playlists.Formats.PlaylistParser.Parse (Banshee.Base.SafeUri uri) [0x00000] 
  at Banshee.Streaming.RadioTrackInfo.LoadStreamUri (System.String uri) [0x00000] 

Trying to get BBC Radio 1, BBC Sheffield and Hallam FM to work..
Comment 2 Bertrand Lorentz 2008-08-01 12:46:03 UTC
Alexander,

For the first URI, it seems to be a bug in the ASX parsing code, I'll attach a
patch.

For the second URI, as the message says, you need to have an URI that starts
with http://.
Comment 3 Bertrand Lorentz 2008-08-01 12:50:55 UTC
Created attachment 115677 [details] [review]
Fix the xml parsing of asx files

Actually parse the content of "entry" nodes.

Without this patch, the second while loop is never executed, because when we get there xml_reader.Depth = 1.
Comment 4 Bertrand Lorentz 2008-08-01 12:52:54 UTC
*** Bug 545775 has been marked as a duplicate of this bug. ***
Comment 5 Bertrand Lorentz 2008-08-04 19:24:48 UTC
*** Bug 546146 has been marked as a duplicate of this bug. ***
Comment 6 Félix Velasco 2008-08-05 06:31:01 UTC
Created attachment 115873 [details] [review]
Support mixed case asx parsing

ASX files should have all tags in caps, yet sometimes they don't. This patch adds support for both cases.

Bertrand, I included your suggestion. You're right, it's better that way.
Comment 7 Andrew Conkling 2008-08-05 12:00:11 UTC
*** Bug 510782 has been marked as a duplicate of this bug. ***
Comment 8 Bertrand Lorentz 2008-08-05 17:15:26 UTC
Félix, in fact, I like your patch better than mine. It seems to fix the two issues.

But the file is in DOS format (line termination). Could you please re-attach it in Unix format ?
Comment 9 Gabriel Burt 2008-08-05 20:20:55 UTC
Could be a little simpler/cleaner like this:

element["uri"] = ResolveUri (xml_reader["HREF"] ?? xml_reader["href"]);
Comment 10 Félix Velasco 2008-08-05 20:57:50 UTC
Created attachment 115933 [details] [review]
final (hopefully) version

This time in Unix format instead of DOS, and including the suggestion from Gabriel Burt
Comment 11 Gabriel Burt 2008-08-05 21:04:55 UTC
Looks good to me, please commit Bertrand.
Comment 12 Bertrand Lorentz 2008-08-05 21:20:24 UTC
Committed, thanks for your persistence Félix ! ;)
Comment 13 Killer Kiwi 2008-08-05 22:03:41 UTC
I can confirm that the patch works correctly for
http://www1.streaming.net.nz/meta/tvworks-rock.asx
Comment 14 Alexander Hunziker 2008-08-13 17:45:05 UTC
The URI I gave in the original bug report (http://www.dr.dk/netradio/Metafiler/asx/dr_p2_64.asx) still doesn't play for me. Error message is "[Error 19:43:31.235] GStreamer stream error: CodecNotFound"

Totem on the same system plays that URI without problems.

I can though also confirm that the URI in comment #13 works.
Comment 15 Steven Côté 2008-08-15 06:33:12 UTC
I've seen the same problem as Alex in comment #14. I'm having trouble with the first URI and this one:
http://217.196.35.12/asx/skyradiolovesongs.asx

Both of these work fine in totem, so it's not an actual codec problem, though the error messages would have us believe that. The command line out put is:

[Debug 07:31:40.551] Attempting to parse radio playlist - http://217.196.35.12/asx/skyradiolovesongs.asx
[Debug 07:31:40.669] Playing Radio Stream - http://217.196.35.31/preroll/skyradiolovesongs.mp3
[Debug 07:31:40.670] Player state change: Idle -> Loading
[Debug 07:31:40.783] (libbanshee:player) bp_stop: setting state to GST_STATE_NULL
[Debug 07:31:40.783] Player state change: Loading -> Idle
[Error 07:31:40.787] GStreamer stream error: TypeNotFound
[Debug 07:31:41.290] Querying model for track to play in Song:Next mode
[Debug 07:31:41.311] Attempting to parse radio playlist - http://217.196.35.12/asx/skyradiolovesongs.asx
[Debug 07:31:41.403] Playing Radio Stream - http://217.196.35.31/preroll/skyradiolovesongs.mp3
[Debug 07:31:41.403] Player state change: Idle -> Loading
[Debug 07:31:41.535] (libbanshee:player) bp_stop: setting state to GST_STATE_NULL
[Debug 07:31:41.535] Player state change: Loading -> Idle
[Error 07:31:41.540] GStreamer stream error: TypeNotFound
[Debug 07:31:42.042] Querying model for track to play in Song:Next mode
[Debug 07:31:42.045] Attempting to parse radio playlist - http://217.196.35.12/asx/skyradiolovesongs.asx
[Debug 07:31:42.136] Playing Radio Stream - http://217.196.35.31/preroll/skyradiolovesongs.mp3
[Debug 07:31:42.137] Player state change: Idle -> Loading
[Debug 07:31:42.242] (libbanshee:player) bp_stop: setting state to GST_STATE_NULL
[Debug 07:31:42.242] Player state change: Loading -> Idle
[Error 07:31:42.244] GStreamer stream error: TypeNotFound
[Debug 07:31:42.745] Querying model for track to play in Song:Next mode
[Debug 07:31:42.749] Attempting to parse radio playlist - http://217.196.35.12/asx/skyradiolovesongs.asx
[Debug 07:31:42.841] Playing Radio Stream - http://217.196.35.31/preroll/skyradiolovesongs.mp3
[Debug 07:31:42.841] Player state change: Idle -> Loading
[Debug 07:31:42.948] (libbanshee:player) bp_stop: setting state to GST_STATE_NULL
[Debug 07:31:42.948] Player state change: Loading -> Idle
[Error 07:31:42.951] GStreamer stream error: TypeNotFound
[Debug 07:31:43.451] Querying model for track to play in Song:Next mode
[Debug 07:31:43.460] Attempting to parse radio playlist - http://217.196.35.12/asx/skyradiolovesongs.asx
[Debug 07:31:43.552] Playing Radio Stream - http://217.196.35.31/preroll/skyradiolovesongs.mp3
[Debug 07:31:43.552] Player state change: Idle -> Loading
[Debug 07:31:43.658] (libbanshee:player) bp_stop: setting state to GST_STATE_NULL
[Debug 07:31:43.658] Player state change: Loading -> Idle
[Error 07:31:43.661] GStreamer stream error: TypeNotFound
[Debug 07:31:43.661] (libbanshee:player) bp_stop: setting state to GST_STATE_NULL
Comment 16 Gabriel Burt 2008-08-15 16:12:09 UTC
I tried the skyradio station.  The ASX playlist lists to files, the first being a prerun/ad/intro type thing.  But the file it points to is empty, which I think triggers a gst error which causes Banshee to move on to the next track - in the track list, not within the ASX playlist, unfortunately.  At least I think that's what's happening.
Comment 17 Félix Velasco 2008-08-15 19:13:43 UTC
Ok, there are two different problems here.

As Gabriel said, in the skyradio station, the trouble is that the asx points first to an empty mp3, and then to the real stream. So the trouble is that the asx playlist is treated as a Track, and even if it has several different streams, only the first one gets played. I have it patched locally, but the patch is (still) very ugly. I'll try to improve it a bit before posting.

The second problem is GStreamer not being able to play http://wmscr1.dr.dk/e02ch02m?wmcontentbitrate=70000. That's the dr.dk stream. GStreamer says it won't play it, it's not Banshee's fault. Now, I can hear you all yelling 'Totem and Rhythmbox play it!' No, they don't. They cheat, and we should cheat, too. The url that Totem and Rhythmbox play is mmsh://wmscr1.dr.dk/e02ch02m?wmcontentbitrate=70000. In http://svn.gnome.org/svn/totem-pl-parser/branches/gnome-2-22/plparse/totem-pl-parser-wm.c, search mmsh, and you'll see who is to blame.
Comment 18 Félix Velasco 2008-08-15 19:17:18 UTC
Created attachment 116702 [details] [review]
http to mssh

I'm very afraid of secondary effects of these patch, even if totem and rhythmbox apparently do the same thing. Please do test.
Comment 19 Steven Côté 2008-08-16 09:30:13 UTC
Heh, I like the comment in the totem code.

Ok, I've tried applying this patch this morning and it seems to be working pretty good. No knock on effects so far. Looking at the code, I don't imagine there will be. It's pretty self contained and can only affects asx streams anyway.

I've tried a bunch of the radio stations that are included with banshee as well as all the problem ones listed in this bug and they all seem to run ok. Looks like a good patch to me.
Comment 20 Bertrand Lorentz 2008-08-21 19:07:11 UTC
Félix,

Thanks for the patch. It works for me and allows me to listen to the URI in the first report.

The fix looks safe, and totem-pl-parser has it for quite some time.
Comment 21 Gabriel Burt 2008-09-06 23:42:50 UTC
A little worried that there might be .asx playlists that really do use/require http://  Ideally (maybe?) we could simply add artificial element(s) to the playlist for the mms:// link(s) and if there was an error, Banshee would try the next item.

If you think this patch fixes more than it solves, please commit.  Please use StartsWith ("http", StringComparison.CurrentCultureIgnoreCase) to catch HTTP:// URLs, though.

Assuming you agree what I said in my first paragraph sounds sane, let's keep this bug open still though.
Comment 22 Bertrand Lorentz 2008-09-08 12:15:56 UTC
Patch committed with Gabriel's improvement, thanks Félix !

I don't think totem-pl-parser falls back to http if mmsh fails, but the suggestion to do it seems good.
Keeping the bug open, per above comment.
Comment 23 Michel Alexandre Salim 2008-12-29 22:44:22 UTC
This other stream does not work on Banshee-1.4.1:

http://www.polskieradio.pl/st/RadioPolonia.asx

(as reported for Fedora, https://bugzilla.redhat.com/show_bug.cgi?id=469309)

Interestingly, the TVWorks station works (http://www1.streaming.net.nz/meta/tvworks-rock.asx) on Banshee, but not with Totem, whereas RadioPolonia works with Totem but not Banshee.
Comment 24 Caleb Sawtell 2009-02-11 06:02:07 UTC
*** Bug 566201 has been marked as a duplicate of this bug. ***
Comment 25 Zdravko Nikolov 2009-03-17 19:48:42 UTC
(In reply to comment #24)
> *** Bug 566201 has been marked as a duplicate of this bug. ***
> 

Ok but this bug is still in 1.4.3! Looks like nothing has been done..
Comment 26 Félix Velasco 2009-03-19 20:32:09 UTC
The truth is, Zdravko, that a lot has been done. However, this bug is about parsing asx radio files. Your non-working url belongs to a different category that banshee doesn't support right now.

It's not hard to support, but I've been completely unable to find any documentation regarding the format (not that it's a complex format, just that reading some docs is always nice).

Apparently, this file is auto generated by Microsoft Windows Media Services when any application that's not Windows Media Player requests a streaming file (http://support.microsoft.com/kb/279467). It also requires the http to mssh dirty trick we use in ordinary asx files.
Comment 27 Félix Velasco 2009-03-19 20:38:35 UTC
Created attachment 130988 [details] [review]
Support for "Reference" files

In the PlaylistFormatDescription I've used almost the same info from ASX since both really represent the same type of stream. Otherwise, works with the url from bug #566201
Comment 28 Bertrand Lorentz 2009-03-26 19:50:42 UTC
Thanks for the patch, Félix !
I found this page that describes this kind of files :
http://msdn.microsoft.com/en-us/library/bb970445(VS.85).aspx

Based on that, and after looking at the code from totem-pl-parser (http://svn.gnome.org/viewvc/totem-pl-parser/trunk/plparse/totem-pl-parser-wm.c?view=markup), I think a better name would be AsfReferencePlaylistFormat.

The string comparison in MagicHandler should probably be case insensitive.

There are also a few formatting issues : some indents with tabs, and the brace should be on the same line as the condition :
if (condition) {
Comment 29 Félix Velasco 2009-03-27 21:54:59 UTC
Created attachment 131526 [details] [review]
ASF Reference playlist format

Name changed... check
Formatting issues... check
"Specification" review... check
Case insentive... check

Now it trims the url, and supports both RefX and RefXX
Comment 30 Zdravko Nikolov 2009-03-27 22:54:53 UTC
(In reply to comment #29)
> Created an attachment (id=131526) [edit]
> ASF Reference playlist format
> 
> Name changed... check
> Formatting issues... check
> "Specification" review... check
> Case insentive... check
> 
> Now it trims the url, and supports both RefX and RefXX
> 

Thanks Felix,

I can confirm that this has fixed the issue and I can now play the url!!
Comment 31 Félix Velasco 2009-03-28 08:47:23 UTC
Created attachment 131544 [details] [review]
ASF Reference playlist format

I forgot removing a Console.WriteLine in the previous patch

Glad to hear it's working for you, Zdravko
Comment 32 Bertrand Lorentz 2009-03-29 12:58:33 UTC
Committed, with small additional changes that I missed the first time : more case insensitivity and code formatting.
Thanks !