zhengqunkoo avatar

mpv-reload

0 subscribers
Lua

mpv plugin for automatic reloading of slow/stuck video streams

Created Apr 2021

Live activities

This update modifies the reload function to stop using the start=+' flag when reloading files with a timestamp, reverting to a cleaner load behavior. By preventing the application of this offset during reload, the script avoids potential compatibility issues or unexpected seeking behavior, ensuring more reliable file reloading. This change effectively streamlines how local media buffers are handled during the reload process.

This update modifies the paused-for-cache handler to reset the demuxer cache progress flag when entering a paused state. By ensuring demuxer_cache.has_progress is set to true upon a reload, we prevent potential race conditions where multiple reloads might be triggered immediately after one another. This change increases stability for stream recovery.

This update introduces a new automatic reloading mechanism that monitors the demuxer-cache-time property. If the demuxer cache fails to make progress within a configurable timeout window (defaulting to 20 seconds), the script will automatically reload the video as soon as the cache depletes. This makes stream recovery significantly more robust when handling silent network hangs or dropped streams.

The update expands the documentation with a concrete configuration example, which helps reduce ambiguity during initial setup and usage. There’s no code change here, but it should make the project easier to adopt and configure correctly. The practical effect is smoother onboarding for developers reading the README.

The reload.lua script has been extracted from the maintainer's dotfiles and moved into its own dedicated repository. This script automatically reloads online videos in mpv that get stuck buffering or suffer from a slow CDN source, while seamlessy maintaining the current playback position. Breaking it out into a standalone package makes it much simpler to discover, install, and track.

- End of feed -