Skip to content

stream_curl: prefer full request at start 0 - #18503

Open
tsukinaha wants to merge 1 commit into
mpv-player:masterfrom
tsukinaha:patch/avoid-range-on-start
Open

tsukinaha wants to merge 1 commit into
mpv-player:masterfrom
tsukinaha:patch/avoid-range-on-start

Conversation

@tsukinaha

Copy link
Copy Markdown

Let the request starting at 0 not use http ranges.

Also, if this request gets a 200 response without Accept-Ranges header, send another request with range '0-'.

Let the request on start 0 dont use http ranges

Also, if this request cant get a 200 response with `Accept-Ranges` header,
send another request with range '0-'
@llyyr

llyyr commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

What problem is this fixing?

@tsukinaha

Copy link
Copy Markdown
Author

What problem is this fixing?

May make video startup faster on some CDN backed services, from some of my tests

@kasper93

kasper93 commented Sep 21, 2026

Copy link
Copy Markdown
Member

Also, if this request gets a 200 response without Accept-Ranges header, send another request with range '0-'.

That's exactly the reason why we don't do that. I want to minimize number of requests made at any given time. I'd be happy to discuss solutions if you say which servers need this change.

EDIT:

What problem is this fixing?

May make video startup faster on some CDN backed services, from some of my tests

Interesting. Open ended 0- should in practice be practically the same as request without range, so I'd like to see the difference in action. Which CDNs?

@tsukinaha

tsukinaha commented Sep 21, 2026

Copy link
Copy Markdown
Author

That's exactly the reason why we don't do that. I want to minimize number of requests made at any given time. I'd be happy to discuss solutions if you say which servers need this change.

Thx! I really like the new network backend.
I tested a Jellyfin server proxied by Cloudflare, and it is indeed much faster.
I examined the Jellyfin source code and found that they use a complex code path for range requests.
I also looked at how other players handle this and noticed that Exo's lack range headers, so I try making a change here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants