I just got around to setting up Plex and am having the same problem. Plays for about a minute then errors with the 429. Basically unuseable.
Diagnostics immediately after the error
Done
Logs have been submitted as 9e96fd18-8fce-40e2-8f8e-ca465cd3b9b3 .
SWAG....(Silly Wild Ass Guess)
Plex is like Pluto and needs something like a random/unique UUID...and we're all using the same source m3u/epg.
It does not appear that the DVR is doing anything surprising that would be tripping rate limiting, so your theory does sound plausible.
Did a little more poking around and some more speculation
In looking at us.m3u8 I noticed that the stream links actually are pointing back to the i.mjh.nz server. It appears that he is intercepting the stream link and adding X-Plex-Client-Identifier and X-Plex-Token data, then redirecting to plex.tv. So he's trying to make unique id streams automatically. But that means his server is in the path for every channel change. So a couple of possibilities come to mind.
- plex.tv is getting upset at all the token generation requests coming from the same IP
- the i.mjh.nz server is getting upset being hit whenever anyone selects a Plex channel.
This may be a case where a local docker solution would be better if he's willing to release his code.
cc @matthuisman
Did some more playing... the 429 error is coming from the plex server.
The good news is that I manually edited the us.m3u8 and appear to have a working solution (been playing for about an hour now after failing in about a minute).
- pointed the stream links to the plex server
- added X-Plex-Product=Plex%20Web
- added X-Plex-Session-Id=[new unique UUID]
- generated a new X-Plex-Client-Identifer=[new 23 char alpha-numeric string]
- generated a new X-Plex-Token=[need to generate from a Plex account]
It's the last one that I think really fixed things. Not sure how the token is currently being generated or if he's trying to use a static token.
cc @matthuisman
Been playing with this a couple of weeks ago and actually built a docker
Seems to be running rather well
docker run -d -p 7777:7777 --name vlc-bridge-plex jgomez177/vlc-bridge-plex
I would say I got it running but have done nothing around guide data.
Plus mine is only US not international like the one on i.mjh.nz
Updated the docker to utilize the
https://i.mjh.nz/Plex/us.xml.gz
EPG Guide Data
I took the easy way out....set a cron job to run a little script to download the i.mjh.nz/Plex files, run a couple of sed commands to reformat the stream urls/insert my unique data and then update the DVR server. The DVR Plex source now points to local files for the m3u8 and xml files.
Been working perfectly.
Would you be willing to share that setup for those of us less technically savvy?
Do you might outlining how it works? Also, is there a /config or some other directory mapping for appdata?
Thanks, I have been pulling out what little hair I have left over this on another platform.
I went the sed route:
here is the script:
#!/bin/sed -f
#
# Make executable via chmod +x <scriptname>
#
# <scriptname> Plex-all.m3u8 > new-playlistname
#
#
s;https://i.mjh.nz/Plex/\(.*\);https://epg.provider.plex.tv/library/parts/\1?X-Plex-Client-Identifier=xgkz9ui5tipdsflhzmh1ar3h\&X-Plex-Client-Platform=Chrome\&X-Plex-Token=YOUR-PLEX-TOKEN-HERE;
I've been working to try and simplify things as much as possible. Came up with two scripts...
A run once script to generate user unique data for Plex, and register Channels DVR as an app with Plex access.
A second script to take that data and update the i.mjh.nz files. It's currently set up for 'us' only, but could be edited to pull another set of data.
I'll try and get it up somewhere later today. But....I'm a Linux guy, haven't really touched Windows in a long time. Especially to try and translate the bash script into bat/cmd.
This would be awesome. Running Channels as a container in Unraid, so I can likely use User Scripts to schedule this, too.
I made an attempt.....the scripts are up on gist
Thanks for doing that. I guess I need it dumbed down some more. I get a plexdata file with the USERID,SESSIONID, and CLIENTID, but TOKEN line is empty. When I click on the plextoken file it's empty. It's not easy for me to pass runtime arguments using Unraid's User Scripts plugin, so I just set USERID and PASSWD as variables in the script. Maybe that's the issue. Not sure, I'll keep trying.
Does you plex password have any special characters in it?
Yes. It was my theory that was an issue, but as they require at least one special character now I thought that might be noted. Sounds like I got bit by assumptions? Guess I'll work on figuring out the correct encoding to try it out.