mpv-player / mpv-player/mpv

`autocreate-playlist=same` plays the wrong file (first file) of a folder with extremely long file paths

Open
#16,460 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

os:win
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv Information
mpv v0.40.0-135-ge8ade130f Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Jun 18 2025 00:44:11
libplacebo version: v7.351.0 (v7.351.0-16-gd2aae3d-dirty)
FFmpeg version: N-119918-gee1f79b0f
FFmpeg library versions:
   libavcodec      62.3.101
   libavdevice     62.0.100
   libavfilter     11.0.100
   libavformat     62.1.100
   libavutil       60.3.100
   libswresample   6.0.100
   libswscale      9.0.100
Other Information
- Windows version: Windows 10 Pro 64-bit
- GPU model, driver and version: NVIDIA GeForce RTX 3060 Ti, driver 576.52
- Source of mpv: shinchiro
- Latest known working version: Don't know
- Issue started after the following happened: Opening files with long file paths
Reproduction Steps
  1. Start with latest shinchiro build and create a 'portable_config' folder.
  2. In the 'portable_config' folder, create 'mpv.conf' with only the single line autocreate-playlist=same.
  3. Have a folder with multiple video files and an extremely long file path. The files I tested had a path with around 366 characters including the file extension.
  4. Open 'mpv.exe' and drag in a video file from the folder with the long file path other than the first video. For example, if you have a TV show with 'S01E01', 'S01E02', 'S01E03', etc., try dragging in any file other than 'S01E01'. For this reproduction step, let's go with 'S01E03'.
Expected Behavior

The file with 'S01E03' was expected to play in mpv.

Actual Behavior

The first file in the folder played ('S01E01').

When I renamed the extremely long folder to fewer characters (I cut the entire file path down to 232 characters), the proper video with 'S01E03' in the name started playing.

Log File

output.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:
  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • 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.

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 issue with mpv.conf set to autocreate-playlist=same, a Windows path around 366 characters, and the attached output.txt log. Trace the handling of the dragged file and playlist creation under long paths; done means the selected file, such as S01E03, plays instead of the folder's first file.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.