streamlink: filmon plugin 504 Server Error: Gateway Time-out

Bug Report

filmon plugin, 504 Server Error: Gateway Time-out

Description

Here is filmon plugin bug for streamlink’s team attention in case somebody would be willing to fix the plugin.

Error is intermittent and occurs about once in every half an hour. To replicate this error would require watching the stream for up to 30 minutes and player would freeze at some point in time. Player must be killed as a process, otherwise it hangs on desktop. It happens with vlc, mpv and ffplay.

Reproduction steps / Explicit stream URLs to test

https://www.filmon.tv/channel/bbc-world-news

$url = 'https://www.filmon.tv/channel/bbc-world-news'
run('streamlink.exe --http-no-ssl-verify --player=ffplay.exe ' & $url & '  best','',@SW_MINIMIZE)

Log output

[cli][info] Found matching plugin filmon for URL https://www.filmon.tv/channel/bbc-world-news
[cli][info] Available streams: low (worst), high (best)
[cli][info] Opening stream: high (hls-filmon)
[cli][info] Starting player: ffplay.exe
Exception in thread Thread-FilmOnHLSStreamWorker:
Traceback (most recent call last):
  File "C:\P\STREAMLINK\pkgs\streamlink\plugin\api\http_session.py", line 166, in request
    res.raise_for_status()
  File "C:\P\STREAMLINK\pkgs\requests\models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 504 Server Error: Gateway Time-out for url: http://www.filmon.com/api-v2/channel/3268?protocol=hls

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 916, in _bootstrap_inner
  File "C:\P\STREAMLINK\pkgs\streamlink\stream\segmented.py", line 59, in run
    for segment in self.iter_segments():
  File "C:\P\STREAMLINK\pkgs\streamlink\stream\hls.py", line 280, in iter_segments
    self.reload_playlist()
  File "C:\P\STREAMLINK\pkgs\streamlink\plugins\filmon.py", line 24, in reload_playlist
    parsed = urlparse(self.stream.url)
  File "C:\P\STREAMLINK\pkgs\streamlink\plugins\filmon.py", line 104, in url
    for stream in self._get_stream_data():
  File "C:\P\STREAMLINK\pkgs\streamlink\plugins\filmon.py", line 91, in _get_stream_data
    data = self.api.channel(self.channel)
  File "C:\P\STREAMLINK\pkgs\streamlink\plugins\filmon.py", line 152, in channel
    res = self.session.http.get(self.channel_url.format(channel))
  File "C:\P\STREAMLINK\pkgs\requests\sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "C:\P\STREAMLINK\pkgs\streamlink\plugin\api\http_session.py", line 175, in request
    raise err
streamlink.exceptions.PluginError: Unable to open URL: http://www.filmon.com/api-v2/channel/3268?protocol=hls (504 Server Error: Gateway Time-out for url: http://www.filmon.com/api-v2/channel/3268?protocol=hls)

Comment

streamlink-1.3.0-20200118.exe windows 10

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

This player issue has nothing to do with the plugin.

As already said, it’s caused by an unexpected exception that doesn’t get caught and thus ends Streamlink’s process, which means that Streamlink won’t be able to terminate/kill the player child process.

This thread is about the plugin and not about any other Streamlink issues, so please stop posting about that. However, if you want to have a workaround, just launch the player yourself and pipe Streamlink’s stdout into the player’s stdin. Then you won’t have any issues with left behind child processes.