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.