mpv-player / mpv-player/mpv

Pause or quit on I/O errors

Open
#5,879 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Scenario:

I'd like to play music off my phone. I plug in my phone, mount its filesystem with some FUSE driver (sshfs, mtpfs etc.), and run mpv over the music directory or a playlist file.

The problem occurs when I need to unplug my phone for a minute.

Ideally, mpv would play all it buffered, then stop as it encounters I/O errors, periodically checking if the file at the given path is available again, and resuming playback once it is.

Acceptably, mpv would quit (saving position) on I/O errors. Then, rerunning mpv should cause it to resume at the same spot.

Currently, when the underlying media becomes unreadable, mpv skips the rest of the file, then goes through all files in the playlist, causing it to lose its place.

What do you think about adding a switch that causes mpv to do one of the "ideally" / "acceptably" behaviour on I/O errors?

(I realize a music player is probably not mpv's primary purpose, but I think the same general issue also applies to video files.)

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 reproducing the failure with an unplugged FUSE-mounted phone while playing a file or playlist. Inspect mpv's I/O error handling and playlist advancement entry points, since the issue names no files or tests. Done means a chosen behavior is defined and verified: either pause and resume when the path returns, or quit while preserving the playback position.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.