1. Current Location: Home >  NAS >  Jellyfin is too slow to hang up on cloud drives; strm is a few KB up to 4GB

Jellyfin is too slow to hang up on cloud drives; strm is a few KB up to 4GB

strm solution schematic: The mounting drive directly adds databases to scan, reads file headers, and is limited in speed. Compared to strm, it completes instantly, only looking at the file name

Last month, I installed Alibaba Cloud Drive into Feiniu, and that very night I did something self-imported: I added the mounting directory directly to Jellyfin's media library, thinking the poster wall would be complete by the next day. But the next morning, when I checked, the scanning progress bar was stuck at about forty movies, and it wasn't finished. On the TV, I opened the media library, and dozens of posters were scattered everywhere, with only black grids waiting to be swept in.

What hurts even more is the data—when I opened the cloud storage app, I saw over two gigabytes downloaded from the cloud overnight. What I bought was a fake fix that didn't touch the local hard drive, basically using the speed limit of the cloud drive to buy a bunch of files that no one reads. This article will clearly explain the root cause of this pitfall and my solution. If you want to upload to the poster wall via cloud drive, don't do what I did on the first night.

Let's start with the root cause: scanning the database isn't about looking at the file name; it's about reading the beginning of every file

I always thought Jellyfin scanning media libraries was just a file list, matching posters on TMDB by name, and that was it. After checking the materials and staring at my own machine for a long time, I realized it wasn't the case: before each video file is stored, it uses FFPROBE to read the file header to clarify the packaging format, video encoding, audio track, subtitle track, duration, and other information. These are used for transcoding during broadcasting.

Reading a file header from a local hard drive is a matter of milliseconds, so it doesn't matter. The mounting trays are different. I wrote in my article cloud drive mounting, that OpenList mounts essentially have the NAS fetch data from the cloud drive for you, and even when reading files, you have to download a few MB of files from the actual file. A movie of a few MB isn't much, but in my home media library, local and cloud storage totaled 317 movies and 86 dramas. Each series required seven or eight files, totaling hundreds of files in the queue. What's worse, Jellyfin scans are read concurrently, with dozens of ffprobes hitting the mount layer at once. The cloud drive is limited in speed (I didn't buy the privilege pack, 16 threads only about 9MB/s), and the queue keeps getting longer.

So that night, the scene was: scanning waiting to download, downloading being throttled, and throttling because of too many concurrency—a vicious cycle. This isn't a Jellyfin bug; it's a natural contradiction of using cloud drives as local drives for database sweeping—the more work you have to read files, the more traffic and waiting there are.

What is strm: a few KB equals 4GB of account

The

solution is quite unsophisticated: generate an STRAM file for each movie. It's just plain text, with the .strm extension, and only one line of text inside—the playback address for this movie. File names should follow the media library's specifications, for example, "Avatar (2009).strm" and placed under the "Movies/Avatar (2009)/" directory.

Jellyfin, Emby, and Kodi natively recognize strm and treat it as a media file in their library. The key difference is this: during scanning, it only uses the file name to scrape and match the poster and description, not the actual opening and reading of the address in the strm. In other words, previously, you had to read the actual number of MB of information from a 4GB movie before entering the database; now you only need to look at a 4KB file name. Hundreds of documents, just a matter of seconds.

The actual time to load streaming from the cloud drive is postponed until you click play. The accounting in between is easy to calculate: during the database creation phase, the data goes from "hundreds of speed-constrained downloads" to "hundreds of local file name reads," and data drops from over two gigabytes to zero. When playing, the speed limit should still be limited (that's the benefit package, two videos don't count twice), but at least the movie you don't watch won't change a single byte.

Let me first test three movies by hand: it's a single line of command

Before installing the tools, I usually manually run the minimum closed loop and also check whether this solution works in my home environment. A new catalog was created, three movies, two commands for each

mkdir -p /vol1/1000/strm/movie/avatar\(2009\).

echo "http://192.168.31.10:5244/d/ Aliyundisk/Movie/Avatar(2009).mkv"> /vol1/1000/strm/Movie/Avatar\(2009\)/Avatar\(2009\).strm

The string in the address is the direct link port format for OpenList, and 5244 is the port for my OpenList. I added this STRAM catalog to the Jellyfin media library, and in just a few seconds, the poster, synopsis, and cast list all appeared—because the scratch only showed the name "Avatar (2009)," which matched TMDB. When I click play on the TV, the speed of the display isn't noticeably different from the local drive, because the player receives a 302 note from OpenList, pulling directly from the CDN on the cloud drive, without using my NAS's forwarding bandwidth. I verified this mechanism in the post where >

