Caching a downloading file preserves the incomplete portions of track after downloading is complete
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Provide following Information:
- mpv version: mpv 0.33.1-2
- Linux Distribution and Version: Arch Linux
- Source of the mpv binary: Arch Linux repositories
- If known which version of mpv introduced the problem: N/A
- Window Manager and version: i3 version 4.19.1
- GPU driver and version: NVIDIA 470.57.02
- Possible screenshot or video of visual glitches:
Here you can see the progress bar of the file being downloaded

But mpv assumes the file is completely cached

Then once the file is completely downloaded, the video still plays as if it were incomplete

If I force mpv to recache the file, e.g., change audio tracks, then the file plays normally

Reproduction Steps
- Open file which is in the process of downloading with mpv (ensure that caching is enabled and greater than the size of the file)
- Pause and wait until the file is completely downloaded
- Play the file
Expected Behavior
Mpv will be able to cache portions of the file as it is downloaded, normal playthrough
Actual Behavior
The file is cached in the same incomplete state as when it was originally opened in mpv and freezes as if the file were still incomplete
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using a file that is still downloading, with caching enabled and larger than the file, then pause until downloading completes. Start by tracing mpv's file-cache handling from the reproduction steps and compare the cached state before and after completion. Done means playback uses the completed file normally without forcing a recache.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100