cross-posted from: https://lemmygrad.ml/post/12780328
https://dessalines.github.io/essays/audiobooks.html
Watching DMCA'd Content via Magnets on Arch Linux: Stremio & WebTorrent Guide
Updated 2026-09-13 after live testing on Arch/CachyOS (Hyprland). Corrections from testing are
marked [tested] β see the Verification section at the end. Legal test swarms used: the
Blender Foundation open movies.
When a YouTube channel or audiobook library gets hit with a DMCA takedown, the content often
vanishes from public platforms overnight. However, if the uploader distributed their work via
BitTorrent, the magnet links remain alive as long as there are seeders. On Arch Linux, you
can stream these magnets directly without downloading the full file firstβeither through
Stremio's built-in torrent engine or the WebTorrent CLI.
This guide covers both methods.
Prerequisites
- Arch Linux (or any Arch-based distro)
- A working magnet link for the content you want to watch
- Stremio or WebTorrent CLI installed
- mpv (
sudo pacman -S mpv) β VLC is optional; mpv is present on most Arch setups and is
the tested default player here [tested]
Method 1: Stream Magnets with Stremio
Stremio has native BitTorrent streaming support (bundled torrent engine, engine API on
http://127.0.0.1:11470/).
Step 1: Install Stremio on Arch
Two working sources [tested]:
# Flathub (tested: 1.2.0, bundles engine 4.21.0)
flatpak install flathub com.stremio.Stremio
# or AUR
paru -S stremio # desktop file: stremio.desktop
Notes from testing:
- The flatpak launches fine on Wayland/Hyprland (window class
com.stremio.Stremio).
- The AUR package name in most guides (
stremio) is right, but stremio-beta may not exist
anymore β check paru -Ss stremio.
- Desktop-file name differs by source: flatpak =
com.stremio.Stremio.desktop,
AUR = stremio.desktop [tested]. This matters for Step 4.
Step 2: Paste the Magnet Link
Open Stremio and paste the magnet link into the search bar and press Enter β Stremio
recognizes the magnet: scheme, fetches metadata via DHT, and starts streaming.
[tested caveat] Forwarding a magnet from outside the app (passing it as an argument or
via gio open) did not visibly start playback in the flatpak build during testing β no engine
activity, no cache dir. Pasting into the search bar inside the UI is the reliable path; CLI
forwarding needs more testing on your build.
Step 3: (Optional) Improve Magnet Discovery with an Addon
Stremio's native magnet handling works, but addons like Torrentio scrape torrent indexes
and present magnet streams directly in the stream list for any movie or show:
- Visit the Torrentio configuration page.
- Choose providers and quality filters.
- Click Install and allow your browser to open Stremio.
- Confirm the addon installation.
Step 4: Magnet Link Association (corrected) [tested]
The flatpak's desktop file only registers x-scheme-handler/stremio, not magnet: β so
clicking magnets in a browser does nothing out of the box, and the old advice
(xdg-mime default stremio.desktop x-scheme-handler/magnet) fails on flatpak installs (wrong
desktop-file name + no MimeType line in the shipped file). Working fix, user-level:
# 1. Copy the shipped desktop file to your user applications dir
cp /var/lib/flatpak/exports/share/applications/com.stremio.Stremio.desktop \
~/.local/share/applications/
# (AUR install: cp /usr/share/applications/stremio.desktop ~/.local/share/applications/)
# 2. Edit the MimeType line to include magnet:
# MimeType=x-scheme-handler/stremio;x-scheme-handler/magnet;
# 3. Register
update-desktop-database ~/.local/share/applications/
xdg-mime default com.stremio.Stremio.desktop x-scheme-handler/magnet # AUR: stremio.desktop
# 4. Verify
xdg-mime query default x-scheme-handler/magnet
gio mime x-scheme-handler/magnet
Verified working: gio open "magnet:..." now resolves to Stremio. (Whether the app then
plays the magnet depends on Step 2's caveat.)
Method 2: Stream Magnets with WebTorrent CLI β fully verified [tested]
Terminal-first streaming: pipes the torrent directly into mpv/VLC while it downloads.
Step 1: Install Node.js and WebTorrent CLI
sudo pacman -S nodejs npm
npm install -g webtorrent-cli
[tested] On machines where npm global installs die with code 254 / an npx-cache ENOENT
(the dependency ip-set runs npx only-allow pnpm in its preinstall and it can explode), use
the two-step install:
npm install -g webtorrent-cli --ignore-scripts
cd "$(npm prefix -g)/lib/node_modules/webtorrent-cli/node_modules/node-datachannel"
npm run install # fetches the node_datachannel.node native prebuilt
webtorrent --version
Skipping the native-module rebuild without this second step gives
Cannot find module '.../node_datachannel.node' at startup.
Step 2: Stream a Magnet Directly to mpv or VLC
webtorrent "magnet:?xt=urn:btih:..." --mpv # tested, works great
webtorrent "magnet:?xt=urn:btih:..." --vlc # needs VLC installed
[tested] mpv opens immediately and playback starts while downloading. Measured on the
Sintel test swarm (129 MB file): 17β19 peers, 12β13 MB/s, fully buffered in ~13 seconds.
The app exits when the player closes. Under the hood it serves the file on
http://localhost:8000/webtorrent/<infohash>/<file> β any player can open that URL.
Other players: --mplayer, --smplayer, --iina (macOS), --chromecast, --dlna,
--airplay, --omx.
Step 3: Custom Player Arguments
webtorrent "magnet:?xt=urn:btih:..." --mpv --player-args="--video-on-top --repeat"
Other useful flags (all present in v6.0.1) [tested]: --keep-seeding (don't quit when
done), --no-quit (don't quit when player exits), --not-on-top, --torrent-port,
--dht-port, --stdout (raw stream to stdout), --verbose, --playlist.
Step 4: Check Torrent Health Before Streaming (corrected) [tested]
webtorrent info "<magnet>" does not contact the swarm on v6.0.1 β it only parses the
magnet locally (no metadata, no peer count). The real pre-flight check is downloadmeta,
which does the actual DHT/tracker handshake and writes the .torrent:
webtorrent downloadmeta "magnet:?xt=urn:btih:..."
# β "fetching torrent metadata from N peers" ... saves <infohash>.torrent to cwd
webtorrent info ./<infohash>.torrent
# β name, full file list with sizes and byte offsets
If downloadmeta stalls at 0 peers, the swarm is dead β don't bother streaming.
Which Method Should You Use?
|
Stremio |
WebTorrent CLI |
| Interface |
GUI (media center) |
Terminal |
| Ease of use |
Paste magnet β play |
One command |
| Player integration |
Built-in player |
mpv, VLC, cast targets |
| Addon ecosystem |
Yes (Torrentio, Pipe) |
No |
| Status here |
Installed; paste-to-play path |
Fully verified end-to-end |
WebTorrent CLI is the zero-friction, verified path: one command from magnet to mpv.
Stremio is the better choice for catalog browsing and addon-based discovery.
Important Notes
- Seeding matters. A magnet link is only as good as its swarm. Check with
webtorrent downloadmeta first; 0 peers = dead torrent.
- Legal disclaimer. Streaming copyrighted content without authorization may be illegal in
your jurisdiction. This guide is provided for technical education only. For testing, use the
legal swarms at https://webtorrent.io/free-torrents (Big Buck Bunny, Sintel, Tears of
Steel, ...).
- Privacy. BitTorrent exposes your IP to every peer in the swarm (19 peers seen in a 13
second test). Use a VPN if anonymity matters.
Verification (2026-09-13, Arch/CachyOS + Hyprland)
- webtorrent-cli 6.0.1:
--version OK after two-step install
webtorrent downloadmeta + info on Sintel β metadata from live peers, full file list
webtorrent "<magnet>" --mpv β mpv opened and played the stream; 129 MB buffered at
12β13 MB/s from 19/20 peers in ~13 s
- Stremio flatpak 1.2.0: installed, launches on Wayland, engine API on 127.0.0.1:11470
(/settings β serverVersion 4.21.0); magnet paste / addon flow not exercised
xdg-mime query default x-scheme-handler/magnet β com.stremio.Stremio.desktop after the
Step 4 fix