Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Movie Parties #2226

Open
kaardilugeja opened this issue Jun 28, 2021 · 12 comments
Open

Movie Parties #2226

kaardilugeja opened this issue Jun 28, 2021 · 12 comments
Labels

Comments

@kaardilugeja
Copy link

After this latest mess with subreddit and official website I started to look for alternatives out there and I ended up finding this app called Magnet (Github). Anyone aware of this?

Now I didn't fully get this to work on my macbook. For whatever reasons it just starts lagging and basically crashes when I start a movie. Only way I was able to get it to work was to get my friend to start a party and then I joined him. Which brings me back to this feature request. After I found out the project isn't dead of course. Yay!

Would it be possible to implement something similar in Popcorn Time? Let's say I want to watch a movie with friends:

  • I pick a movie from a list and choose create party
  • Room is crated on the hosts side with a chat box and a 6 digit code
  • Friend(s) can then open their Popcorn Time, click on +Join Party, enter the 6 digit code I gave them and join me
  • Host gets to control the movie. Fast forward, rewind, play pause. etc. Or extend the control to others if preferred

Just my two cents and food for thought. Thanks.

@kaardilugeja
Copy link
Author

True. All valid points. Doing it this way does require a lot of upload bandwidth from the host and to have the ports open.

But what if this could be implemented differently? Somethink like Sync-Tube? (link)

All parties can use their own download bandwidth to download the movie using torrent. When every party member has enough of the movie cached or part of the movie depending when the said party joins the room they can all play it at the same time.

This requires some sort of global variables that all parties can read. Lenght of the movie, current timer, play/pause status, etc. It would eliminate the need for the host to upload the stream. But it still has the problem of sharing these variables somehow. It might need a server for this? For a room id, parties, all the data that needs to be shared. Or maybe it can be done on the host side somehow. Would this still require to have ports open? So others could connect and fetch the information in real time?

@hayzamjs
Copy link

hayzamjs commented Jul 4, 2021

The only way to do this without any centralized servers would be to use something like IPFS and orbit-db. I worked on PopcornParty a long time ago, I might revamp it but the UX is really horrible, I mean asking people to port forward to use an app is not really ideal.

That being said, I've been playing around with IPFS and orbit-db a lot. With some bootstrap peers in between (these can be regular IPFS nodes that are publically available) orbit-db can send across considerable amounts of data, chat and other events stuff (elapsed time, etc). There still seems to be a latency of 800-1000 ms, which is light years better than what it was just a few years or even months ago with the same setup.

This way @kaardilugeja you wouldn't need to worry about the bandwidth of the stream or anything since everyone will be running their own torrent client.

@kaardilugeja
Copy link
Author

@hayzamjs

This sounds like a plausible idea. I mean, 800-1000ms of latency is actually not a bad trade off. I doubt many people would even notice that. If this enables a way to watch a movie with firends (assuming we have any) that would be really great addition. Wanted to do that for a while but have had to stick to sync-tube and youtube videos for now.

I mean asking people to port forward to use an app is not really ideal.

True. UX should be something as simple as choosing a movie for party and sending friend the room ID.

@emmatebibyte
Copy link

I mean asking people to port forward to use an app is not really ideal.

True. UX should be something as simple as choosing a movie for party and sending friend the room ID.

Could you implement uPnP?

@hayzamjs
Copy link

hayzamjs commented Nov 4, 2021

I mean asking people to port forward to use an app is not really ideal.

True. UX should be something as simple as choosing a movie for party and sending friend the room ID.

Could you implement uPnP?

I could but if I were to do it, I would much rather use IPFS as I mentioned before in that particular way. They even have great libraries for the js ecosystem and it also has UPnP stuff already.

@filipedfr
Copy link

filipedfr commented Jan 13, 2022

Hello everyone, I think this feature is a wonderful idea. My thoughts are that a centralized solution is not optimal in a the real world, but it could be optional, meaning that the host is the central "server" (sort of - and yes, this implies that his IP is revealed to his friends, it is a tradeoff). Friends could join by typing the IP of the host.

