Self-hosted audio/video

GainDrive

Full-featured OpenSubsonic-compatible audio and video server, with its own Web, Android and iOS players. Open source (GPLv3).

Components

Complete audio and video self-hosting suite

Background

Why and how.

I have been using the original Subsonic server together with the DSub Android app for many years, but have always missed various features (e.g. unified treatment of audio and video, or casting from Firefox, or a flexible upload mechanism). None of the (many) alternatives was a perfect fit for me either. GainDrive was started as a summer holiday experiment to use AI to do most of the tedious work of writing both server and client apps from the ground up, using modern techniques and libraries, and adding the features I always wanted in an audio/video server and player.

AI was great to get things off the ground quickly. A reasonably working server took about 3-4 weeks, most of which was because I required time to think about the design. The Android app similarly was in a usable state within a week, and the iOS app is essentially an automated rewrite of the Android app.

Nevertheless, getting all details fixed was substantially more work. For some problems AI can create great one-shot solutions, but most non-trivial ones often take a lot of careful testing and pushing back against what the AI wants to do. It can produce insanely complex solutions for problems that do not require them, or insist on using old broken APIs even when told new improved ones exist. I went back on earlier choices several times because I did not attempt to fully internalise the AI-written plan before approval, and found that we had painted ourselves into a corner. So you still need extensive manual testing to find logic bugs or things which work different on different devices, and you still need to know what is possible and have a feeling for the good and bad solutions yourself. This took many more months.

I did occasionally write some of the source by hand when that would get me to a bug fix or feature quicker (more so in the server than the clients), but the vast majority of it was written by Claude (first Opus 5, later Fable 5.1 and then Opus 5.5) under my supervision. It cranks out enormous amounts of code if you let it, often much more than I would like, and I did need to force it several times into a refactoring mode to avoid things from becoming unreadable by humans.

In any case, GainDrive is what I need to self-host all the audio and video that I listen to and watch, without the things I never use (your mileage will vary). The key advantage (load-bearing, honestly ...) is that I now have everything under my own control, and can add new things that I come up with easily. Creating all this with AI was a different kind of “fun” than doing it by hand, but without it, I would most certainly never have had the time to finish it.

- Kasper Peeters, August 2026