Awesome
<img alt="Project icon" style="vertical-align: middle;" src="./docs/icon.svg" width="128" height="128" align="left">Multiplex
Watch torrents with your friends.
<br/> <p align="center"> <img alt="Screenshot of two peers synchronizing playback" width="90%" src="./docs/screenshot-sync-playback.png" /> </p>Overview
Multiplex is an app to watch torrents together, providing an experience similar to Apple's SharePlay and Amazon's Prime Video Watch Party.
It enables you to:
- Stream any file directly using a wide range of video and audio formats with the mpv video player
- Host online watch parties while preserving your privacy by synchronizing video playback with friends without a central server using weron
- Bypass internet restrictions by optionally separating the hTorrent HTTP to BitTorrent gateway and user interface into two separate components
Installation
On Linux, Multiplex is available on Flathub:
<a href='https://flathub.org/apps/com.pojtinger.felicitas.Multiplex'> <img width='240' alt='Download on Flathub' src='https://flathub.org/api/badge?locale=en'/> </a>For other platforms, see contributing; development builds are also available on GitHub releases.
Tutorial
1. Start Streaming a Torrent
To get started, first find a magnet link that you want to stream. There are many sites on the internet to find them; check out webtorrent.io/free-torrents for some copyright-free torrents to try out. Once you've found one, launch Multiplex and enter the link:
<p align="center"> <img alt="Starting the app" src="./docs/screenshot-launch-app.png" /> </p>Note that Multiplex will prompt you to install the mpv media player if you don't already have it installed; to continue, please do so:
<p align="center"> <img alt="Prompt to install mpv" src="./docs/screenshot-install-mpv.png" /> </p>Next, select the file you want to stream; note that only media files are supported:
Finally, confirm that you have the right to stream the media you've selected. Note that many countries have copyright restrictions - in that case, please take appropriate measures to protect yourself:
Note that you can also choose to stream without downloading! Provided that the underlying media file supports streaming playback (such as .mkv
files), this allows you to start playing the media immediately, without having to wait for it to download completely:
After you've given your consent, playback will start, and you can enjoy the media you've selected:
2. Ask Friends to Join
While consuming media on your own can be fun, doing so with friends or your SO is always better. I built Multiplex to enjoy media together with my partner, but due to COVID and the Atlantic ocean we're unable to do so in person all the time - this app intents to bridge that gap. To ask someone to join, click on the people button in the top right, and copy the stream code:
This stream code can now be entered by the person that wants to watch the media with you. There is no technical limit on how many people can join the session, so feel free to invite as many as you want!
After the person that wants to join has entered the stream code, they need to confirm that they too have the right to stream the media; depending on your country, please ask them to take appropriate measures to protect themselves:
Note that is recommended not to choose the option to stream without downloading when streaming with multiple people; while it is supported and buffering is synchronized across peers, it requires a very good internet connection for all peers in order for it to work smoothly. Once all peers have joined, you can start playback and enjoy the media together:
All play/pause events, seeking position etc. will be synchronized between all peers using weron, a peer-to-peer networking library.
3. Increase Privacy and Security
As noted above, the legality of consuming media from torrents depends on the country you're in. In most countries, following these guidelines on VPNs from the Electronic Frontier Foundation will suffice, but Multiplex provides an additional option: Remoting.
Multiplex is built on hTorrent, an HTTP to BitTorrent gateway. Using remoting, it is possible to use a trusted server as a proxy to stream torrents from. This makes it possible to not only increase security for all peers without them having to take the appropriate measures themselves, but it can also increase the performance by caching the media on a single server with a good internet connection. To enable remoting, first host a hTorrent gateway with basic authentication enabled - be sure to set up TLS certificates to enable encryption, for example by using Caddy. Once you have a gateway set up, you can configure Multiplex to use in its preferences:
Be sure to ask the people who want to stream the media with you to also use the gateway.
For more preferences, see the screenshots.
🚀 That's it! We hope you enjoy using Multiplex.
Screenshots
Click on an image to see a larger version.
<a display="inline" href="./docs/screenshot-initial.png?raw=true"> <img src="./docs/screenshot-initial.png" width="45%" alt="Entering a magnet link or stream code" title="Entering a magnet link or stream code"> </a> <a display="inline" href="./docs/screenshot-media-selection.png?raw=true"> <img src="./docs/screenshot-media-selection.png" width="45%" alt="Media selection" title="Media selection"> </a> <a display="inline" href="./docs/screenshot-confirmation.png?raw=true"> <img src="./docs/screenshot-confirmation.png" width="45%" alt="Confirming playback" title="Confirming playback"> </a> <a display="inline" href="./docs/screenshot-playback.png?raw=true"> <img src="./docs/screenshot-playback.png" width="45%" alt="Playing media" title="Playing media"> </a> <a display="inline" href="./docs/screenshot-audiotracks.png?raw=true"> <img src="./docs/screenshot-audiotracks.png" width="45%" alt="Selecting audio tracks" title="Selecting audio tracks"> </a> <a display="inline" href="./docs/screenshot-subtitles.png?raw=true"> <img src="./docs/screenshot-subtitles.png" width="45%" alt="Selecting subtitles" title="Selecting subtitles"> </a> <a display="inline" href="./docs/screenshot-join.png?raw=true"> <img src="./docs/screenshot-join.png" width="45%" alt="Getting a stream code to join playback" title="Getting a stream code to join playback"> </a> <a display="inline" href="./docs/screenshot-sync-playback.png?raw=true"> <img src="./docs/screenshot-sync-playback.png" width="45%" alt="Two peers synchronizing media playback" title="Two peers synchronizing media playback"> </a> <a display="inline" href="./docs/screenshot-prefs-playback.png?raw=true"> <img src="./docs/screenshot-prefs-playback.png" width="45%" alt="Playback preferences" title="Playback preferences"> </a> <a display="inline" href="./docs/screenshot-prefs-remoting.png?raw=true"> <img src="./docs/screenshot-prefs-remoting.png" width="45%" alt="Remoting preferences" title="Remoting preferences"> </a> <a display="inline" href="./docs/screenshot-prefs-sync.png?raw=true"> <img src="./docs/screenshot-prefs-sync.png" width="45%" alt="Synchronization preferences" title="Synchronization preferences"> </a>Acknowledgements
- Brage Fuglseth contributed the icon.
- mpv provides the media player.
- diamondburned/gotk4 provides the GTK4 bindings for Go.
- diamondburned/gotk4-adwaita provides the
libadwaita
bindings for Go. - hTorrent provides the torrent gateway.
- weron provides the WebRTC library for playback synchronization.
Contributing
To contribute, please use the GitHub flow and follow our Code of Conduct.
To build and start a development version of Multiplex locally, run the following:
$ git clone https://github.com/pojntfx/multiplex.git
$ cd multiplex
$ go generate ./... # Also see https://github.com/dennwc/flatpak-go-mod for updating the Flatpak manifest with Go dependencies and https://gist.github.com/pojntfx/6733a6aaff22d3dd0d91eefde399da42 for updating the icons
$ go run .
You can also open the project in GNOME Builder and run it by clicking the play button in the header bar. Note that GNOME Builder doesn't automatically download the sources specified in go.mod.json, so you need to either run go mod vendor
manually or copy the contents of go.mod.json into the .modules[] | select(.name == "multiplex") | .sources
field of com.pojtinger.felicitas.Multiplex.json.
License
Multiplex (c) 2024 Felicitas Pojtinger and contributors
SPDX-License-Identifier: AGPL-3.0