Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll mark this as approved pending testing by the reporter.
This unfortunately didn't seem to work out, I appear to be getting warned of discontinuities that aren't actually happening after the initial pre-roll ad:
[session][info] Plugin twitch is being overridden by /home/kynikos/.local/share/streamlink/plugins/twitch.py
[cli][info] Found matching plugin twitch for URL twitch.tv/doctorcdcs
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 360p (hls)
[cli][info] Starting player: mpv
[plugins.twitch][info] Low latency streaming (HLS live edge: 1)
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...
Here's a verbose log:
streamlink.txt.gz
Member Author
Are you loading the right plugin version? I can't find any streams with the same playlist behavior, so I'm just relying on the added test data.
See this test fixture (from the current PR version)
c262b23 #diff-48c96f8246c6a3e90a6bc303e504500d3a32f392bb876541469fa9b8de6915d9R404
which is the equivalent of this playlist data from your log output
[20:16:02.373832][stream.hls.m3u8][all] #EXT-X-PROGRAM-DATE-TIME:2024-06-06T01:15:56.627Z
[20:16:02.374206][stream.hls.m3u8][all] #EXTINF:2.000,live
[20:16:02.374597][stream.hls.m3u8][all] URL
[20:16:02.374878][stream.hls.m3u8][all] #EXT-X-DISCONTINUITY
[20:16:02.375099][stream.hls.m3u8][all] #EXT-X-TWITCH-LIVE-SEQUENCE:2249
[20:16:02.375443][stream.hls.m3u8][all] #EXT-X-PROGRAM-DATE-TIME:2024-06-06T01:15:58.627Z
[20:16:02.375741][stream.hls.m3u8][all] #EXTINF:2.000,live
[20:16:02.376007][stream.hls.m3u8][all] URL
[20:16:02.376403][stream.hls.m3u8][all] #EXT-X-TWITCH-PREFETCH:URL
[20:16:02.376766][stream.hls.m3u8][all] #EXT-X-TWITCH-PREFETCH:URL
[20:16:02.377407][stream.hls][debug] Adding segment 28 to queue
[20:16:03.826540][stream.hls][debug] Segment 27 complete
[20:16:03.827270][stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
Basically a simple discontinuity between two non-ad segments, which should be ignored, so it surprises me to see these warnings in your log output.
Are you loading the right plugin version? I can't find any streams with the same playlist behavior, so I'm just relying on the added test data.
Unless there's something somehow caching the previous version of the py file even though I overwrote it with the one from this PR, I should be using the right version. I'll try again some more later tonight.
UPDATE: I cleared anything that could possibly look like some sort of cache, redownloaded the py from the PR and ran with it again and ended up with my terminal completely flooded with the same warning still.
$ streamlink twitch.tv/fractalminddev
[session][info] Plugin twitch is being overridden by /home/kynikos/.local/share/streamlink/plugins/twitch.py
[cli][info] Found matching plugin twitch for URL twitch.tv/fractalminddev
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 360p (hls)
[cli][info] Starting player: mpv
[plugins.twitch][info] Low latency streaming (HLS live edge: 1)
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[cli][info] Player closed
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[cli][info] Stream ended
[cli][info] Closing currently open stream...
Closed
4 tasks
I was running into stream discontinuity issues as well today and found this issue. I tested against this branch and it didn't help. These are actual discontinuities and not just spurious log messages. I run with twitch-disable-ads, twitch-low-latency, and an oauth token from my browser.
I wonder if this might be an issue with low latency, because I tried without twitch-low-latency and the discontinuity errors went away
❯ [cli][info] Found matching plugin twitch for URL https://twitch.tv/missshadowlovely
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (hls)
[cli][info] Starting player: mpv
[plugins.twitch][info] Will skip ad segments
[plugins.twitch][info] Low latency streaming (HLS live edge: 2)
[stream.hls][info] Filtering out segments and pausing stream output
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][info] Resuming stream output
[stream.hls][info] Filtering out segments and pausing stream output
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][info] Resuming stream output
Member Author
[stream.hls][info] Filtering out segments and pausing stream output [stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data. [stream.hls][info] Resuming stream output [stream.hls][info] Filtering out segments and pausing stream output [stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data. [stream.hls][info] Resuming stream output
These are actual discontinuities
Which means that both the #EXT-X-DISCONTINUITY HLS tags and the warning messages are valid. Remember that discontinuities are not supported and thus warnings must be emitted by Streamlink's HLS implementation, because the bitstream written to the output is incoherent.
Stream output pausing is related to ads filtering, so unless the ads detection is broken, this is working as intended. Without an "all" log output (--loglevel=all) which includes the actual HLS playlist content, nobody will be able to tell if there's an issue or not.
As said, I can't reproduce this, so this must only be the case for people who set authentication headers while being subscribed to certain channels. None of the "all" log outputs posted by @KynikossDragonn suggest any issues with prefetch segments (low latency segments).
Member Author
Had another look at the changes of this PR and I think I understand the issue with prefetch segments now. I'll fix this tomorrow once I get the time. It's way too late here now.
Member Author
I've updated the PR. Please re-check the new changes.
As said, I don't see the discontinuities in any HLS playlists myself, so this is purely based on the --loglevel=all log outputs which were uploaded here, which means I still could've missed some cases.
I've updated the PR. Please re-check the new changes.
I've so far not have the warning repetitively show up with the latest change so I think the issue is properly resolved now.
bastimeyer deleted the plugins/twitch/fix-discontinuity-warning-spam branch
June 23, 2024 15:58