Jump to content

Pluto TV xml guide resource


EZEd

Recommended Posts

sfatula

I don't see any evidence of that. Most every discontinuity case is either dropped or ignored. Not sure why. The guy who made the original patch did so 2.5 years ago, 5 months ago, someone responded with can you instead post it here (uh, they could move it). He never responded, and, likely is long gone. The other cases seem to have died. 

In order for this to work in Emby, I'd need for m3u streams to be routed through ffmpeg with the -force_dts_monotonicity flag, I don't see a way for me to do that. Thus, I had to go down the road of finding another program to capture the stream without aborting. streamlink does so and I like it anyway so I'm using it, vlc does not work, ffmpeg gives up here and there for some reason but have not tried the flag (but am going to shortly), youtube-dl dies, all proxies like xteve eventually hang or get out of whack, etc. In all cases, they use ffmpeg anyway so it's not surprising. Even if I replace ffmpeg used by xteve with my custom version, and, add the flag, xteve keeps going but emby can't handle the relayed discontinuity so it still doesn't help. 

In the end, I didn't need live play, I wanted to record things. So, that I can't get Emby to use my version with the flag doesn't matter very much. 

Edited by sfatula
Link to comment
Share on other sites

sfatula

No problem. For now, code works fine. I use Emby guide to create a timer just like with OTA channels, and, it gets recorded via my external tool and Emby API, etc. Lots of steps, cancel timer, schedule for later, etc., but pretty simple overall. Working great! Glad to have the API, it was flexible enough to allow adding an external recorder into the process. 

Link to comment
Share on other sites

  • 2 weeks later...

@sfatula, do you think your method above will be repeatable and stable enough to ever turn into an official Emby plugin? There are a few things on PlutoTV that I would like to expose to the Emby DVR capability but without having reliable guide data it's pretty useless right now.  Let us know if this is something that can be wrapped into a plugin.

Thx

Link to comment
Share on other sites

sfatula

The only way you could ever play Pluto TV and record it inside Emby would be with the ffmpeg patch I noted applied. I just have it recording (scheduled within Emby, but done outside of Emby using php, xteve, and streamlink on Linux), made no effort to play within Emby. Though, I do have the guide within emby (12 hours). I can't see plugin technique working any time soon. There are m3u files out there for PlutoTV on the internet if you just want the guide, refreshed a few times a day. 

Edited by sfatula
Link to comment
Share on other sites

We're going to be revamping our streaming from m3u sources in the near future to not use ffmpeg (when possible), so this should be a moot point at that time.

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...
smills

Can anyone here point me to M3U  and  EPG XML  files for Pluto?

Or a script I can  schedule to scrape and udate?

ThankY

 

Link to comment
Share on other sites

garyan2

There is no location to point to for the M3U or XMLTV. What is possible is to use the PlutoTV API to build an M3U and XMLTV file locally, so anything that has been done has been "homebrewed". Mine is a Windows executable, others may have created scripts.

Link to comment
Share on other sites

sfatula
4 hours ago, smills said:

Can anyone here point me to M3U  and  EPG XML  files for Pluto?

Or a script I can  schedule to scrape and udate?

ThankY

 

Sure, here they are:

 

https://techzyon.com/epg/plutotv.m3u

https://techzyon.com/epg/plutotv_guide.xml

 

Updated many times a day, at least the guide is as Pluto only gives a partial day guide. 

  • Like 1
Link to comment
Share on other sites

garyan2

I see you post process the stream link in the m3u. I'm not that familiar with all the standard options, but do "terminate=false" and "serverSideAds=false" do anything for PlutoTV?

Link to comment
Share on other sites

sfatula

If you were talking to me garyan2, they did nothing when I tried those. The same problem existed in Kodi and other systems. Kodi patched around it. Only a custom ffmpeg patched for the discontinuity worked for me. There may be a way around it, but, didn't find another one in my few partial days of efforts. There are posts all over the net about Pluto and commercials, Emby or not. Mine is still working.  

  • Like 1
