hello everyone, I wanted to share a little project I've been working on for a few months now. originally it was for my personal use.
I use jellyfin a lot on several clients including mobile and pc and I found it a bit unfortunate that the server had to run quite heavy and slow processes to remux or transcode the audio of movies, I thought we could do it in the browser, directly remux the stream client-side and transcode the audio client-side.
this system was initially developed in my personal web client Laterna, and I decided to make it available as a plugin so that jellyfin-web could benefit from these advantages.
Lumen can therefore remux mkv to fragmented mp4 directly in the browser, and it can decode and convert dts, truehd, ac3, eac3 audio tracks and re-encode them to aac or opus if necessary while preserving as many channels as possible. Lumen allows this while keeping the original video track and the browser's native hardware decoding when supported, preserving HDR among other things.
If lumen can't play the video, it automatically falls back to the standard jellyfin player.
This local processing allows mainly 2 things: minimal processing on the server side, and a noticeable speed improvement in 3 aspects: playback startup speed, seeking speed, audio track switching speed.
Here are some median results from my tests on files that normally require server-side remuxing or audio transcoding (standard jellyfin player -> Lumen):
Chrome on Windows:
- playback startup: 3.6s -> 1.7s
- seek: 2.2s -> 0.5s
- audio track change: 5.0s -> 0.6s
iPhone (Jellyfin iOS app):
- playback startup: 3.8s -> 1.0s
- seek: 2.7s -> 1.0s
- audio track change: 6.1s -> 0.7s
of course these results depend on the server, network, device and files.
This project taught me a lot about how video playback works on the web, and I'm very happy with the result and thought you might appreciate it too.
This project was developed in large part with Claude Code, with which I spent a lot of time working on the architecture, tests and solving the different issues I encountered.
the project is entirely open source under the agpl-3.0 license.
GitHub: https://github.com/LK59/lumen
Documentation: https://laterna.fr/en/lumen/
I'd be really interested in your feedback, especially on the different browsers, devices and formats in your libraries, thanks!
PS: english is not my first language, I used an LLM to translate my original french post. The original french version is in the comments below.