stream.hls: Support for EXT-X-DISCONTINUITY tag
Author: GrabienCreated May 19, 2022Updated Dec 29, 2025
Labelsfeature requeststream: HLS
Checklist
- This is a feature request and not a different kind of issue
- I have read the contribution guidelines
- I have checked the list of open and recently closed plugin requests
Description
I'm trying to record an M3U8 stream from this page: https://www.wthitv.com/livestream/
Streamlink records the stream for some time, but then stops recording. When I look at the M3U8 source, I see in it EXT-X-DISCONTINUITY tags, and after each such tag, the TS fragments numeration starts again from "1". It looks like Streamlink stops recordings because of this.
Is it possible to add proper processing of this tag?
It's an example of M3U8:
#EXTM3U
#EXT-X-TARGETDURATION:12
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:54
#EXT-X-START:TIME-OFFSET=0
## 2022-05-19 09:09:52.619518339 +0000 UTC
#EXT-X-DISCONTINUITY-SEQUENCE:1
#EXTINF:6.00,
https://wthi-cdn.bitcentral.com/sef/c_bdb309a0-87cf-402a-b8e3-d54922e91ec2_v_3500K720AWS_s_00085.ts?s=7b0d8466-3194-4409-85eb-b4dd8a0763d1&c=bdb309a0-87cf-402a-b8e3-d54922e91ec2&i=84&v=3500K720AWS&u=https:%2F%2Ffuel-streaming-prod01.fuelmedia.io&m=53&ch=3a9b6ddf-a8ad-422d-adf7-0a26f09c685d&d=6.00
#EXTINF:6.00,
https://wthi-cdn.bitcentral.com/sef/c_bdb309a0-87cf-402a-b8e3-d54922e91ec2_v_3500K720AWS_s_00086.ts?s=7b0d8466-3194-4409-85eb-b4dd8a0763d1&c=bdb309a0-87cf-402a-b8e3-d54922e91ec2&i=85&v=3500K720AWS&u=https:%2F%2Ffuel-streaming-prod01.fuelmedia.io&m=54&ch=3a9b6ddf-a8ad-422d-adf7-0a26f09c685d&d=6.00
#EXTINF:6.00,
https://wthi-cdn.bitcentral.com/sef/c_bdb309a0-87cf-402a-b8e3-d54922e91ec2_v_3500K720AWS_s_00087.ts?s=7b0d8466-3194-4409-85eb-b4dd8a0763d1&c=bdb309a0-87cf-402a-b8e3-d54922e91ec2&i=86&v=3500K720AWS&u=https:%2F%2Ffuel-streaming-prod01.fuelmedia.io&m=55&ch=3a9b6ddf-a8ad-422d-adf7-0a26f09c685d&d=6.00
#EXTINF:6.00,
https://wthi-cdn.bitcentral.com/sef/c_bdb309a0-87cf-402a-b8e3-d54922e91ec2_v_3500K720AWS_s_00088.ts?s=7b0d8466-3194-4409-85eb-b4dd8a0763d1&c=bdb309a0-87cf-402a-b8e3-d54922e91ec2&i=87&v=3500K720AWS&u=https:%2F%2Ffuel-streaming-prod01.fuelmedia.io&m=56&ch=3a9b6ddf-a8ad-422d-adf7-0a26f09c685d&d=6.00
#EXTINF:2.97,
https://wthi-cdn.bitcentral.com/sef/c_bdb309a0-87cf-402a-b8e3-d54922e91ec2_v_3500K720AWS_s_00089.ts?s=7b0d8466-3194-4409-85eb-b4dd8a0763d1&c=bdb309a0-87cf-402a-b8e3-d54922e91ec2&i=88&v=3500K720AWS&u=https:%2F%2Ffuel-streaming-prod01.fuelmedia.io&m=57&ch=3a9b6ddf-a8ad-422d-adf7-0a26f09c685d&d=2.97
#EXT-X-DISCONTINUITY
#EXTINF:12.00,
https://wthi-cdn.bitcentral.com/sef/c_9cd2ffa1-037c-49fe-8387-9e9af9b109ea_v_3500K720AWS_s_00001.ts?s=7b0d8466-3194-4409-85eb-b4dd8a0763d1&c=9cd2ffa1-037c-49fe-8387-9e9af9b109ea&i=0&v=3500K720AWS&u=https:%2F%2Ffuel-streaming-prod01.fuelmedia.io&m=58&ch=3a9b6ddf-a8ad-422d-adf7-0a26f09c685d&d=12.00
#EXTINF:12.00,
https://wthi-cdn.bitcentral.com/sef/c_9cd2ffa1-037c-49fe-8387-9e9af9b109ea_v_3500K720AWS_s_00002.ts?s=7b0d8466-3194-4409-85eb-b4dd8a0763d1&c=9cd2ffa1-037c-49fe-8387-9e9af9b109ea&i=1&v=3500K720AWS&u=https:%2F%2Ffuel-streaming-prod01.fuelmedia.io&m=59&ch=3a9b6ddf-a8ad-422d-adf7-0a26f09c685d&d=12.00
#EXTINF:6.03,
https://wthi-cdn.bitcentral.com/sef/c_9cd2ffa1-037c-49fe-8387-9e9af9b109ea_v_3500K720AWS_s_00003.ts?s=7b0d8466-3194-4409-85eb-b4dd8a0763d1&c=9cd2ffa1-037c-49fe-8387-9e9af9b109ea&i=2&v=3500K720AWS&u=https:%2F%2Ffuel-streaming-prod01.fuelmedia.io&m=60&ch=3a9b6ddf-a8ad-422d-adf7-0a26f09c685d&d=6.03
#EXT-X-DISCONTINUITY
#EXTINF:12.00,
https://wthi-cdn.bitcentral.com/sef/c_a8217637-7a7c-461e-9efd-37f44b680497_v_3500K720AWS_s_00001.ts?s=7b0d8466-3194-4409-85eb-b4dd8a0763d1&c=a8217637-7a7c-461e-9efd-37f44b680497&i=0&v=3500K720AWS&u=https:%2F%2Ffuel-streaming-prod01.fuelmedia.io&m=8&ch=3a9b6ddf-a8ad-422d-adf7-0a26f09c685d&d=12.00Source: streamlink/streamlink