Project

General

Profile

Bug #295

Audacious hangs when changing stream position for mms-streams

Added by Martin Steiger almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Major
Assignee:
-
Category:
plugins/mms
Target version:
Start date:
May 19, 2013
Due date:
% Done:

100%

Estimated time:
Affects version:

Description

I can open mms-streams and play them with Audacious, but when I use the slider to change the pos. of the stream, Audacious hangs.
It sometimes displays "Buffering .." as title, but it never comes to live again.

Test cases can be found here:
http://www.iplayerconverter.co.uk/choose_aod.aspx

I manually extracted the URL from the asx v3 files:
mms://wm.bbc.co.uk/wms2/radio1coyopa/radio_1_-_saturday_0100.wma

It may be valid for only a week or so, but it's the same for all streams.

Rochard.desktop (169 Bytes) Rochard.desktop Martin Steiger, June 02, 2013 12:30

History

#1 Updated by John Lindgren almost 11 years ago

This stream didn't work for me at all, either in Audacious or MPlayer.

$ mplayer mms://wm.bbc.co.uk/wms2/radio1coyopa/radio_1_-_saturday_0100.wma
MPlayer SVN-r35920-4.8.0 (C) 2000-2013 MPlayer Team
203 audio & 421 video codecs
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing mms://wm.bbc.co.uk/wms2/radio1coyopa/radio_1_-_saturday_0100.wma.
STREAM_ASF, URL: mms://wm.bbc.co.uk/wms2/radio1coyopa/radio_1_-_saturday_0100.wma
Resolving wm.bbc.co.uk for AF_INET6...

Couldn't resolve name for AF_INET6: wm.bbc.co.uk
Resolving wm.bbc.co.uk for AF_INET...
Connecting to server wm.bbc.co.uk[212.58.252.11]: 1755...

Connected
read error:: Resource temporarily unavailable
pre-header read failed
Resolving wm.bbc.co.uk for AF_INET6...

Couldn't resolve name for AF_INET6: wm.bbc.co.uk
Resolving wm.bbc.co.uk for AF_INET...
Connecting to server wm.bbc.co.uk[212.58.252.11]: 80...
Resolving wm.bbc.co.uk for AF_INET6...

Couldn't resolve name for AF_INET6: wm.bbc.co.uk
Resolving wm.bbc.co.uk for AF_INET...
Connecting to server wm.bbc.co.uk[212.58.252.11]: 80...
read: Resource temporarily unavailable

Failed, exiting.
Resolving wm.bbc.co.uk for AF_INET6...

Couldn't resolve name for AF_INET6: wm.bbc.co.uk
Resolving wm.bbc.co.uk for AF_INET...
Connecting to server wm.bbc.co.uk[212.58.252.11]: 80...

Cache size set to 320 KBytes
Cache fill:  0.06% (187 bytes)   

Exiting... (End of file)

#2 Updated by John Lindgren almost 11 years ago

It looks like the link you gave, links to itself:

$ wget -q -O- http://wm.bbc.co.uk/wms2/radio1coyopa/radio_1_-_saturday_0100.wma?MSWMExt=.asf
[Reference]
Ref1=http://wm.bbc.co.uk/wms2/radio1coyopa/radio_1_-_saturday_0100.wma?MSWMExt=.asf
Ref2=http://212.58.252.11:80/wms2/radio1coyopa/radio_1_-_saturday_0100.wma?MSWMExt=.asf

#3 Updated by Martin Steiger almost 11 years ago

I just tried it again and it still works for me. Do other streams work for you?

