Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mms:// URIs not working after upgrade Mopidy 2.0.0 to 2.0.1 #1553

Closed
kibuy opened this issue Aug 24, 2016 · 12 comments
Closed

mms:// URIs not working after upgrade Mopidy 2.0.0 to 2.0.1 #1553

kibuy opened this issue Aug 24, 2016 · 12 comments
Assignees
Labels
A-audio Area: Audio layer

Comments

@kibuy
Copy link

kibuy commented Aug 24, 2016

After upgrade mopidy 2.0.0 to 2.0.1 i have problem with mopidy-tunein with one station, log say's

2016-08-15 15:47:25,033 INFO [1051:TuneInBackend-9] urllib3.connectionpool: Starting new HTTP connection (1): opml.radiotime.com
2016-08-15 15:47:39,650 WARNING [1051:TuneInBackend-9] mopidy.internal.http: Download of u'mms://media.alcom.ax/radiotv' failed due to unsupported schema
2016-08-15 15:47:39,654 INFO [1051:TuneInBackend-9] mopidy_tunein.actor: Unwrapping stream from URI (mms://media.alcom.ax/radiotv) failed: error downloading URI mms://media.alcom.ax/radiotv
2016-08-15 15:47:39,662 INFO [1051:TuneInBackend-9] mopidy_tunein.tunein: TuneIn playlist request for mms://media.alcom.ax/radiotv failed: No connection adapters were found for 'mms://media.alcom.ax/radiotv'
2016-08-15 15:47:39,667 WARNING [1051:Core-14] mopidy.core.tracklist: Track is not playable: tunein🚉s17504

I have also error to show mopidy version by executing mopidy -h
only way to get it work again i edited /usr/local/drift/bin/mopidy and changed version 2.0.0 to 2.0.1

To get mopidy-tunein work again i did go back to Mopidy 2.0.0 and "Ålands radion" start to work again.

@kingosticks
Copy link
Member

You seem to be reporting two problems there. If you have a problem with mopidy-tunein then file it at https://github.com/kingosticks/mopidy-tunein and please include the version numbers of everything you are running (mopidy deps). I think you will also need to enable debug logging.

If you also have a separate problem with running mopidy -h then please be more specific about what exactly you are seeing and we can rename this issue to focus on that issue.

@kibuy
Copy link
Author

kibuy commented Aug 27, 2016

$ mopidy deps
Executable: /usr/local/bin/mopidy
Platform: Linux-4.1.18-v7+-armv7l-with-debian-8.0
Python: CPython 2.7.9 from /usr/lib/python2.7
Mopidy: 2.0.1 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
  tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-MusicBox-Webclient: 2.1.1 from /usr/local/lib/python2.7/dist-packages/Mopidy_MusicBox_Webclient-2.1.1-py2.7.egg
  setuptools: 5.5.1 from /usr/lib/python2.7/dist-packages
  Mopidy>=1.1.0: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-ALSAMixer: 1.0.3 from /usr/lib/python2.7/dist-packages
  Mopidy>=0.19: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  pyalsaaudio: 0.7 from /usr/lib/python2.7/dist-packages
Mopidy-Podcast-iTunes: 2.0.0 from /usr/lib/python2.7/dist-packages
  Mopidy>=1.1: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Mopidy-Podcast>=2.0: 2.0.1 from /usr/lib/python2.7/dist-packages
    Mopidy>=1.1.1: 2.0.1 from /usr/lib/python2.7/dist-packages
      Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
      requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
      tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    cachetools>=1.0: 1.0.0 from /usr/lib/python2.7/dist-packages
    uritools>=1.0: 1.0.1 from /usr/lib/python2.7/dist-packages
      ipaddress>=1.0.6: 1.0.14 from /usr/lib/python2.7/dist-packages
      ipaddress>=1.0.6: 1.0.14 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
Mopidy-Local-SQLite: 1.0.0 from /usr/lib/python2.7/dist-packages
  Mopidy>=1.1: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  uritools>=1.0: 1.0.1 from /usr/lib/python2.7/dist-packages
    ipaddress>=1.0.6: 1.0.14 from /usr/lib/python2.7/dist-packages
    ipaddress>=1.0.6: 1.0.14 from /usr/lib/python2.7/dist-packages
Mopidy-TuneIn: 0.4.1 from /usr/lib/python2.7/dist-packages
  Mopidy>=1.1: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  requests>=2.0.0: 2.4.3 from /usr/lib/python2.7/dist-packages
Mopidy-WebSettings: 0.1.4.2 from /usr/local/lib/python2.7/dist-packages/Mopidy_WebSettings-0.1.4.2-py2.7.egg
  setuptools: 5.5.1 from /usr/lib/python2.7/dist-packages
  Mopidy>=0.19: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  ConfigObj>=4.0.0: 5.0.6 from /usr/local/lib/python2.7/dist-packages/configobj-5.0.6-py2.7.egg
    six: 1.8.0 from /usr/lib/python2.7/dist-packages
  Jinja2>=2.7: 2.8 from /usr/local/lib/python2.7/dist-packages/Jinja2-2.8-py2.7.egg
    MarkupSafe: 0.23 from /usr/local/lib/python2.7/dist-packages/MarkupSafe-0.23-py2.7.egg
Mopidy-Spotify: 3.0.0 from /usr/lib/python2.7/dist-packages
  Mopidy>=2.0: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
    cffi>=1.0.0: 1.1.2 from /usr/lib/python2.7/dist-packages
      pycparser: 2.10 from /usr/lib/python2.7/dist-packages
  requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
Mopidy-Podcast: 2.0.1 from /usr/lib/python2.7/dist-packages
  Mopidy>=1.1.1: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  cachetools>=1.0: 1.0.0 from /usr/lib/python2.7/dist-packages
  uritools>=1.0: 1.0.1 from /usr/lib/python2.7/dist-packages
    ipaddress>=1.0.6: 1.0.14 from /usr/lib/python2.7/dist-packages
    ipaddress>=1.0.6: 1.0.14 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify-Tunigo: 1.0.0 from /usr/lib/python2.7/dist-packages
  Mopidy>=0.19.0: 2.0.1 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
  Mopidy-Spotify>=1.2.0: 3.0.0 from /usr/lib/python2.7/dist-packages
    Mopidy>=2.0: 2.0.1 from /usr/lib/python2.7/dist-packages
      Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
      requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
      tornado>=2.3: 3.2.2 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
      cffi>=1.0.0: 1.1.2 from /usr/lib/python2.7/dist-packages
        pycparser: 2.10 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  tunigo>=1.0.0: 1.0.0 from /usr/lib/python2.7/dist-packages
    requests>=2.0.0: 2.4.3 from /usr/lib/python2.7/dist-packages
GStreamer: 1.4.4.0 from /usr/lib/python2.7/dist-packages/gi
  Detailed information:
    Python wrapper: python-gi 3.14.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        id3demux
        id3v2mux
        lamemp3enc
        mad
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        flump3dec
$

i run mopidy --save-debug-log --vvv but nothing interestin found in mopidy-debug.log

 grep -i tunein  mopidy-debug.log
  Loading entry point: tunein = mopidy_tunein:Extension
  Loaded extension: Mopidy-TuneIn 0.4.1
  Discovered extensions: musicbox_webclient, podcast-itunes, mpd, http, stream, m3u, softwaremixer, file, local, spotify_tunigo, tunein, podcast, spotify, local-sqlite, alsamixer, websettings
  Validating extension: tunein
  Enabled extensions: spotify, mpd, http, stream, spotify_tunigo, local-sqlite, podcast-itunes, softwaremixer, file, musicbox_webclient, websettings, podcast, local, tunein
  Starting Mopidy backends: iTunesPodcastBackend, StreamBackend, FileBackend, LocalBackend, SpotifyTunigoBackend, TuneInBackend, PodcastBackend, SpotifyBackend
  Registered TuneInBackend (urn:uuid:57788865-18de-485f-a61c-482d9e757637)
  Starting TuneInBackend (urn:uuid:57788865-18de-485f-a61c-482d9e757637)
  TuneInBackend took 18ms

@kibuy kibuy closed this as completed Aug 27, 2016
@kibuy kibuy reopened this Aug 27, 2016
@kibuy kibuy changed the title 2 errors after upgrade Mopidy 2.0.0 to 2.0.1 mopidy-tunein uri not working after upgrade Mopidy 2.0.0 to 2.0.1 Aug 27, 2016
@sunng87
Copy link

sunng87 commented Aug 30, 2016

I'm getting the same issue recently on ArchLinux. Those radio streams were playable in last week and still works with mpv. I believe the TuneIn plugin mentioned in this issue was trying to play these streams.

Looking from console I get:

(python2:10469): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
WARNING  Download of '20160830/10/fm1039_1472524820_video_seq_2393.ts' failed: Invalid URL '20160830/10/fm1039_1472524820_video_seq_2393.ts': No schema supplied. Perhaps you meant http://20160830/10/fm1039_1472524820_video_seq_2393.ts?
INFO     Unwrapping stream from URI (http://audiolive.rbc.cn:1935/live/fm1039/96K/tzwj_video.m3u8) failed: error downloading URI 20160830/10/fm1039_1472524820_video_seq_2393.ts
WARNING  Track is not playable: http://audiolive.rbc.cn:1935/live/fm1039/96K/tzwj_video.m3u8
WARNING  Download of 'mms://live.njgb.com/fm1043' failed due to unsupported schema
INFO     Unwrapping stream from URI (mms://live.njgb.com/fm1043) failed: error downloading URI mms://live.njgb.com/fm1043
WARNING  Track is not playable: mms://live.njgb.com/fm1043
INFO     New MPD connection from [::ffff:127.0.0.1]:57634
WARNING  Download of 'mms://live.njgb.com/fm1069' failed due to unsupported schema
INFO     Unwrapping stream from URI (mms://live.njgb.com/fm1069) failed: error downloading URI mms://live.njgb.com/fm1069
WARNING  Track is not playable: mms://live.njgb.com/fm1069
INFO     New MPD connection from [::ffff:127.0.0.1]:57646
WARNING  Download of 'mms://live.njgb.com/fm981' failed due to unsupported schema
INFO     Unwrapping stream from URI (mms://live.njgb.com/fm981) failed: error downloading URI mms://live.njgb.com/fm981

Not sure if this is a mopidy 2.0.1 or Gstreamer issue.

@sunng87
Copy link

sunng87 commented Aug 30, 2016

It seems this is more a GStreamer issue than mopidy one because totem cannot play these streamer neither.

Sorry just confirmed totem can play these mms streams.

@wiget
Copy link

wiget commented Oct 15, 2016

I think problem is because URI is passed to mopidy/internal/http.py not to stream plugin.

@wiget
Copy link

wiget commented Oct 15, 2016

I bisected this issue and first bad commit is 5751886

DEBUG:mopidy.core.tracklist:Triggering event: tracklist_changed()
DEBUG:mopidy.listener:Sending tracklist_changed to CoreListener: {}
DEBUG:mopidy.listener:Sending playlist to MpdSession: {}
DEBUG:mopidy.http.handlers:Sent WebSocket message to 127.0.0.1: '{"jsonrpc": "2.0", "id": 18, "result": [{"track": {"__model__": "Track", "uri": "mms://stream.polskieradio.pl/program3"}, "__model__": "TlTrack", "tlid": 1}]}'
DEBUG:mopidy.http.handlers:Received WebSocket message from 127.0.0.1: u'{"method":"core.playback.play","params":{"tl_track":{"track":{"__model__":"Track","uri":"mms://stream.polskieradio.pl/program3"},"__model__":"TlTrack","tlid":1}},"jsonrpc":"2.0","id":19}'
DEBUG:mopidy.audio.gst:Changing state to GST_STATE_READY: result=GST_STATE_CHANGE_SUCCESS
DEBUG:mopidy.stream.actor:Unwrapping stream from URI: mms://stream.polskieradio.pl/program3
DEBUG:mopidy.audio.gst:Got STATE_CHANGED bus message: old=GST_STATE_NULL new=GST_STATE_READY pending=GST_STATE_VOID_PENDING
DEBUG:mopidy.stream.actor:GStreamer failed scanning URI (mms://stream.polskieradio.pl/program3): Timeout after 4999ms
WARNING:mopidy.internal.http:Download of 'mms://stream.polskieradio.pl/program3' failed due to unsupported schema
WARNING  Download of 'mms://stream.polskieradio.pl/program3' failed due to unsupported schema
INFO:mopidy.stream.actor:Unwrapping stream from URI (mms://stream.polskieradio.pl/program3) failed: error downloading URI mms://stream.polskieradio.pl/program3
INFO     Unwrapping stream from URI (mms://stream.polskieradio.pl/program3) failed: error downloading URI mms://stream.polskieradio.pl/program3
DEBUG:mopidy.backend:Backend translated URI from mms://stream.polskieradio.pl/program3 to None
WARNING:mopidy.core.tracklist:Track is not playable: mms://stream.polskieradio.pl/program3
WARNING  Track is not playable: mms://stream.polskieradio.pl/program3

@wiget
Copy link

wiget commented Oct 15, 2016

@SeeSpotRun Can you look at this?

@wiget
Copy link

wiget commented Oct 15, 2016

And to note: tunein plugin is not needed to replicate this bug. Simply try to play any mms:// URI

@kingosticks kingosticks changed the title mopidy-tunein uri not working after upgrade Mopidy 2.0.0 to 2.0.1 mms:// URIs not working after upgrade Mopidy 2.0.0 to 2.0.1 Oct 24, 2016
@adamcik
Copy link
Member

adamcik commented Oct 24, 2016

I've played with this a bit, and our fix to handle broken duration behavior causes us to fail scanning MMS.

Adding if 'ASF' in tags.get('container-format', []): return ... in the right place "fixes" this. But as it's really just a hack I need to see about if there is a better way to handle this.

@adamcik adamcik self-assigned this Oct 24, 2016
@adamcik adamcik added the A-audio Area: Audio layer label Oct 24, 2016
@adamcik adamcik added this to the v2.1 - The rest of v2.0 milestone Oct 24, 2016
@adamcik
Copy link
Member

adamcik commented Oct 24, 2016

And thank you @wiget for bisecting this, saved me a lot of time :-)

adamcik added a commit to adamcik/mopidy that referenced this issue Oct 25, 2016
@adamcik
Copy link
Member

adamcik commented Oct 25, 2016

Have PR with a more general fix now. Root cause seems to be that mmssrc can not go to playing async. So we obviously never get ASYNC_DONE and our message handling breaks down. To fix this we now check the result of switching to PLAYING and give up if was SUCCESS. As this indicates there is no more data to be found.

@jodal jodal closed this as completed in 4adea37 Oct 25, 2016
@adamcik adamcik reopened this Oct 25, 2016
@adamcik
Copy link
Member

adamcik commented Oct 25, 2016

Sadly I broke the workaround I was trying to preserve. Luckily I tried on an older system with the bad version. Think I have a better patch this time around. How I would love to have tests for this, but since we need external resources I can't make unit tests in sane way.

adamcik added a commit to adamcik/mopidy that referenced this issue Oct 26, 2016
This reverts commit 74cf673.
"audio: Wait for state change instead of async done in scanner."

This reverts commit 4adea37.
"audio: Give up getting duration for MMS (Fixes: mopidy#1553)"
@jodal jodal closed this as completed in 7ecc6e5 Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-audio Area: Audio layer
Projects
None yet
Development

No branches or pull requests

5 participants