mpv-player / mpv-player/mpv

Increase read timeout for appending files

Open
#17,081 3 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

Expected behavior of the wanted feature

The current timeout for reading from appended files currently is hardcoded to 2s in stream/stream_file.c. This is too low for live streams downloaded with yt-dlp. Some of them come in chunks every 5s, and I even have seen 10s with twitch. Increasing the timeout to 1 minute would work by setting

#define MAX_RETRIES 300
Alternative behavior of the wanted feature

If there a reasons for having a timeout of 2s, the timeout value should be configurable. I don't think that should be neccessary.

Log File

No response

Sample Files

No response

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 in stream/stream_file.c and inspect the hardcoded MAX_RETRIES value that controls reading from appended files. Confirm the timeout behavior for delayed chunks, then verify that the resulting read timeout reaches one minute as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.