mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Increase read timeout for appending files

Open CueXXIII opened this issue 2 months ago • 3 comments

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

CueXXIII avatar Nov 26 '25 10:11 CueXXIII

Does RETRY_TIMEOUT vs MAX_RETRIES make a difference for you? We could make them both configurable I guess.

Dudemanguy avatar Nov 26 '25 14:11 Dudemanguy

I think the result might be less smooth when i increase RETRY_TIMEOUT instead of MAX_RETRIES but I'll try it.

But if, there should be only one configuraton option I think, and that should be the retry time in seconds.

CueXXIII avatar Nov 26 '25 14:11 CueXXIII

related https://github.com/mpv-player/mpv/pull/15998

kasper93 avatar Nov 26 '25 16:11 kasper93