mpv-player / mpv-player/mpv

Add percent threshold to determine when to start buffering

Open
#9,442 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta:feature-request
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Before requesting a new feature make sure it hasn't been requested yet.
https://github.com/mpv-player/mpv/labels/meta%3Afeature-request

Note: https://github.com/mpv-player/mpv/pull/5787 a pull request very similar to my feature request

Expected behavior of the wanted feature

Add a feature to delay buffering until the remaining cache reach a percent of the demuxer-max-bytes.

This will be helpful for watching large videos offline (specially with an external hard drive) with sizes more than demuxer-max-bytes.

The current behavior is it starts buffering continuously to satisfy demuxer-max-bytes. It makes the external HDD spin non stop until the video is paused or closed. The OS can't put the ext HDD to sleep leading to worse battery life for laptops.

Alternative behavior of the wanted feature

//

Log file

Even if you think it's not necessary at first, it might help us later to find
possible issues. Make a log file made with -v -v or --log-file=output.txt, paste
it to https://0x0.st/ or attach it to the github issue, and replace this text
with a link to it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing pull request 5787 and the existing handling of demuxer-max-bytes. Determine how the remaining cache threshold should control buffering for large offline videos, and consider the battery-life behavior described in the issue. Done means the feature delays buffering until the configured percentage threshold is reached.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.