bastimeyer · GitHub

See #6847 (comment)

Streamlink so far didn't bother to parse the FRAME-RATE attribute, as stream names of the most important plugins already included a name with the video res and framerate.

This PR adds the framerate attribute to the StreamInfo dataclass (the IFrameStreamInfo dataclass is ignored) and makes the M3U8Parser parse the FRAME-RATE data.

When the pixels stream name is chosen (first fallback after name) and the stream's framerate is above 30, it's now added to the stream name (rounded up).

https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.4.2

FRAME-RATE

The value is a decimal-floating-point describing the maximum frame
rate for all the video in the Variant Stream, rounded to three
decimal places.

The FRAME-RATE attribute is OPTIONAL but is recommended if the
Variant Stream includes video. The FRAME-RATE attribute SHOULD be
included if any video in a Variant Stream exceeds 30 frames per
second.

Read the original on github.com ↗