Skip to content

pojntfx/multiplex

Repository files navigation

Project icon

Multiplex

Watch torrents with your friends.


Screenshot of two peers synchronizing playback

Flatpak CI Go Version Go Reference Matrix

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:

Download on Flathub

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:

Starting the app

Initial start screen with link entered

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:

Prompt to install mpv

Next, select the file you want to stream; note that only media files are supported:

Media selection

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:

Confirmation screen

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:

Option to stream without downloading

After you've given your consent, playback will start, and you can enjoy the media you've selected:

Playback screen

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:

Join screen

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!

Entering stream codes

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:

Confirmation screen

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:

Two peers synchronizing playback

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:

Remoting 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.

Entering a magnet link or stream code Media selection Confirming playback Playing media Selecting audio tracks Selecting subtitles Getting a stream code to join playback Two peers synchronizing media playback Playback preferences Remoting preferences Synchronization preferences

Acknowledgements

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