by bob1029 · 4mo ago · 0 comments
I really don't like the idea of transcoding on demand. It has always created a janky experience on the client. I've been using a custom solution that runs everything through ffmpeg normalization as part of the media upload phase. Whenever a client wants to stream something we give them raw byte ranges directly from the block storage provider. In practice, this feels like flipping the channels on an analog tv. Every video starts and seeks nearly instantly.
I've long since given up on the dream of maintaining lossless master copies of everything just in case. Every practical use of that 50 gb copy of Home Alone would have you transcoding it. Most clients would choke on that bit rate. When would you actually be able to use all of the available information? Why not just discard what you'll never use? I realize it feels offensive to kill information like this but you can do a much better job with the end experience if you do.
You can get a modern chatbot to produce this experience in a single prompt. The code can run on anything slightly more powerful than a potato because you aren't transcoding at playback time anymore. A raspberry pi would be more than enough to serve a few clients on a LAN. If you remain humble in your list of demands (a simple directory browser that plays videos linked within), you can more easily achieve total autonomy.
If you value your time that little and you get more joy out of building apps for multiple platforms instead of watching movies then this is the best choice. For everyone else it's probably better to just go with any of the hundres of solutions that went through years of bug fixing and pain already to get it working on all these platforms.
I am the exclusive user and I only watch from browsers on laptops and desktops attached to whatever display and audio outputs. I suspect this describes a non-trivial portion of the audience here as well. I don't care about someone being able to watch my media collection on Xbox because I don't have one.
People doing that don't need a media server like Plex or Jellyfin, you just need a directory on your computer. People who use Jellyfin or Plex have a very different case of running it on servers, then streaming it to TVs, streaming boxes and mobile devices.
There's a reason they turned to transcoding: it means every device can get the highest quality version it is capable of displaying. Your solution limits the video to the lowest common supported quality.
It's currently running a PB+ media library (which neither Jellyfin nor Emby can run) with native clients across multiple platforms. It will unseat Jellyfin.
You mean the one guy who prompts Claude?
What clients are you using? I use the highest bitrate HDR videos possible. I very rarely have to transcode. 4k TVs are cheap as are 4k streaming devices.
The main case for transcoding is playing a video in a browser that doesn't support the original codec. Everything can handle high bitrate streams now. The one other rare exception is video that's over 100Mbit/s. I've encountered a few that are that high and some streaming boxes can only handle 100Mb.
There were quirks (mostly self-imposed ones) to getting the whole thing set up, but it ran like a champ for the better part of a year. Hardware transcoding really does make a world of difference, even in the worst of cases.
If you want to go the hacker route, and do not give a flying fig about UI, you can get a long way just by setting up any old webserver that has range support (which is most of them) and serving out directories with video files and some sort of automated index. You don't even need to do any work. Browsers already are smart enough to hit a video file, extract the playback metadata with range requests and provide native seeking, speed management, and some of the other basics. Plus you get native "right click (or equivalent) -> download" support without anything giving you hassles.
On the one hand, it's missing a lot of features. On the other hand, it can't be beat for simplicity and the bang-for-the-buck is pretty good. And anything capable of A: running an HTTP server at all and B: has enough storage to store the files can saturate whatever network it is on with video data if you want it to.
e.g., of generated command: ffmpeg -y -hide_banner -i /mnt/storage/rips/bluray.mkv -i ./eng.sdr.srt -map 0:v -map 0:a -map 1 -c:v copy -c:a copy -c:s mov_text -metadata:s:a:0 language=eng -metadata:s:a:0 title=eng -metadata:s:s:0 language=eng -metadata:s:s:0 title="English (SDR)" -disposition:s:0 hearing_impaired -metadata title="Film Title" -metadata genre="Pretentious Comedy" -metadata artist="Alan Smithee" -metadata date=2026 -f mp4 -movflags +faststart "/mnt/storage/movies/Film Title (2026).mp4"
Do whatever encoding you want in advance too of course. Note, the above is generated from a script (not created manually) that is run like `./cleanvideo.py ./bluray.mkv ./eng.sdr.srt https://www.themoviedb.org/movie/985-eraserhead`
After doing this for over a decade, I find that Jellyfin, or even just a caddy directory listing, make a great media library browser. Jellyfin will almost never identify things incorrectly. Can always fall back to just listing things and playing your content with `mpv https://machine.tailnet-name.ts.net/movies/...` even remotely given the use of tailscale. Or VLC from my phone, etc.
And storage is getting expensive AF.