Remix.run Logo
bob1029 2 days ago

There's never been a better time to consider writing your own media server solution from scratch.

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.

dewey 2 days ago | parent | next [-]

> You can get a modern chatbot to produce this experience in a single prompt.

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.

bob1029 a day ago | parent [-]

Quite the straw man we've constructed here.

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.

dewey a day ago | parent [-]

> I am the exclusive user and I only watch from browsers on laptops

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.

jeremycarter 2 days ago | parent | prev | next [-]

Check out https://siloserver.org . Silo has its own API but also spins up a Jellyfin-protocol compatibility layer. This allows you to use any Jellyfin client and just point it at your Silo server.

szmarczak 2 days ago | parent [-]

It's another vibe coded slop

phsau 2 days ago | parent [-]

It's already significantly better than Jellyfin, Plex, and Emby. Give it a try. The development team is active on their Discord. A lot of users are testing it.

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.

driverdan 2 days ago | parent | prev | next [-]

> Every practical use of that 50 gb copy of Home Alone would have you transcoding it. Most clients would choke on that bit rate.

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.

JamesSwift 2 days ago | parent | prev | next [-]

We should be clear about software vs hardware transcoding being different things. Hardware transcoding is "free" for even commodity hardware. Yes, lower end systems might have trouble keeping up with a blu-ray remux as its source to a high-bitrate target. But you can very easily buy an off the shelf mini-pc to act as a transcode-capable server and eliminate nearly all the downsides that come with trying to avoid transcoding.

Mixtape 2 days ago | parent [-]

Just to supplement your point with an anecdote: my first "proper" Jellyfin host was a retired Optiplex 3020. I added a 128GB SSD through one of those silly CD drive bay adapters and threw in a Quadro P400 that I bought off of eBay. On top of that, the actual server ran Proxmox with Jellyfin nested in an LXC container. By all accounts, the machine was a janky pile of e-waste given a new, horrible life through sheer stinginess.

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.

jerf 2 days ago | parent | prev | next [-]

"There's never been a better time to consider writing your own media server solution from scratch."

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.

dundarious a day ago | parent | prev | next [-]

If the novel parts are don't transcode, and clean up before adding to library, then you can just do that, right? Without having to create a frontend, which is the fiddly part (especially since losing the AppleTV client I can use with Jellyfin server would be a sacrifice). It's pretty easy to, for example, make a python script that grabs metadata from tmdb when given a URL (so the script has no need for disambiguation logic -- that's what humans are for), generate an ffmpeg command that adds that metadata, and does whatever re-encoding/re-muxing you want. Can embed subtitle files this way too.

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.

bambax 2 days ago | parent | prev | next [-]

Transcoding on demand is just trading compute for storage. If you have infinite storage you can store all definitions in advance for any possible client (I think that's what Netflix does); but if you don't, transcoding on demand is fine and isn't that much slower (a bit janky, yes, but only a bit).

jdboyd 2 days ago | parent | next [-]

I think most people would find that two or three definition is all they really need. 1080p h264 at high bit rate for compatibility on the local network and low bit rate 1080p for streaming remotely or to save space in local downloads for a trip.

eviks 2 days ago | parent | prev | next [-]

But since you don't have an infinite number of clients, just a few, there is no need for infinite storage

HumblyTossed 2 days ago | parent | prev [-]

> Transcoding on demand is just trading compute for storage.

And storage is getting expensive AF.

gamblor956 2 days ago | parent | prev | next [-]

You just described Plex 0.1.

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.

FrinkleFrankle 2 days ago | parent | prev | next [-]

Sounds cool. Care to share it?

butvacuum 2 days ago | parent | next [-]

sounds like a bastardized HTTP Live Streaming implementation- which is now fully supported by ffmpeg.

https://en.wikipedia.org/wiki/HTTP_Live_Streaming

bob1029 2 days ago | parent | prev [-]

I just did. Put the above into your favorite chat bot and append your preferred language, runtime environment and block storage provider.

worthless-trash 2 days ago | parent [-]

Out of tokens.

gib444 2 days ago | parent | prev [-]

Things are fast and simple when you ignore tradeoffs, such as extra disk space requirements