Add an option to play live streams via inputstream.ffmpegdirect#709
Open
magne4000 wants to merge 1 commit into
Open
Add an option to play live streams via inputstream.ffmpegdirect#709magne4000 wants to merge 1 commit into
magne4000 wants to merge 1 commit into
Conversation
Adds an optional, off-by-default live-playback backend: when enabled (and the add-on is installed/enabled), live streams play through inputstream.ffmpegdirect instead of inputstream.adaptive / Kodi's direct player. ffmpegdirect uses ffmpeg's own demuxer and manages realtime buffering itself, which some devices and setups handle more reliably for Twitch live -- for example it avoids the inputstream.adaptive live-HLS demuxer issues seen on some Kodi 22 / CoreELEC builds and the occasional "cache full 100%" buffering stall. It is purely additive: the setting defaults to off, so existing playback is unchanged unless the user opts in, and it applies to live streams only -- VODs and clips are untouched. Covers both a specific quality (variant URL) and Adaptive (master URL, with auth headers passed via the ffmpeg |Header= suffix); the inputstream.adaptive path (including its manifest_headers and 1440p chooser settings) is preserved for everyone who doesn't enable it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
I only tested for like 20 minutes, but so far it looks great.
So far no issues with buffering or drops. Good stuff! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional, off-by-default live-playback backend. When enabled (and
inputstream.ffmpegdirectis installed/enabled), live streams play through inputstream.ffmpegdirect instead of inputstream.adaptive / Kodi's direct player.Motivation
ffmpegdirect uses ffmpeg's own demuxer and manages realtime buffering itself, which some devices and setups handle more reliably for Twitch live — for example it avoids the inputstream.adaptive live-HLS demuxer issues seen on some Kodi 22 / CoreELEC builds, and the occasional "cache full 100%" buffering stall.
This gives users an alternative without changing the default for anyone.
Changes
utils.use_ffmpegdirect_for_live()— gated on the setting and on the add-on beinginstalled/enabled.
routes/play.py— when enabled, sets theinputstream.ffmpegdirectproperties for liveplayback (both a specific quality via the variant URL, and "Adaptive" via the master URL
with auth headers passed through the ffmpeg
|Header=suffix).Backward compatibility
Purely additive. The setting defaults to off, so existing playback is unchanged unless the user opts in. Applies to live only — VODs and clips are untouched. The inputstream.adaptive path (including
manifest_headersand the 1440p chooser) is preserved unchanged.New strings
#30333"Use inputstream.ffmpegdirect for live streams"Testing