We can explore the decentralized solution further on, and IPFS seems to be a good idea (not only because the UPnP, but also because IPFS is a consistent project to leverage distributed p2p systems - and I say this because I did research with people that worked around IPFS).

Some years ago I developed a quick solution which consisted of me hosting a server in NodeJS which worked basically as a pub/sub broker. I changed the popcorn-time source code of every friend to create a persistent web socket to this server. If someone seeked, paused or played, the server would get this "notification" and broadcast it to the rest of the clients. It worked, but it was not reliable and consistent - was buggy and kinda slow, I do not remember the latency but I knew it was around 1000ms. This is just a comment, I definitely want to explore the IPFS idea that @hayzamjs suggested and well, we do not know if we do not try!

800-1000ms latency is not bad start, my concern is more about the UI/UX. Users should perform all the process of joining or setting up the parties only in the Popcorn-Time client, not router dashboards.

I am willing to work on this feature because watching a movie with friends, doing countdowns, and people pausing accidentally (countdown again...) is a pain in the ass.

It would be nice if we discussed design and architecture before trying to implement stuff into the actual popcorn-client, so we have a good birds-eye view.

Thanks!

@filipedfr
Copy link

filipedfr commented Jan 14, 2022

Hello everyone, I think this feature is a wonderful idea. My thoughts are that a centralized solution is not optimal in a the real world, but it could be optional, meaning that the host is the central "server" (sort of - and yes, this implies that his IP is revealed to his friends, it is a tradeoff). Friends could join by typing the IP of the host.

We can explore the decentralized solution further on, and IPFS seems to be a good idea (not only because the UPnP, but also because IPFS is a consistent project to leverage distributed p2p systems - and I say this because I did research with people that worked around IPFS).

Some years ago I developed a quick solution which consisted of me hosting a server in NodeJS which worked basically as a pub/sub broker. I changed the popcorn-time source code of every friend to create a persistent web socket to this server. If someone seeked, paused or played, the server would get this "notification" and broadcast it to the rest of the clients. It worked, but it was not reliable and consistent - was buggy and kinda slow, I do not remember the latency but I knew it was around 1000ms. This is just a comment, I definitely want to explore the IPFS idea that @hayzamjs suggested and well, we do not know if we do not try!

800-1000ms latency is not bad start, my concern is more about the UI/UX. Users should perform all the process of joining or setting up the parties only in the Popcorn-Time client, not router dashboards.

I am willing to work on this feature because watching a movie with friends, doing countdowns, and people pausing accidentally (countdown again...) is a pain in the ass.

It would be nice if we discussed design and architecture before trying to implement stuff into the actual popcorn-client, so we have a good birds-eye view.

Thanks!

Regarding the decentralized approach:

Been doing some research and found that we should take a look into https://github.com/orbitdb/orbit-core before diving (or considering) into orbit-db, at least directly. Orbit-core from what I've seen is based on orbit-db, and it might be a abstraction layer that helps with the implementation. Also, it is JavaScript :).

In the orbit-core README they mention real-time chat as an example application. I find that leveraging time synchronization and chat in a movie party is very suitable towards this example.
Let me know what you think!

@filipedfr
Copy link

Update:

I've been playing with orbit-db and ipfs too to tackle this feature and I had success setting up two clients that share the same database (they can read it and write to) in different geographical locations. I conducted these tests using the browser, which kind of the same environment that popcorns operates on.

The show goes on, I'll try to think more about the structure of the messages etc...

@Kief5555
Copy link

@Kief5555 No idea none did anything here. Probably a connection issue or some other temp issue with github.

Oh I thought I was blacklisted

@Victor239
Copy link

Related projects:

@hollownights
Copy link

One more vote for Metastream being ported into Popcorn Time.

@Jany-M
Copy link

Jany-M commented May 17, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants