As I’m using audioserve for almost a year, I’m becoming quite keen about it – it’s exactly what I wanted – simple, lightweight and works as I needed. With it listening to audiobooks is just a simple pleasure. Recently I updated audioserve server with couple more features, which might not be essential, but can be useful: multiple transcoding formats ( meaning target formats) and transcoding cache.
Originally audioserve supported only opus codec and ogg container (which I think is still best choice) so I decided to refactor code to make it simple to use any other appropriate audio format and container (codec and container must be supported by ffmpeg indeed). And with this refactoring I added also support for ogg in webm container, mp3 and aac in ADTS container (as they have support in Media Source Extensions (MSE) in modern browsers, while ogg container has not). MSE can be used to create sophisticated web clients. There is one interesting gotcha in our transcoding – result of transcoding is directly send through pipe to HTTP response, stream cannot be than sought so no further updates done to container header, which is problem for many containers – for instance MP4 container cannot be used at all, WebM/Matroska is missing audio duration, which causes problem in seeking during playback.
Transcoding cache saves successfully transcoded files in LRU cache on disk. You can limit size of cache in respect of overall size and number of files. Cache can be beneficial, if you are often jumping between files or several users are listening to same audiobooks. But if just one user is listening to audiobooks in rather linear fashion (chapter by chapter, book by book), there is no benefit in using the cache. That’s why transcoding cache is optional feature in audioserve and you need to translate it with the feature
transcoding-cache explicitly enabled.