Link to comment
Share on other sites

garyan2
23 hours ago, sfatula said:

Sure, here they are:

 

https://techzyon.com/epg/plutotv.m3u

https://techzyon.com/epg/plutotv_guide.xml

 

Updated many times a day, at least the guide is as Pluto only gives a partial day guide. 

I took a look at your xmltv file and you seem to have ghost programs in there. For example, if you look at the "Degrassi" channel, the first 12 hours are correct but you then have programs that are not real for that channel. Every program should be a "Degrassi" episode but there are movies and programs such as "Highlander: The Movie" and "Heathers" for a couple days. If you look at "CNN", future ghost programs are "Mystery Science Theater 3000" and such.

Looks like the first 12 hours are correct for all channels, but anything after that is just waisted space in your xmltv file.

Link to comment
Share on other sites

garyan2

I also found something else to look at. It looks like you are dropping words that are in quotes. For comparison, here is what my guide looks like compared to yours. Notice that the word "Prize" is missing in the description.

pluto_garyan2.PNG.3413f4de82dace234a879dac5a88cf3a.PNG

pluto_sfatula.PNG.890262c2a0930a2026a62e20acfc85d6.PNG

Link to comment
Share on other sites

sfatula

Those are not my files, I was just responding to a request of where someone can find them on the net. The actual thread for these can be found here:

https://forums.whirlpool.net.au/archive/9nk7ly73

You can join that thread and report any issues. I've never used those files, so no idea of how they are, but, you can see in the thread many are using them. Maybe they don't care, don't know. Seems like it should be reported. 

I have my own guide that I use, but I can tell you the pluto data is pretty bad and limited many times. Few things have season and episode, etc. 

Edited by sfatula
Link to comment
Share on other sites

garyan2

Sorry 'bout that. I made an assumption, so here I am. 🙃

I wouldn't say the data is bad, but it is limited. You can get some season/episode information but they are not consistent in how they do it so I don't even bother. I wouldn't expect a lot of information in there anyway so wasn't disappointed. I mainly did my work to see if it could be done.

Link to comment
Share on other sites

sfatula

Exactly, you've seen it then I guess via the API. I look forward to the new non ffmpeg based m3u player upcoming as then the only requirement is the guide (hopefully). I am going to make a Stirr guide next, I have that figured out how it works. But, sadly, have to head out of town for a week or so as we have a relative on hospice, so need to see them while we can. Between locals, Pluto (even had Star Trek Beyond on), and Stirr, there's a lot of content for $0/month!

Link to comment
Share on other sites

garyan2

Sorry to hear that. I wish you peace during these times.

Interesting to be able to the same with Stirr. I haven't seen anything about an API for them... I wonder if we can do the same with Xumo too. Talk about a large number of free streaming channels combining those 3. Of course, there is a lot of duplication between them.

Link to comment
Share on other sites

smills

Totally agree on the SIRR bit.  Would Love to see a way to integrate that as well.

With Locast or a HDHR for locals and national networks, then Pluto and STIRR for added content and news, there is a lot very cheap TV there.  Add in Pluto for a cheap pay service with good channels and you can have a really good solution inexpensively.

 

Link to comment
Share on other sites

  • 2 months later...
mysterio21
On 8/7/2020 at 6:38 AM, sfatula said:

The only way you could ever play Pluto TV and record it inside Emby would be with the ffmpeg patch I noted applied. I just have it recording (scheduled within Emby, but done outside of Emby using php, xteve, and streamlink on Linux), made no effort to play within Emby. Though, I do have the guide within emby (12 hours). I can't see plugin technique working any time soon. There are m3u files out there for PlutoTV on the internet if you just want the guide, refreshed a few times a day. 

Just starting on this adventure, any chance you can share your streamlink commands and the ffmpeg ones? Just started getting that patched ffmpeg compiled

Link to comment
Share on other sites

sfatula
14 hours ago, mysterio21 said:

Just starting on this adventure, any chance you can share your streamlink commands and the ffmpeg ones? Just started getting that patched ffmpeg compiled

 

I can, however, some of the logic is embedded in Scripter-X and what it runs, PHP code which is highly customised for my home development environment, would be very difficult to package it up (and wouldn't make sense without doing so as it has many classes which use other classes, etc.). I have a php environment which I use for all sorts of home automation and other things, and, it's not meant to be portable or make sense for others. That part figures out the timer start time and duration, pluto tv channel, figures out a filename based on the guide data, and, uses at command on Linux to schedule the recording. The recording is done via streamlink at the appropriate time (again via at). Streamlink command (which uses my nvidia gpu) is:

streamlink --hls-duration {$recordLength} '{$m3uURL}' best -O | /usr/local/sfatula/ffmpeg -force_dts_monotonicity -i - -vcodec hevc_nvenc -acodec ac3 -preset llhq -bf:v 3 -cq:v 26 -rc:v vbr -rc-lookahead:v 32 -b:v 2500k -bufsize:v 3m {$tempOutput}

I believe I also loaded the unreleased (at the time, may be released now) Pluto TV URL driver from streamlink site somewhere.

Also, some of the data used by the php program comes from a Pluto guide import I wrote. That uses a mysql database, and of course custom mysql code and classes. So, there is a lot of pieces. But that should give you the basic idea of what I did at least. This doesn't allow watching of live tv, didn't care about that as I would simply use the pluto app. And it's Linux, so, if you are Windows, I am sure the path is much different.

Been using it a fair amount to record pluto. One could also download directly from the pluto tv site I believe using streamlink, however, I wanted wife et al able to simply schedule recording from the Emby guide. Heck, me too, I have enough to do without having to run manual commands.

Edited by sfatula
Link to comment
Share on other sites

mysterio21
4 hours ago, sfatula said:

Been using it a fair amount to record pluto. One could also download directly from the pluto tv site I believe using streamlink, however, I wanted wife et al able to simply schedule recording from the Emby guide. Heck, me too, I have enough to do without having to run manual commands.

Thanks for all the info, i really appreciate it.

I have compiled ffmpeg with the patch & also the streamlink with the plutotv integration but really struggling trying to livestream this through TVHeadend.

Here is the command I am using:

/usr/bin/streamlink -v --hls-segment-threads "10" --hds-segment-threads "10" --stdout "$1" best | /usr/local/share/ffmpeg-patch/ffmpeg -force_dts_monotonicity -i pipe:0 -vcodec copy -acodec copy -f mpegts pipe:1

Everything will run fine until Pluto tries to push ads in, which the patched ffmpeg tries to handle... you can see it error and drop the speed which causes freezing... it will eventually come back

2020-10-27 04:37:41.174 spawn: [mpegts @ 0x560a8c78c1e0] DTS 129840 < 2833440 out of order
2020-10-27 04:37:41.174 spawn: [mpegts @ 0x560a8c78c1e0] Incoming DTS error 2707200, offsetting subsequent timestamps by 5414400 to correct
2020-10-27 04:37:42.170 spawn: frame= 1055 fps= 28 q=-1.0 size=   14467kB time=00:00:42.18 bitrate=2809.7kbits/s speed=1.11x    
2020-10-27 04:37:43.172 spawn: frame= 1087 fps= 28 q=-1.0 size=   14945kB time=00:00:43.46 bitrate=2817.0kbits/s speed=1.11x    
2020-10-27 04:37:44.174 spawn: frame= 1111 fps= 28 q=-1.0 size=   15246kB time=00:00:44.40 bitrate=2813.0kbits/s speed=1.11x    
2020-10-27 04:37:45.180 spawn: frame= 1136 fps= 28 q=-1.0 size=   15630kB time=00:00:45.40 bitrate=2820.2kbits/s speed=1.11x    
2020-10-27 04:37:46.181 spawn: frame= 1158 fps= 28 q=-1.0 size=   15980kB time=00:00:46.32 bitrate=2826.2kbits/s speed= 1.1x    
2020-10-27 04:37:47.182 spawn: frame= 1187 fps= 28 q=-1.0 size=   16390kB time=00:00:47.45 bitrate=2829.6kbits/s speed= 1.1x    
2020-10-27 04:37:49.274 spawn: frame= 1202 fps= 27 q=-1.0 size=   16570kB time=00:00:48.11 bitrate=2821.4kbits/s speed=1.07x    
2020-10-27 04:37:51.208 spawn: frame= 1285 fps= 27 q=-1.0 size=   17670kB time=00:00:51.36 bitrate=2818.4kbits/s speed=1.09x    
2020-10-27 04:37:52.211 spawn: frame= 1310 fps= 27 q=-1.0 size=   18005kB time=00:00:52.36 bitrate=2817.0kbits/s speed=1.09x    
2020-10-27 04:37:53.212 spawn: frame= 1334 fps= 27 q=-1.0 size=   18345kB time=00:00:53.36 bitrate=2816.3kbits/s speed=1.09x    
2020-10-27 04:37:53.217 spawn: [mpegts @ 0x560a8c78c1e0] New video stream 0:3 at pos:19033684 and DTS:81772.1s
2020-10-27 04:37:56.819 spawn: frame= 1352 fps= 26 q=-1.0 size=   18557kB time=00:00:54.14 bitrate=2807.4kbits/s speed=1.03x    
2020-10-27 04:38:13.654 spawn: frame= 1352 fps= 19 q=-1.0 size=   18557kB time=00:00:54.14 bitrate=2807.4kbits/s speed=0.779x    
2020-10-27 04:38:21.381 spawn: frame= 1352 fps= 17 q=-1.0 size=   18557kB time=00:00:54.14 bitrate=2807.4kbits/s speed=0.701x    
2020-10-27 04:38:21.382 spawn: [mpegts @ 0x560a8c78c1e0] DTS 129840 < 1206240 out of order
2020-10-27 04:38:21.382 spawn: [mpegts @ 0x560a8c78c1e0] Incoming DTS error 1080000, offsetting subsequent timestamps by 6494400 to correct
2020-10-27 04:38:21.382 spawn: [mpegts @ 0x560a8c78c1e0] Incoming DTS error 4800, offsetting subsequent timestamps by 6499200 to correct
2020-10-27 04:38:30.100 spawn: frame= 1502 fps= 17 q=-1.0 size=   20359kB time=00:01:00.12 bitrate=2774.1kbits/s speed=0.699x    
2020-10-27 04:38:38.947 spawn: frame= 1802 fps= 19 q=-1.0 size=   24109kB time=00:01:12.09 bitrate=2739.5kbits/s speed=0.76x    
2020-10-27 04:38:47.680 spawn: frame= 1954 fps= 19 q=-1.0 size=   26156kB time=00:01:18.19 bitrate=2740.3kbits/s speed=0.755x    
2020-10-27 04:38:56.493 spawn: frame= 2104 fps= 19 q=-1.0 size=   27551kB time=00:01:24.22 bitrate=2679.5kbits/s speed=0.75x    
2020-10-27 04:38:56.497 spawn: [mpegts @ 0x560a8c78c1e0] DTS 129840 < 2833440 out of order
2020-10-27 04:38:56.497 spawn: [mpegts @ 0x560a8c78c1e0] Incoming DTS error 2707200, offsetting subsequent timestamps by 9206400 to correct

 

Link to comment
Share on other sites

sfatula

That's what it does without the patch. I suspect you are missing something with the patched version. Why are you messing with segment threads, curious?

Edited by sfatula
Link to comment
Share on other sites

So call me thick, but how does this work? 

I don't have Premier but will certainly get it if someone can tell me how Pluto works inside of Emby, I can't see how to add the M3U.

Again sorry for being thick.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...