Michael Zucchi

 B.E. (Comp. Sys. Eng.)

  also known as zed
  & handle of notzed


android (44)
beagle (63)
biographical (101)
blogz (9)
business (1)
code (74)
compilerz (1)
cooking (31)
dez (7)
dusk (31)
extensionz (1)
ffts (3)
forth (3)
free software (4)
games (32)
gloat (2)
globalisation (1)
gnu (4)
graphics (16)
gsoc (4)
hacking (455)
haiku (2)
horticulture (10)
house (23)
hsa (6)
humour (7)
imagez (28)
java (231)
java ee (3)
javafx (49)
jjmpeg (81)
junk (3)
kobo (15)
libeze (7)
linux (5)
mediaz (27)
ml (15)
nativez (10)
opencl (120)
os (17)
panamaz (5)
parallella (97)
pdfz (8)
philosophy (26)
picfx (2)
players (1)
playerz (2)
politics (7)
ps3 (12)
puppybits (17)
rants (137)
readerz (8)
rez (1)
socles (36)
termz (3)
videoz (6)
vulkan (3)
wanki (3)
workshop (3)
zcl (4)
zedzone (24)
Friday, 20 November 2020, 05:54

playerz: a music player

I got sick of mocp crashing every couple of days so i've finally got the music player I was working on last year into a state good enough to replace what I was using it for. It's still early alpha software and I don't have a project page for it or any documentation but the code is at https://code.zedzone.space/. It requires an old version of libeze, possibly the earliest that was checked in but I haven't checked.

Originally I was coding this for a beagleboard or the like where the player would be used without a graphical interface. It would automatically detect and scan new media and remember old media so re-inserting media would be fast. I also experimented with a 'talking' menu driven by a remote (Mele airmouse). Since i've now moved my old pc to under the TV i'm just targeting that now.

It consists of a bunch of services which comminucate using posix message queues.


Plays the music and allows navigation forward/reverse through the (shuffled) playlist. A rudimentary 'talking menu' has been implemented using espeak-ng but seems broken at the moment.

ffmpeg is used to parse and decode the media and to perform automatic volume leveling, and ALSA is used for audio output.


Recursively scans mounted disks (or directories) looking for music files and gathers metadata from them and writes them to an index. It handles re-scans efficiently by only scanning for changes. It also generates the shuffle table across all files. lmdb is used for the database backend.


Monitors a raw input device for user input and sends commands off to the player. It is hard-coded to the Mele air-mouse but due to some issues with the USB stack device naming in Linux it can't always find the mouse device which is used for some of the controls.


Checks for removable media to become available or be removed via raw kernel UEVENTs. New media is mounted read-only and passed to the disk indexer for a (re)scan. Removed media is marked as unavailable.


A command line tool to send various commands to the player such as next or previous and so on.

mocp was having trouble with a collection of about 160K music files I have, and the TUI was pretty slow every time I started it. Indexing same said files takes about 20 minutes with playerz (I dunno roughly on par with mocp?) but restarting the player is basically instant.

I'm doing some web stuff for work at the moment so will probably look at some web control stuff, although for now the Mele air-mouse does most of what I need (skip to next song).

Even though i've done fuck all this year i'm getting a bit sick of work. Nothing interesting to work on and the company I work for has been trying to bilk me out of long service leave (13 weeks paid time off) - something I should have had 5 years ago. Really just want to retire but i'm a bit too young yet for that even if I have really nothing to work for anymore.

Tagged code, hacking, players.
Quit my job! | Going nowhere
Copyright (C) 2019 Michael Zucchi, All Rights Reserved. Powered by gcc & me!