audioserve

audioserve is my Precious - one of first projects I've started in Rust (this bit explains it's messy code, as I started without almost any Rust knowledge, in day where async and await where not available and I had mappings and thens). I use it for listening audiobooks almost every day (and I think some other users do), and it was presented at Merge Conference 2024 in Berlin, as product of brightest star of Open Source :-) (story behind this is quite interesting - I may share it someday). The rest of page is generated by AI, so just summaries known fact about it.

audioserve is a simple, self-hosted streaming server for audiobooks (and music), written in Rust. Unlike most media servers it does not rely on audio tags, which are often messed up in audiobooks. It serves the collection as it is stored on disk, following a reasonable directory structure. It follows the KISS principle: it does only what is needed to listen to audiobooks comfortably, and does it well.

Main features

  • Common audio formats (mp3, opus, m4b, m4a, ...), with optional transcoding to opus via ffmpeg to save bandwidth
  • Browsing collection by its directory structure, with folder-level cover images and descriptions, plus simple search
  • Playing whole books chapter after chapter, quick seek even in long files, and continuing from the last position
  • Simple authentication by shared secret and optional TLS – it's a personal server, not a multi-user platform
  • Progressive web client caching ahead chapters or whole folders (Service Worker and Cache Storage), so you can listen offline or through network outages
  • Small, lean and fast – single binary built on hyper without a heavy framework; Docker image available

Today audioserve is basically finished and in maintenance mode – dependencies are kept up to date and occasional fixes are made.

History

Audioserve started in early 2018 as my exercise in Rust, after I had looked for a good media server for audiobooks and was not satisfied. Articles about its development:

The work on audioserve also produced several more technical Rust articles, e.g. Future Is A State Machine, Static Build of Rust Executables, Hyper Websocket and Hyper and TLS. Its popularity is analyzed in Analyzing Project Popularity on Github.