Pluto for Channels

Wait, how do I do what you are suggesting?

I was describing how to switch from the @joagomez version of Pluto-for-Channels to the @Bobby_Vaughn version, for users of the OliveTin-for-Channels set of Actions called Project One-Click.

2 Likes

This Windows version now offers support for 4:

I'm guessing similar support will reach the docker version(s) soon.

maddox/pluto-for-docker simply generates a text file and makes it available via an http server running in the docker container as a flat file.

Supporting multiple accounts like this and being able to "serve" something different is a foundational change in how the entire project works and isn't likely to change soon.

The project would need to change from vending out the m3u streaming urls directly, to vending out endpoints for each channel. Channels would need to use those endpoints as the "streaming urls" which would then have to hit the project. The project would need to accept those requests and redirect to the right urls.

It would then also have to support N accounts and support using their sessions to build the urls. Additionally it would have to have a strategy to choose which account to use. Round robin is a bit naive in that you could still get into an issue where you're using the same account that's already streaming.

With 2 systems requiring state, but also not sharing state, this is always going to be tough.

All that being said, this is how the project would have to change. This is practically 4x the complication of what the project is now. Right now, the project can't even accept http requests. There is no "app". It's simply a script that runs in the background writing a file to disk.

I hope this sets some expectations.

I have a test version of my Pluto for channels docker in the works. It will have support for up to 4 user accounts to rotate through. I can't really work on it much during the day but it just needs to be debugged at this point. Hopefully early next week?

2 Likes

Yes. As just posted about here... each Account is essentially a tuner.
And now it needs to also know when Channels is using that tuner, lock it, know when it is no longer being used, and unlock to be available again. Else, if you use that account to stream from as a new request, it will terminate the existing stream.

So, much more complexity needed now to restore functionality to close to what it was pre-account based.

Yes, it seems the smarter way to do it would be to provide N accounts with N M3Us. Then add each as it's own source, with a stream limit of 1. Then, Channels would use it's fallback mechanism to handle them as multiple tuners.

This would be a solution that only works for Channels of course, but it IS called Pluto for Channels.

2 Likes

If anyone interested, I put a quick fork out that might solve the multi-stream issue.

When Pluto TV introduced mandatory account login, all the existing solutions (jgomez177, nuken, maddox) authenticate correctly — but they all share a single hardcoded clientID. Pluto TV uses this to identify your "device", and enforces one active stream per device. So every time you tune a second channel, it kills the first one.

The Fix

Instead of one clientID, the app now maintains a pool of virtual device sessions (default: 10). Each session has its own randomly-generated clientID and its own auth token. When you tune a channel, it grabs the next slot from the pool — so each concurrent stream looks like a completely separate device to Pluto TV.

In practice: 10 simultaneous streams, no more dropped connections.

Installation

Docker:

docker run -d --restart unless-stopped \
  -p 7777:7777 \
  -e PLUTO_USERNAME='[email protected]' \
  -e PLUTO_PASSWORD='yourpassword' \
  --name pluto-for-channels \
  kineticman/pluto-for-channels:main

docker-compose:

yaml

services:
  pluto-for-channels:
    image: kineticman/pluto-for-channels:main
    container_name: pluto-for-channels
    restart: unless-stopped
    ports:
      - "7777:7777"
    environment:
      PLUTO_USERNAME: [email protected]
      PLUTO_PASSWORD: yourpassword
      PLUTO_CODE: local,us_east,us_west,ca,uk,fr,de

Then hit http://your-ip:7777 for the status page with your M3U and EPG links.

Tuning Concurrent Streams

Default is 10 simultaneous streams. If you need more or less, change one line in pluto.py and rebuild:

python

STREAM_POOL_SIZE = 10
4 Likes

:rofl: I'm about to push an update that basically does just this.

This has to be the worst open source collaboration i've ever seen around this pluto-for-channels project.

A million different forks. I'm willing to try to resolve all these forks into the main if anyone wants to open issues about features it's missing, and pointing to forks that have them.

3 Likes

That is great. I'm going to add that to the windows installer if you guys want to take Docker Duty. :rofl:

2 Likes

Fair point. Just trying to help!

Is that in Pluto-Windows_4Cv1.0.6 I see was just uploaded? How do you update from a previous version?

Give me a few minutes and I will have 1.0.7 released with @KineticMan fix

Thank you.

Pluto for Channels 2.0 is available, just pull for the new docker image. It now supports up to 12 tuners. Visit the web page to pull the tuner URLs.

4 Likes

Copying the link with a click is broken as it only works with https. I’ll get it fixed soon.

Just a warning....I seem to remember that Plex would get upset if too many tokens were quickly requested by the same ip. Don't know if Pluto has anything similar, but probably deserves keeping an eye out.

2.0.2 pushed with copy fix.

2 Likes

totally!

But we should absolutely get a mainline version of Pluto for Channels. In the past, I just didn't have time to maintain it, especially when people were just forking and not even submitting pull requests.

But I not only have more time, I've got coding agents to help, lol. And this project is a perfectly fine use for them.

If you're familiar with what my version is missing that other versions have, please open some issues, with links to the projects that have the features. Let's get a defect project for everyone to use.

This goes for anyone else that wants to help too. Thanks!

1 Like

How do I get these regions: us_east,us_west,ca,uk. I tried -e PLUTO_CODE=us_east,us_west,ca,uk but it still pulls only the local Pluto channels.