`shuffle=yes` seems to not shuffle for initial playback
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
Start by reading the --shuffle option description and the startup playlist initialization path; the issue does not name source files or tests. Reproduce with the three command-line files and --loop-file=no --loop-playlist=yes --shuffle=yes, then compare the initial playlist order with the documented startup behavior. Done when the first playthrough is shuffled as documented, including when playlist looping is disabled.
Written by the indexing model from the issue text.
Description
mpv Information
$ mpv --version
mpv v0.42.0 Copyright © 2000-2026 mpv/MPlayer/mplayer2 projects
built on Nov 16 2026 23:02:33
libplacebo version: v7.387.0
FFmpeg version: 9.0.2 (runtime 9.1)
FFmpeg library versions:
libavcodec 63.1.102 (runtime 63.24.100)
libavdevice 63.1.102 (runtime 63.5.100)
libavfilter 12.1.102 (runtime 12.8.100)
libavformat 63.1.102 (runtime 63.16.100)
libavutil 61.1.102 (runtime 61.19.100)
libswresample 7.1.102 (runtime 7.6.100)
libswscale 10.1.102 (runtime 10.5.100)
Other Information
- Linux version:
- Kernel Version:
- GPU Model:
- Mesa/GPU Driver Version:
- Window Manager and Version:
- Source of mpv: https://www.deb-multimedia.org/
- Latest known working version:
- Issue started after the following happened:
Reproduction Steps
mpv --loop-file=no --loop-playlist=yes --shuffle=yes first.mp3 second.mp3 third.mp3
Expected Behavior
man mpv says:
--shuffle=<yes|no>
Play files in random order. This works by shuffling the playlist at the following points:
1. At player startup before playback starts. The files specified on the command line are shuffled. Note that the directories and playlist files in these arguments are not expanded at this time, so their contents are not shuffled until the situation 2
mentioned below happens. To expand these lists at startup, use --playlist.
2. When loading a directory or playlist file, either with loadlist command or by playing a playlist file in the current playlist. The items in the loaded playlist are shuffled before they are added to the current playlist. Other existing items are not
shuffled.
3. When --loop-playlist is enabled, the player performs a shuffle after looping.
... as per 1. i'd expect them to not be played in order, but always shuffled.
Actual Behavior
The specified command appears to always play these in the order they are specified for the first playthrough.
In fact, with --loop-playlist=no, no shuffling happens for the first-and-only playthrough.
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.4k
- Forks
- 3.7k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 60
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
-
Broken links in reference manualPossibly taken @farisbasha claimed this 14 days ago. Opencore:meson
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mpv-player/mpv#18934 · 3 comments ·
Maintainers usually reply within 1 day
-
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
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
libsndfile/libsndfile#1239 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100