--autocreate-playlist plays wrong file when filename differs in unicode or case
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by tracing how --autocreate-playlist identifies and compares paths, then inspect the related file search and saved-position handling mentioned in the issue. The report describes several affected behaviors but does not name source files or tests, and points to a deeper file identity design problem. Done means the requested path plays correctly on filesystems that normalize Unicode or ignore case, without breaking the other reported behaviors.
Written by the indexing model from the issue text.
Description
mpv Information
mpv v0.42.0 Copyright © 2000-2026 mpv/MPlayer/mplayer2 projects
built on Nov 5 2026 00:13:11
libplacebo version: v7.387.0 (v7.387.0-11-g0e435227-dirty)
FFmpeg version: N-128420-gbaa68e68b3
FFmpeg library versions:
libavcodec 63.26.100
libavdevice 63.6.100
libavfilter 12.12.100
libavformat 63.18.100
libavutil 61.20.100
libswresample 7.7.100
libswscale 10.6.100
Other Information
- macOS version:macOS 15.8.2 (24H232)
- Source of mpv:github
- Latest known working version:unknown
- The time when the problem started to happen:noticed on 0.42.0
Reproduction Steps
I was investigating why double clicking a file in macos' finder with katakana in its basename, together with --autocreate-playlist, was opening the wrong file.
I figured out it had to do with ザ being in the filename in composed unicode form.
for example:
# が in two forms: composed U+304C, decomposed U+304B U+3099.
composed=$(printf '\343\201\214')
decomposed=$(printf '\343\201\213\343\202\231')
# create two identical videos
mpv --no-config --ao=null av://lavfi:testsrc=d=0.2 --o=a.mkv
cp a.mkv "$composed.mkv"
# both are the same file (inode is identical)
stat -f %i "$composed.mkv" "$decomposed.mkv"
mpv --no-config --vo=null --ao=null --autocreate-playlist=filter "$composed.mkv"
# Playing: .../が.mkv
mpv --no-config --vo=null --ao=null --autocreate-playlist=filter "$decomposed.mkv"
# Playing: .../a.mkv
# Playing: .../が.mkv
then I realised this is not specific to unicode. casefolding file systems outsided of macos are probably affected too.
# on a case-insensitive fs, with a.mkv and b.mkv in the directory
mpv --no-config --autocreate-playlist=filter B.mkv
# Playing: .../a.mkv
# Playing: .../b.mkv
the attached log is from the "$decomposed" command.
the underlying issue seems to be a deeper one: mpv treats a path string as the file identity, which is arguably incorrect.
some examples of what this leads to in 0.42:
- the wrong file plays with --autocreate-playlist
- one file gets two saved positions, e.g. via b.mkv and B.mkv
- mpv --sub-file=b.srt b.mkv shows b.srt as two subtitle tracks
and possibly others. all of this was tested only on macos with APFS.
related, as far as I can tell:
- #1027 (2014): closed as a macos problem
- #4016, #4067 (2017): fixed only for file search
- #495, #12303 (2014, 2024): saved positions, partially fixed
Expected Behavior
the opened file plays
Actual Behavior
the first file in the directory plays instead (or the first one with a saved position)
Log File
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
- I tested and confirmed that the issue exists with the latest release version or newer.
- I provided all required information including system and mpv version.
- I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- I attached the full, untruncated log file.
- I attached the backtrace in the case of a crash.
- Dominant language
- C
- Stars
- 38.2k
- Forks
- 3.7k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 76
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
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.
More from mpv-player/mpv
-
meta:feature-request
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
mpv-player/mpv#18855 · 2 comments ·
Maintainers usually reply within 1 day
-
meta:feature-request
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
mpv-player/mpv#18683 · 4 comments ·
Maintainers usually reply within 1 day
-
Subtitle delay value displays "-0ms"May be free again A pull request for this issue was closed without being merged. Openos:linux
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
mpv-player/mpv#18649 · 1 comment ·
Maintainers usually reply within 1 day
-
meta:feature-request
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mpv-player/mpv#18464 ·
Maintainers usually reply within 1 day
-
Keyboard shortcut next and previous secondary subtitle filePossibly taken @ravarnax claimed this 225 days ago. Openmeta:feature-request
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mpv-player/mpv#17693 · 5 comments · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
`sha256()` returns a wrong hash when libsql-ffi is built with gcc 11 or laterPossibly taken @colinhacks claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tursodatabase/libsql#2333 ·
Maintainers usually reply within 11 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OpenPrinting/cups#1826 ·
Maintainers usually reply within 1 day
-
Backport to 3.0 advertises a suffix that does not existPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
389ds/389-ds-base#8152 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RetroAchievements/rcheevos#580 · 1 comment ·
Maintainers usually reply within 5 days