`shuffle=yes` seems to not shuffle for initial playback

Aperta Adatta ai principianti
#18,927 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c
Ambito
backend, cli

Direzione di ricerca

Inizia leggendo la descrizione dell’opzione --shuffle e il percorso di inizializzazione della playlist all’avvio; l’issue non indica file sorgente né test. Riproduci il problema con i tre file da riga di comando e --loop-file=no --loop-playlist=yes --shuffle=yes, poi confronta l’ordine iniziale della playlist con il comportamento di avvio documentato. Il lavoro è completato quando la prima riproduzione segue l’ordine casuale documentato, anche se la ripetizione della playlist è disattivata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

os:linux
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

log.txt

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.
Lingua principale
C
Stelle
38.4k
Fork
3.7k
Merge medio
1g 22h
PR unite (30g)
60

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mpv-player/mpv

Tutte le issue di mpv-player/mpv

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.