Giter VIP home page Giter VIP logo

multiplex's Introduction

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:

Flathub badge

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.

License

Multiplex (c) 2024 Felicitas Pojtinger and contributors

SPDX-License-Identifier: AGPL-3.0

multiplex's People

Contributors

pojntfx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

multiplex's Issues

Toggle full screen with keyboard shortcut and double click

After using the Multiplex window to turn on full screen the mpv window fills your screen, and there's no obvious way to get out of full screen again. You have to use Alt+Tab to go back to the Multiplex window and click the button again. This can cause confusion. It would be great if the regular ways to toggle full screen would be available while the mpv window has focus: Double click, F, and F11. In addition to Esc to go out of full screen.

Thanks again!

integration with qbittorrent

It would be nice to have it work with qbittorrent webui or something to select from previously downloaded videos, and also download them to this app instead of doing it internally.

This might solve the local file thing in #3, as you could use qbittorrent to create the file and then share it.

(not sure if this helps, but qbit is also available as a flatpak).

Windows compatible?

Was just wondering if this awesome project was Windows-compatible? GoLang stuff usually is, but I saw references to GTK, which is a little more complicated on Windows.

Only suggest streaming media files

I don't know if this should be done via an allow-list or a block-list, but when asked to choose what file to stream, it seems strange that a ton of .srt files are shown.

The best thing would be if only video and audio files are suggested, but that might be bad if that means that the file extension needs to be in an allow-list, in case you miss a file extension in the list, or a new format comes along. The next best thing would be to block files that should obviously not be streamed, like subtitle files, image files, text files, etc. Not blocked as in you can't use the subtitles while watching, but blacked as in not in the "Select the file you want to play" list.

Thanks again! :)

Support steaming local files

I have media files locally stored and I would like to watch them together with others. Can multiplex do that? I would rather use the files I already downloaded than download the torrent again.

Reduce Multiplex permissions

Follow up to https://floss.social/@[email protected]/111966298529562604
See https://flathub.org/apps/com.pojtinger.felicitas.Multiplex

I'm pretty sure we can get from "potentially unsafe" to "probably safe". We don't do a lot of advocacy around this topic so if we succeed I'd love to publish a blog post on Flathub blog.

Here are some quick suggestions - not sure how realistic

  • Network access: no choice for now until we get a network portal flatpak/xdg-desktop-portal#1166
  • Arbitrary permission: whatever you spawn, do it in the sandbox
  • Download Folder read/write access: instead ask users where they want to save files (one time is fine, document portal entries are permanent)
  • System folder /tmp: there is a $TMPDIR in the sandbox
  • Video folder: same as download folder - use document portal

Flathub:

image

GNOME Softare:

image

Non-torrent method?

This is seriously a cool app thanks!

I don't know if it's in scope for this project but a while ago I prototyped a similar app that

  1. lets the user pick any video file (see also #3)
  2. tries to open a port on the router using uPnP (and the other one which I forgot the name of)
  3. generate a http link to share via chat
  4. streams the video file over http

There are 2 major advantages

  • The receiver doesn't need to install an app, it can work from the browser
  • The ip address and content being watched isn't shared publicly

The main disadvantage is that not all routers support the protocols necessary. So perhaps it could be used as the primary method and the app would fallback to torrent?

Make app buildable out-of-the-box in GNOME Builder

While working on the app icon, I noticed that the app depends on Go being installed on the host system to build in GNOME Builder. Is it possible to take advantage of Flatpak to make the app run with just the Go SDK extension instead? I know this is possible with Rust and C.

A way to see if the file is buffering

Hi. Thanks for an amazing application!

I have an issue where I don't know if anything is happening or not. Not sure if this is a feature request or a bug report.

I tried the Laundromat torrent from the list you link to and chose to stream without downloading. After the initial 1 MB or so had buffered, the box with the progress bar that told me that the 1 MB had buffered just disappeared, and I was left with just a black box (mpv), and nothing seemingly happening.

Either this box with the progress bar should stay, or there should be some other way to see if there's anything happening.

Thank you!

Pressing "stop" should close the MPV window

When pressing "stop" in the Multiplex window you are taken back to the screen where you input a magnet link. So watching the file you where watching is over. But the MPV window stays, and if you start a new stream, it opens a new MPV window. When you press stop the currently used MPV window should be closed.

Thanks! :)

Name and icon

The app would benefit from a name and an icon following GNOME's guidelines.

According to the naming guidelines a good app name should avoid made-up combinations. Since the current app name, Vintangle, has this, I think we should try to find a new one. This is easiest to do before the app is published anywhere, since it lets us change the app ID as well without having to jump through any hoops.

I suggest to call the app Multiplex. A multiplex is a movie theater building with multiple screens, which fits the app nicely as a metaphor.

I can design an icon for the app that fits the name and follows GNOME's app icon guidelines. Let me know what you think! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.