streamlink: Stream crashing after a while
Bug Report
- This is a bug report and I have read the contribution guidelines.
Description
After some time playing (sometimes a minute, sometimes 30), the remote stream is crashing, although it works fine on VLC desktop for example.
Expected / Actual behavior
I would like for the stream to continue on, or even try to reconnect automatically if it crashes. Right now it is crashing after some minutes, using VLC or OMXPlayer on Raspberry Pi 4.
Reproduction steps / Explicit stream URLs to test
I’m using a Raspberry Pi (same behavior on a Raspberry Pi A (yes the first Raspberry Pi generation) and a Raspberry Pi 4). Tried over WiFi and Ethernet so the link doesn’t seem to be the problem.
- Run
streamlink https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/manifest_w1345660299.mpd best --player vlc --fifo(--fifodoesn’t seem to change a thing) - Wait until it crashes.
Log output
[cli][debug] OS: Linux-4.19.97-v7l+-armv7l-with-debian-10.3
[cli][debug] Python: 3.7.3
[cli][debug] Streamlink: 1.0.0
[cli][debug] Requests(2.21.0), Socks(1.6.7), Websocket(0.53.0)
[cli][info] Found matching plugin dash for URL https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/manifest_w1345660299.mpd
[plugin.dash][debug] Parsing MPD URL: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/manifest_w1345660299.mpd
[utils.l10n][debug] Language code: en_GB
[stream.dash][debug] Available languages for DASH audio streams: NONE (using: n/a)
[cli][info] Available streams: 1600k (worst, best)
[cli][info] Opening stream: 1600k (dash)
[stream.dash][debug] Opening DASH reader for: p0va0br1585108 (video/mp4)
[cli][debug] Pre-buffering 8192 bytes
[stream.dash_manifest][debug] Generating segment timeline for dynamic playlist (id=0))
[stream.dash][debug] Reloading manifest (p0va0br1585108:video/mp4)
[stream.dash][debug] Download of segment: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/chunk_ctvideo_cfm4s_ridp0va0br1585108_cinit_w1345660299_mpd.m4s complete
[cli][info] Creating pipe streamlinkpipe-1334
[cli][info] Starting player: vlc
[cli.output][debug] Opening subprocess: vlc --input-title-format https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/manifest_w1345660299.mpd /tmp/streamlinkpipe-1334
[cli][debug] Writing stream to output
[stream.dash_manifest][debug] Generating segment timeline for dynamic playlist (id=0))
[stream.dash][debug] Reloading manifest (p0va0br1585108:video/mp4)
[stream.dash][debug] Download of segment: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/chunk_ctvideo_cfm4s_ridp0va0br1585108_cs142671614574060_w1345660299_mpd.m4s complete
[stream.dash_manifest][debug] Generating segment timeline for dynamic playlist (id=0))
[stream.dash][debug] Reloading manifest (p0va0br1585108:video/mp4)
[stream.dash][debug] Download of segment: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/chunk_ctvideo_cfm4s_ridp0va0br1585108_cs142671615473880_w1345660299_mpd.m4s complete
[stream.dash_manifest][debug] Generating segment timeline for dynamic playlist (id=0))
[stream.dash][debug] Reloading manifest (p0va0br1585108:video/mp4)
[stream.dash][debug] Download of segment: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/chunk_ctvideo_cfm4s_ridp0va0br1585108_cs142671616373700_w1345660299_mpd.m4s complete
[stream.dash][debug] Download of segment: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/chunk_ctvideo_cfm4s_ridp0va0br1585108_cs142671617273520_w1345660299_mpd.m4s complete
[stream.dash][debug] Download of segment: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/chunk_ctvideo_cfm4s_ridp0va0br1585108_cs142671618173340_w1345660299_mpd.m4s complete
error: Error when reading from stream: Read timeout, exiting
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[cli][info] Stream ended
[cli][info] Closing currently open stream...
Exception in thread Thread-DASHStreamWorker:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.7/http/client.py", line 1336, in getresponse
response.begin()
File "/usr/lib/python3.7/http/client.py", line 306, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.7/http/client.py", line 275, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 692, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.7/http/client.py", line 1336, in getresponse
response.begin()
File "/usr/lib/python3.7/http/client.py", line 306, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.7/http/client.py", line 275, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/streamlink/plugin/api/http_session.py", line 164, in request
*args, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3/dist-packages/streamlink/stream/segmented.py", line 59, in run
for segment in self.iter_segments():
File "/usr/lib/python3/dist-packages/streamlink/stream/dash.py", line 97, in iter_segments
if not self.reload():
File "/usr/lib/python3/dist-packages/streamlink/stream/dash.py", line 111, in reload
res = self.session.http.get(self.mpd.url, exception=StreamError)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3/dist-packages/streamlink/plugin/api/http_session.py", line 175, in request
raise err
streamlink.exceptions.StreamError: Unable to open URL: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/manifest_w1345660299.mpd (('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
I get more log when not redirecting stdout to a file, here is the end:
streamlink.exceptions.StreamError: Unable to open URL: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/manifest_w1345660299.mpd (('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
[stream.dash][debug] Download of segment: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/chunk_ctvideo_cfm4s_ridp0va0br1585108_cs142672281341130_w1345660299_mpd.m4s complete
[stream.dash][debug] Download of segment: https://sarralbe.hdr-tv.com/live/sarralbe/sarralbe.stream/chunk_ctvideo_cfm4s_ridp0va0br1585108_cs142672282240950_w1345660299_mpd.m4s complete
error: Error when reading from stream: Read timeout, exiting
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[cli][info] Stream ended
[cli][info] Closing currently open stream...
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24
No that’s what I wrote, streamlink command is on the first post but it works quite badly.