0

I have the following problem with the Gstreamer player gst123:

when I'm playing back folders gst123 does not play the files in alphabetical order. When I have my files ordered like this:

01.mp3
02.mp3
03.mp3

I would expect the player to play the files back in this order, which it doesn't. I also did not really grasp which order it is actually using. gst123 does have some options to not play in order:

   -z, --shuffle
          Shuffle playlist before playing.

   -Z, --random
          Play files in random order forever.

I'm not using any of these.

Does anyone know this problem or a way to fix it?

I'm using gst123 version: 0.3.3-1+b3

The gstreamer plugins that I'm using are:

gstreamer1.0-plugins-ugly/testing,now 1.12.2-1 i386
gstreamer1.0-plugins-good/testing,now 1.12.2-1 i386
gstreamer1.0-plugins-base/testing,now 1.12.2-1 i386
gstreamer1.0-plugins-bad/testing,now 1.12.2-1 i386

for some reasons I was not able to playback MP3 after some upgrades so I also installed:

gstreamer1.0-fluendo-mp3

I'm using a:

Debian GNU/Linux buster/sid
Kernel: Linux 4.11.0-1-686-pae
nath
  • 5,694
  • Does the playback order match the output of ls -f? If so it is probably just using the order that readdir() returns. A fix might be to list the files explicitly with directory/* – icarus Jul 27 '17 at 21:05
  • @icarus much thanks, you fixed it. WOW I can use may favourite player again. -> if you want to turn this into an answer? It is already as much as accepted :-) – nath Jul 27 '17 at 21:58

1 Answers1

2

There is no requirement that the entries are stored in any particular order. Programs like ls typically sort them, and the shell also sorts them when it expands filenames. The sorting is determined by the locale, and in particular the LC_ALL or LC_COLLATE environment variables. You can create custom locales if you would like particular sorting orders, see these answers

To see the unsorted list of filenames use ls -fa (f for fast, a for all), which just lists the files in the order that readdir() presents them.

For the filenames shown in the question, just giving directoryname/* will give the filenames in the correct order to the player.

icarus
  • 17,920