I moved my media server's transcoding to RAM, and buffering on remote streams disappeared

I moved my media server's transcoding to RAM, and buffering on remote streams disappeared

Published Nov 9, 2026, 11:31 AM EST Anurag is an experienced journalist and author who’s been covering tech for the past 5 years, with a focus on Windows, Android, and Apple. He’s written for sites like Android Police, Neowin, Dexerto, and MakeTechEasier. Anurag’s always pumped about tech and loves getting his hands on the latest gadgets. When he's not procrastinating, you’ll probably find him catching the newest movies in theaters or scrolling through Twitter from his bed. Running your own media server is all fun and games until you try streaming something outside your home network and it starts buffering. I've been using Jellyfin on my NAS for a while now, and while local playback works without issues, remote streaming hasn't always been reliable. It was particularly frustrating because my NAS could handle transcoding, yet I would still run into buffering during playback. I eventually came across a simple tweak that involved moving Jellyfin's temporary transcoding files from storage to RAM. The idea is that instead of constantly writing and reading these files from a drive, the server uses system memory. I tried it, and the difference was immediate. Remote streams that struggled with buffering started playing smoothly, without me changing the video quality or upgrading any hardware. How transcoding to RAM actually works Your media server needs temporary storage Before getting into why moving transcoding to RAM made such a difference, it helps to understand what happens when you stream something from your media server. If your device supports the original video format and your connection has enough bandwidth, Jellyfin can simply send the file over without changing anything. This is called Direct Play, and it's generally the most efficient way to stream your media. However, things get a little more complicated when you're streaming remotely. Your internet connection might not have enough bandwidth for the original file, or the device you're watching on might not support its video or audio format. That's where transcoding comes in. Jellyfin uses FFmpeg to convert the video into a compatible format or lower bitrate. During this process, it generates temporary video segments that your device downloads and plays. By default, these files are typically written to a directory on your server's storage, which means the server has to write and read them during playback continuously. This usually works fine, but storage can become a bottleneck if your drives are already busy handling other tasks. This is especially relevant for NAS setups running multiple services alongside Jellyfin. Moving transcoding to RAM changes where those temporary files are stored. Linux has a feature called tmpfs that lets you create a temporary filesystem backed by system memory. By pointing Jellyfin's transcoding directory to it, the server can store and retrieve those segments from RAM instead of repeatedly accessing a physical drive. RAM offers much lower access latency than a traditional hard drive, removing a potential source of I/O delays. A small change to the transcoding directory The good thing about this tweak is that you don't need to change much about your existing media server setup. You need to give Jellyfin a RAM-backed directory to store its temporary transcoding files. I run Jellyfin through Docker on my NAS, so the process was fairly straightforward. Docker supports tmpfs mounts, which let you create a temporary filesystem that uses system memory instead of physical storage. You can configure one directly in your Docker Compose file. Here's an example of what you need to add under the Jellyfin service's existing volumes configuration: - type: tmpfs target: /transcode tmpfs: size: 1073741824 This creates a 1GB RAM-backed directory inside the container. You can adjust the size depending on how much memory your server has available. Just make sure you add it alongside your existing mounts, not replacing them. After you save the changes and recreate the container, open Jellyfin's web dashboard and go to Playback > Transcoding. Find the transcoding path setting and change it to /transcode. Save the configuration, and Jellyfin will start using the new location for temporary transcoding files. Plex users can do something similar by creating a RAM-backed directory and pointing the Transcoder temporary directory setting to it. Remote streaming finally works without buffering A noticeable improvement without upgrading hardware The difference was noticeable almost immediately. Before this change, I occasionally ran into buffering when streaming from Jellyfin outside my home network, even though the NAS had enough processing power to handle transcoding. After moving the temporary files to RAM, those interruptions disappeared. I could stream the same content remotely without lowering the playback quality or making any other changes to my setup. Of course, moving transcoding to RAM won't fix every buffering problem. If your internet upload speed is too slow or your CPU or GPU can't transcode the video fast enough, you'll still run into issues. This tweak helps when storage I/O contributes to the problem. One thing worth considering is memory allocation. My NAS has 8GB of RAM, which also needs to accommodate the operating system and other services. A RAM disk uses memory as files accumulate, so you need to leave enough headroom for everything else. If the directory fills up during transcoding, playback can fail. Jellyfin iOS compatible Yes Android compatible Yes Desktop compatible Yes

Original Source

Read the full article at Xda-developers →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.