Using wget redirects to itself, yes. I think you have to use the Microsoft Media Server Protocol (mms://) to access the actual content. totem and audacious can both open it on my machine.

#4 Updated by Michael Schwendt almost 11 years ago

$ audacious mms://wm.bbc.co.uk/wms2/radio1coyopa/radio_1_-_saturday_0100.wma
mms: Attempt to seek outside buffered region.
mms: Attempt to seek outside buffered region.
mms: Attempt to seek outside buffered region.
ffaudio: Unsupported audio format 8

Cannot get it to play at all.

$ rpm qa audacious audacious\*freeworld\*|sort
audacious-3.4-0.3.beta1.fc19.x86_64
audacious-plugins-freeworld-ffaudio-3.3.4-1.fc19.x86_64
audacious-plugins-freeworld-mms-3.3.4-1.fc19.x86_64
audacious-plugins-freeworld-mp3-3.3.4-1.fc19.x86_64

Mplayer manages to play it, but by default runs into many "Cache empty, consider increasing -cache and/or -cache-min. [performance issue]" issues.

#5 Updated by John Lindgren almost 11 years ago

It seems rather pointless to redirect HTTP access to the same server, same port (redirecting to the MMS port would make sense). Anyway, when I tried it again just now, the "resource temporarily unavailable" error is gone and MPlayer can play the stream, though with the same interruptions that Michael experienced.

Evidently FFmpeg switched their WMA decoder to use a split decoding buffer in some recent release, which means we have to interlace the channels back together (that's what the "unsupported audio format 8" error meant). We can now do this since https://github.com/audacious-media-player/audacious-plugins/commit/7e4a6beeec97edf4ec1b0755d3aab5934e1682a3.

Other problems aside, I can't reproduce any hangup when trying to seek. All I see is:

mms: Attempt to seek outside buffered region.
ffaudio: error while seeking
and then playback continues from where it was before.

#6 Updated by Martin Steiger almost 11 years ago

The problem still exists for me (on a clean Ubuntu 13.04 system). It seems to be related to the buffering. While doing that the entire application seems to be unresponsive (although button hovering works). Also closing does not work. It seems as if the buffering operation never finishes due to the invalid seek pos. This is what I get:


plugin-registry.c:480 [plugin_register]: Register plugin: /usr/lib/x86_64-linux-gnu/audacious/Transport/mms.so
plugin-registry.c:480 [plugin_register]: Register plugin: /usr/lib/x86_64-linux-gnu/audacious/Input/ffaudio.so
plugin-registry.c:480 [plugin_register]: Register plugin: /usr/lib/x86_64-linux-gnu/audacious/Container/asx.so
...
plugin-init.c:124 [start_multi_cb]: Starting MMS Plugin.
plugin-init.c:124 [start_multi_cb]: Starting Neon HTTP/HTTPS Plugin.
plugin-init.c:124 [start_multi_cb]: Starting ASXv1/ASXv2 Wiedergabelisten.
plugin-init.c:124 [start_multi_cb]: Starting FFmpeg Plugin.
plugin-init.c:94 [start_single]: Starting selected output plugin PulseAudio Ausgabe.
...
VFS: <0x260ad40> open (mode r) mms://wm.bbc.co.uk/wms2/radio1coyopa/radio_1_-_saturday_0100.wma
ffaudio-core.c:141 [get_format_by_extension]: Get format by extension: mms://wm.bbc.co.uk/wms2/radio1coyopa/radio_1_-_saturday_0100.wma
ffaudio-core.c:153 [get_format_by_extension]: Format unknown.
ffaudio-core.c:161 [get_format_by_content]: Get format by content: mms://wm.bbc.co.uk/wms2/radio1coyopa/radio_1_-_saturday_0100.wma
ffaudio-core.c:195 [get_format_by_content]: Format asf, buffer size 16384, score 100.
ffaudio-core.c:443 [ffaudio_play]: got codec wmav2 for stream index 0, opening
ffaudio-core.c:461 [ffaudio_play]: opening audio output
...
VFS: <0x27cb040> seek to 43835142 from beginning
mms: Attempt to seek outside buffered region.
VFS: <0x27cb040> seek to 5657 from beginning
VFS: <0x27cb040> tell = 5657
VFS: <0x27cb040> size = 43835142
VFS: <0x27cb040> seek to 43835142 from beginning
mms: Attempt to seek outside buffered region.
VFS: <0x27cb040> seek to 7918 from beginning
VFS: <0x27cb040> tell = 7918

#7 Updated by John Lindgren almost 11 years ago

Can you provide a debugger backtrace?

#8 Updated by Martin Steiger almost 11 years ago

I'm up for it, but I need instructions.

First download and compile the source with debug flags, I guess. Then run gdb with backtrace mode?

Btw: what about the asx v3 issue? Can you help me out here?
Thanks

#9 Updated by John Lindgren almost 11 years ago

Installation example (for Ubuntu 12.04):
http://redmine.audacious-media-player.org/boards/1/topics/788

I have no plans to implement an ASXv3 parser.

#10 Updated by Martin Steiger almost 11 years ago

Ok - I will try that beginning of next week.

Would you integrate an ASXv3 parser if you had one?
If yes, please tell me which xml parser I should use (if you care) and how to integrate it?
I think I can figure out the rest.

#11 Updated by John Lindgren almost 11 years ago

The XSPF parser is already using libxml2 so that would be my first choice.

#12 Updated by Martin Steiger almost 11 years ago

I followed your cheat sheet and it works until the compilation of audacious-plugins with ffaudio


/usr/bin/ld: ../lib/libavcodec.a(h264_cabac.o): relocation R_X86_64_32 against `ff_h264_cabac_tables' can not be used when making a shared object; recompile with -fPIC

I added the flag at various places (in ffaudio's CFLAGS, CXXFLAGS, CPPFLAGS, etc), but with no luck. Where exactly do I have to put it?

#13 Updated by John Lindgren almost 11 years ago

Martin Steiger wrote:

I added the flag at various places (in ffaudio's CFLAGS, CXXFLAGS, CPPFLAGS, etc), but with no luck. Where exactly do I have to put it?

Sorry, I can't help you there. I never saw that error when compiling on Ubuntu 12.04.

#14 Updated by Martin Steiger almost 11 years ago

I think I figured it out: the problem was that ffmpeg was not compiled to be a shared library.

./configure --enable-shared --prefix=$HOME/ffmpeg-build

Now, the linking of ffaudio seems to work. However, I encountered the next problem

ERROR: /usr/lib/audacious/Input/ffaudio.so could not be loaded: libavcodec.so.54: cannot open shared object file: No such file or directory

Copying libavcodec does not help..

Any ideas?

#15 Updated by Martin Steiger almost 11 years ago

I configured and installed ffmpeg into /usr which seemed to fix the problem. Audacious now opens and plays the sample file.

As John said, the slider and the label show the new position, but audio still plays from where it was before.


ffaudio-core.c:481 [ffaudio_play]: setting parameters
VFS: (last message repeated 3 times)
VFS: <0x1620040> seek to 43832901 from beginning
mms: Attempt to seek outside buffered region.
VFS: <0x1620040> seek to 5677 from beginning
mms: Attempt to seek outside buffered region.
ffaudio: error while seeking
mms: Attempt to seek outside buffered region.
ffaudio: error while seeking
mms: Attempt to seek outside buffered region.

#16 Updated by John Lindgren almost 11 years ago

Martin Steiger wrote:

I configured and installed ffmpeg into /usr which seemed to fix the problem. Audacious now opens and plays the sample file.

I would not have recommended doing that since FFmpeg versions are not always backward-compatible and you might have broken other software compiled for an older version of FFmpeg.

As John said, the slider and the label show the new position, but audio still plays from where it was before.

So the original bug is not reproducible with current versions of Audacious and FFmpeg?

#17 Updated by Martin Steiger almost 11 years ago

No, but it doesn't work either. Should I open a new issue?

Btw: did you already look into the asx parser?

#18 Updated by John Lindgren almost 11 years ago

  • Status changed from New to Closed
  • Target version changed from 3.4 to 3.5
  • % Done changed from 0 to 100

I simplified the Audacious side of things so that there is essentially nothing standing between FFmpeg and libmms now:
https://github.com/audacious-media-player/audacious-plugins/commit/ef29650568f48a3041f97a053f55db4d9917223a

(Since this is a major change it will not make it into Audacious 3.4.)

"It" still "doesn't work" because libmms is a piece of junk. I stayed up till 3 AM and patched three of the most obvious bugs in so that seeking works correctly with this particular stream: https://sourceforge.net/p/libmms/patches/12/. I make no promises that it will work in other cases.

Also available in: Atom PDF