After verifying the three parts, I felt relieved: the principle was valid, and the rest was just the physical labor of batch generation.

When

buying a batch order with AutoFilm, the type of address you write is important

Hundreds of handmade pieces are definitely unrealistic. There's a ready-made open-source tool called AutoFilm for this job, specifically for generating strm for Emby and Jellyfin, and Docker pulls it up with a single command. Its operating logic is: connect to your OpenList (or Alist), scan the directory you specify, batch load strm files locally according to the directory structure, and supports incremental scheduled task updates—if a new movie is saved on the drive, it periodically runs it again to add the new strm. The configuration is to fill in the OpenList address, account password, and which directory to generate. The specific format is clearly described in the repository's README, so just follow the instructions.

More important than the tool itself is what the address in strm writes. After stepping on it, I came up with three ways to write it, and the differences are significant

How

and how to

.

Raw save
to write the addressplay the data during playback—my review
OpenList's 302 interface address player uses a 302 slip and directly connects to the CDN cloud drive. I chose the type of CDN I chose, but the NAS is not the relay station
Local mount path data is advanced to the NAS mount layer and forwarded to the playerNAS needs to provide bandwidth, and N100 is wasted overtime
direct linksyou a jump, but direct links have timeliness and can expire after a few days. The cost of saving trouble is that the entire inventory fails every few days—don't use
it

The third method is that many tutorial images online are written directly, but my attitude is to avoid them. Direct links are temporarily issued by cloud drives. Once the validity period expires, hundreds of strm files in your media library collectively become decorations. Using the OpenList interface address means that every playback is replaced with a new note in real time; the delay of half a second means no maintenance is needed.

Three pitfalls, and a group of people who shouldn't be involved in this

After clearing it, I hit a few smaller potholes, none of which were hard to solve, but knowing in advance saved time

The first is the file name Tai Ye in the cloud drive. The name "Avatar 2009 Blu-ray Chinese-English.mkv" is something TMDB probably can't recognize or misidentify, resulting in a mismatched poster. The advantage of strm is that renaming files costs zero—it's just a text file, renames without changing data, just rename it to the standard format of 'Name (Year)' and then rescan. When generating AutoFilm, you can also configure file name handling rules.

The second is subtitles. strm is just a pointer; subtitles require your own figure: put the external srt next to strm with the same name, Jellyfin recognizes it; The embedded subtitle track of the source runs with the original file and is unaffected.

Third, don't put all your eggs on the cloud drive. The strm solution has an inherent weakness: when OpenList stops, the cloud drive interface changes, or accounts encounter issues, the entire media library instantly becomes hundreds of dead links, with not a single one available. My approach is mixed—local 4TB drives are kept for frequent viewing and those I can't bear to discard, cloud drives for Strm and Shuyu (random) ones, Jellyfin has one media library with two directories, poster walls look like one thing, and the storage below is two layers. By the way, strm takes up almost no space; 317 titles together are just over 1MB, and the storage pool ledger ( the one I flipped from a 4TB drive) can completely ignore it.

As for who doesn't need to bother: If you follow the route I wrote in the article about playing NAS movies and sometimes open the drive in the TV file manager and pick a video without using the media library, then STR is meaningless to you; direct reading on the mount is enough. It serves heavy usage of "wanting poster walls, continuing to watch, organizing by type." And for local server enthusiasts, local file scanning doesn't have the pain of this. Don't add an extra layer of abstraction just to chase trends.

Here's the order for finishing: first run the mount smoothly ( the previous homework), manually create strm for three movies to verify address writing to confirm the TV can display images, then batch generate them in AutoFilm, and finally combine local frequently watched movies and cloud drive strm into the same media library. Turning a few minutes into one night is the whole selling point of this solution.

Read More


Copyright Notice Scan to read on mobile
All Rights Reserved: 《SHUNOT》 => 《Jellyfin is too slow to hang up on cloud drives; strm is a few KB up to 4GB》
Article URL: https://www.shunot.com/en/nas/1132.html
Unless otherwise stated, all articles are original by 《SHUNOT》. Reposting is welcome! Please indicate the original URL when reposting, thank you.

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow