Contentsstrm and cloud drives
  1. Getting started

    1. What Kryspal Media is
    2. System requirements
    3. Install with Docker
    4. First-time setup
    5. Upgrade and back up
  2. Libraries

    1. Create and manage libraries
    2. File and folder naming
    3. Flexible file layout
    4. Metadata and NFO
    5. Tags
    6. Images
    7. Network storage
    8. strm and cloud drives
    9. StrmTool settings
    10. Subtitles
    11. Intro and outro
    12. Search tips
    13. Actors and people
    14. Duplicate videos
  3. Playback

    1. Web player
    2. Discover
    3. Third-party players
    4. Remote access
    5. Webhooks
  4. Members and devices

    1. Members
    2. Parental controls
    3. Account sync
    4. Devices and simultaneous streams
  5. Plugins

    1. Plugin center
    2. Plugins
    3. Third-party plugins
  6. Move from another server

    1. Move from Emby
    2. Move from Jellyfin
  7. Licenses and plans

    1. Compare plans
    2. PRO features in detail
    3. MAX features in detail
    4. Buy, activate and move a license
    5. Offline grace and expiry
  8. Troubleshooting

    1. Logs and reporting a problem

strm and cloud drives

A .strm file lets you add a video that lives on a cloud drive or another server. The server does not store the video, only a small text file that points to it. This page covers how to write the file, how playback is delivered, and when media info is read.

On this page
  1. Write a .strm file
  2. Choose how playback is delivered
  3. Direct-link cache PRO · MAX
  4. Choose when media info is read
  5. Pre-read media info PRO · MAX
  6. Media info cache PRO · MAX
  7. Limits of redirect mode
  8. Limits of every strm file
  9. Limits

Write a .strm file#

A .strm file is plain text. Put the video address on the first line:

  • A URL starting with http:// or https://.
  • A local path starting with /, pointing to a location the server can read and the administrator allows.

Anything else (Windows paths, other protocols, an empty line) is not accepted, and the file is marked as unreadable.

Put the .strm file in the library folder like any other video, and name it as you would the video (for example Movie Name (2020).strm).

Choose how playback is delivered#

Open Plugins, open StrmTool under Built-in features, and set Default delivery. In each library's settings you can pick a different value, or leave it as Follow the default.

Option What happens Good for
Proxy through the server (default) The player talks to your server, which fetches the data from the cloud drive. Players or networks that cannot reach the drive directly. Most reliable, but uses server bandwidth.
Redirect the player The server tells the player to fetch the video directly from the drive. Players that can reach the drive. Saves server bandwidth.
Redirect on the local network, proxy outside Redirects at home, proxies when you are away. Small upload bandwidth at home but fast direct access on the LAN.

Direct link cache (on by default, can be turned off in the StrmTool settings): the server asks the drive for the direct link once and reuses it for a few minutes. Playback starts faster, the drive gets fewer requests, and you are less likely to be rate-limited. See Direct-link cache.

Redirecting the player (the last two options), the direct link cache, address rewrite rules, a custom User-Agent or Cookie and pre-reading media info are part of StrmTool PRO · MAX. Without PRO, .strm files still play, forwarded through the server.

Things to know:

  • Only playback is redirected. The web player's streams, reading video info and casting are always proxied by the server, because those cannot follow a redirect.
  • If the server cannot tell whether the player is on your local network, it proxies. It redirects only when it is sure.
  • Some drives need a particular User-Agent or Cookie for direct links. Enter them in the StrmTool settings (User-Agent sent to the remote, Cookie sent to the remote). The server uses them when it fetches the video; a redirected player does not send them (see Limits of redirect mode).
  • Address rewrite rules replace the start of an address with another, one rule per line: prefix => replacement.
  • A direct link stays valid for as long as the drive decides. When it expires, playing again fetches a new one.

When a player is redirected, the server first asks the address you gave (for example a cloud-drive gateway) where the real file is, then sends the player there. Seeking in a video can make the player ask again and again, and some drives limit how often they answer. The Direct link cache setting in StrmTool makes the server remember that answer for a while, per member and player, so seeking does not trigger a new request each time.

  • It is on by default and can be turned off in the StrmTool settings. The server keeps a link for a few minutes, and drops it earlier if the link itself says it expires sooner.
  • It applies only when the player is redirected. A failed lookup is never remembered; the player is then sent to the original address.
  • If the drive ties its links to the player's own address and refuses the server's answer (playback from outside fails with a 403), turn the Direct link cache setting off. Do the same for links whose signature expires very quickly.
  • The StrmTool page shows Link cache hits, Link cache misses and Fell back to direct redirect, so you can see whether it helps.

Choose when media info is read#

Before playing, the server needs the video's length, audio tracks and subtitle tracks. For a cloud drive this means reading from the drive, which is slow. In the library settings, set Reading media info → When to read:

  • During scan: reads everything right after the scan. Good for small libraries.
  • Background (default for cloud-drive libraries): reads slowly afterwards and steps aside while someone is watching.
  • On playback: reads nothing ahead; the first play reads the file and starts a few seconds slower.

Reads at once (1 to 8, default 2 for cloud-drive libraries) limits how many files are read together, so the drive does not see too many requests. If the drive answers 429 (too many requests), or 403 several times in a row, reading for that library pauses for a while and then continues. A single 403 only makes that one file wait and try again later.

Pre-read media info PRO · MAX#

With the Pre-read media info setting in StrmTool turned on, the server reads media info ahead of time: after scans, in the background, for the next episode while you watch one (Read the next episode while playing), and when a detail page is opened (Read when a detail page is opened).

Without PRO none of this happens ahead of time, but everything still works: the first play reads the video info on the spot and remembers it. The only difference is a slower first start. The switch is greyed out and marked PRO without a license, and your setting takes effect again once the license is back.

Media info cache PRO · MAX#

Reading a cloud-drive video's info can mean fetching tens of megabytes. The Media info cache plugin saves each file's info (tracks, chapters, intro and credits marks) as a small file in the server's data folder. Then:

  • After you rebuild a library, import again or change database, a scan checks the cache first and skips reading the drive.
  • Moved or renamed files still match (local files are recognized by content). Cloud-drive files still match if the domain changes, but not if the file is a different one.
  • A damaged or unmatched cache entry is simply read again; nothing breaks.

It is enabled by default once installed. Turn Restore from the cache off to stop using it for restores. Disabling the plugin does not delete the cache. The server never cleans the cache folder by itself, so tidy it manually if it grows large. The plugin page shows the number of archived files and the space they use.

Limits of redirect mode#

Redirect mode hands the player a direct link to the drive. The server is then out of the picture. These limits come from that. Switch to Proxy through the server to avoid any of them.

  • Only direct playback is redirected. The web player, the apps (when they need a remux), casting and the server's own reads always go through the server. If the server cannot reach the drive but your player can, those fail while direct playback works. Make the drive reachable from the server, or use a player that plays directly.
  • The link can expire. After the redirect the server cannot refresh it. Pause for a long time, or watch with a signed link that has a short life, and the drive may answer 403 or 410. Whether the player asks again depends on the player. Start the video again to get a new link. The direct link cache can also hand the player an already expired link for up to 3 minutes, and asking again does not help. Turn Direct link cache off to fix that. Proxy mode renews the link by itself.
  • User-Agent and Cookie are not sent. The values in the StrmTool settings are used only when the server fetches the video. A drive that insists on them refuses a redirected player with 403. Use proxy mode for that drive.
  • No server-side resume or range check. If the connection drops, resuming is between the player and the drive.
  • Traffic is not counted. Redirected playback does not show in the server's traffic and speed. Now playing shows the delivery as redirect.
  • Wrong "local network" guess behind a reverse proxy. If the server sits behind Nginx, Caddy or a tunnel and TRUSTED_PROXIES is not set, every request seems to come from the proxy. Redirect on the local network then redirects outside clients too. Set TRUSTED_PROXIES (see Remote access).

Limits of every strm file#

These apply in redirect and proxy mode alike, to .strm files that point to a web address. A .strm that points to a file path on the server's own disk is treated like a normal local file and is not affected. It is always proxied, never redirected.

  • A few sources do not support seeking (Range requests), for example links from some relay or proxy services. Then the video cannot be sought, and many players cannot jump in it at all. In the web player and the apps, a remuxed video plays only from the start. You can seek only as far as has been prepared, there are no embedded text subtitles, and fonts for styled (ASS) subtitles are missing. Switch to a source that supports seeking. Proxy mode cannot resume a dropped connection either.
  • Embedded subtitles, subtitle search by file hash and intro detection work as for a local file, as long as the source supports seeking. Each one reads from the source, so the library settings (Read a whole file for embedded subtitles, Intro and outro audio detection) decide how much; a cloud-drive library has them off or limited by default. Subtitle files next to the .strm file always work.

Limits#

  • Subtitles cannot be downloaded to a remote source that is read-only.