Jump to content

Pluto TV xml guide resource


EZEd

Recommended Posts

EZEd

I've got the Pluto TV m3u stream working inside of Emby and the channels show fine (for the most part). I initially loaded a corresponding xml guide file to accompany but because Pluto doesn't do a 1 or 2 week guide outlook (guide is only good for 8 to 24 hrs) I don't think it is updating very well.  Many of the channels do not show guide information for what is currently on.  Is there a good (or better) source for the xml guide to Pluto TV that someone might have found or available?  Any info would be helpful.

Thx

Link to comment
Share on other sites

EZEd

Hey Sammy good ol Google. I'll have to go back and find the link and will get it to you.

Sent from my SAMSUNG-SM-G930A using Tapatalk

Link to comment
Share on other sites

garyan2

I've made my own program to get the Pluto.tv streams and the guide information to create the m3u and xmltv files. Everything looks good, but the major hurdle is they are HLS streams and emby can't handle that. As soon as the program cuts to commercial, or renegotiates the bitrate or video size, then viewing stops. If I am missing something to address that issue, I am all ears.

As far as alternate guide listings for the pluto channels, I haven't found much so right now I am left with 12 hours of guide on each "update".

  • Like 2
Link to comment
Share on other sites

EZEd

Hey gary (thanks for all your work on EPG123 by the way).  Get in touch with @cayars he may have a method to fix that. I haven't tried it yet but he may have your answer.

Link to comment
Share on other sites

I think they only supply 12 hours of guide data for their own clients.  So you would likely want to alter the Emby Guide Refresh schedule and change it from it's default of 24 hours to 6 hours.  This way you always have 6 hours of guide data available.  I'd not update any more than that however.

If HLS is causing a problem another approach could be to run it through xTeve and let it convert and feed Emby.  That might fix the HLS issue.  I've not tried this with streams from Pluto so I can't comment from a personal experience.

Link to comment
Share on other sites

garyan2

I think I tried xTeVe briefly but didn't put a lot of effort into it. I don't have much experience with it but thought it might work as well. Given time, I'll jump back into it and see what I can do.

Thanks!

Link to comment
Share on other sites

XTeve has a few cool features that compliment Emby when using M3U files.  Some of the notable things is that it can pull the M3U file, present it to you and allow you to mark channels as active or not.  So it makes it easy to hide channels you don't want.  You can "filter" and treat the filter as a group so anything in Spanish can be eliminated or channels from certain countries.

You can assign or renumber the entries in the M3U files as well.

That's just a few things but then you can have it sit in the middle between Emby and the service provider.  So it can pull the M3U and make all your changes on the fly and then be able to hand off a new M3U file with your customization in it for ingesting into Emby Server.

It also has an optional buffer that can help in certain situations but generally should be turned off.

Features: https://xteve.de/

Limited Documentation

https://github.com/xteve-project/xTeVe-Documentation/blob/master/en/configuration.md

  • Like 1
Link to comment
Share on other sites

Sammy

@garyan2

Just saying hi! I haven't been using epg123 for over a year now since fully switching to Emby for LiveTV. I want to thank you again for your work on that project to extend the life of WMC.. Any chance of having the channel renumbering carried through to xmltv files for use in Emby to customize the guide? If you think so, I'll start a new thread.

Link to comment
Share on other sites

sfatula
18 hours ago, garyan2 said:

I've made my own program to get the Pluto.tv streams and the guide information to create the m3u and xmltv files. Everything looks good, but the major hurdle is they are HLS streams and emby can't handle that. As soon as the program cuts to commercial, or renegotiates the bitrate or video size, then viewing stops. If I am missing something to address that issue, I am all ears.

As far as alternate guide listings for the pluto channels, I haven't found much so right now I am left with 12 hours of guide on each "update".

Any tips / code / process on how you are getting Pluto Guide and streams? You can PM me if need be. 

Link to comment
Share on other sites

garyan2
36 minutes ago, sfatula said:

Any tips / code / process on how you are getting Pluto Guide and streams? You can PM me if need be. 

The starting point is a single API call to Pluto which will give you all the information you need to create the m3u and xmltv files.

https://api.pluto.tv/v2/channels.json?start={yyyy-MM-ddTHH:00:00.000Z}&stop={yyyy-MM-ddTHH:00:00.000Z}

Replace the start and stop times as needed and remove the curly brackets. I use 00 minutes and 00.000 seconds in my queries just to make it simple. Those channels that do not have the "isStitched" set to true are the music channels so I ignore those. All the guide information is in the "timelines".

  • Like 1
Link to comment
Share on other sites

sfatula
2 hours ago, cayars said:

This is documented on their website.

If you were responding to me, I have searched pluto tv api, etc, and never saw any doc on their website. I also searched their site, perhaps in the wrong way. Can you provide a link? Coding is trivial, but having the api references is priceless. While garyan2 provided the raw call, I'd be interested in seeing the link if you would be so kind. 

Link to comment
Share on other sites

Register as a dev on their site, get approved, get sent the documentation links.

Something like that.  I was thinking about writing a plugin to add PlutoTV into Emby but decided against it.

 

  • Like 2
Link to comment
Share on other sites

sfatula

Ok, will try and find out where. Got all the data figured out, I see where to get season number, etc. Surprise there is no authentication of some sort, maybe they eventually will. That would be an advantage of officially register. 

Link to comment
Share on other sites

garyan2

No joy with xTeVe. Best results were with VLC but it was still not acceptable results. On transitions the playback would stop and sometimes start back up okay, but if it comes back the audio may be way off.

Link to comment
Share on other sites

sfatula

I'll be ready with xTeVe later this coming week, will see if I get the same bad results or not. 

Link to comment
Share on other sites

sfatula

I have the same experience as garyan2, on transitions, seems to stop video but continue audio. I'll try asking on discord. Without xteve at all, still doesn't work. Also tried the various buffers. 

EDIT: I do have a recording that worked, including commercials. While it won't play in a web browser, it does seem to play in IOS client. So, seem to have a working config at least right now. 

Edited by sfatula
Link to comment
Share on other sites

garyan2

Hmm. I was testing on the browser as well since emby was saying it was Direct Streaming. Maybe I'll try again and look at playback on the shield.

Link to comment
Share on other sites

sfatula

Yeah, I tried tellytv also, no luck, worse than xTeVe. So, now, repeating tests to compare m3u vs HDHR and the various cache modes. I did have a xTeVe/VLC hang last night on a test recording. Tried vlc 4.0 Beta today, doesn't even run but changed a few things, more experimentation to go. I see for Kodi on at least one platform, the issue with Pluto seemed to be not supporting EXT-X-DISCONTINUITY, not sure if that affects Emby or not. Seems like the same issue, hang after commercial, etc. The claim was "that will be because Inputstream Adaptive and ffmpeg don't currently support EXT-X-DISCONTINUITY in HLS playlists"

Edited by sfatula
Link to comment
Share on other sites

sfatula

Also tried a nice proxy called HLS-PROXY, same results. It appears the problem is Emby Server, and indeed discontinuity not being supported in ffmpeg. I have a patch for that but not sure I can replace Emby ffmpeg with my own (for testing), would need to compile from source and I thought Emby had their own custom patches? Or, is it somehow possible to replace the Emby ffmpeg with my own ffmpeg patched?

 

Looks like I can edit /opt/emby-server/bin/emby-server to try my own ffmpeg. Will go down that road and see if I can get Pluto to work without any problems with commercials, etc. 

Edited by sfatula
Link to comment
Share on other sites

sfatula

Well... Emby just hates discontinuities. So does everything else based upon ffmpeg, there are numerous many years old bugs filed. Tried many different tools like xteve, no dice. I cannot get Emby to record Pluto under any scenario. 

However.... I did get Streamlink to capture Pluto thus far for 3.5 hours without any issue at all. Problem is, the output ts also does not play in Emby due to the discontinuity. However, I was able to compile my own ffmpeg with some patches that allow support, and, I have taken the streamlink recording and put through my patched ffmpeg and it outputs a perfect mkv file. Which Emby can play.

That's a lot of work to record pluto. But, I think with a proper hook, I could get Emby to use streamlink to record pluto livetv. 

Edited by sfatula
Link to comment
Share on other sites

sfatula

Essentially these changes:

http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180316/739542e4/attachment.obj

Modified for latest ffmpeg since line numbers are different. This adds a parm for ffmpeg: -force_dts_monotonicity

I was skeptical that the changes would still work, so was going to apply to an older ffmpeg but they did still work on latest. Fortunately, if older version was needed, that was already done: https://github.com/jjustman/ffmpeg-hls-pts-discontinuity-reclock

I botched my ffmpeg build though as I wanted to then see if I could route through nvenc but didn't do the compile right. 

This was a huge pain and a lot of research, but, for me worth it. I wish ffmpeg would finally fix the issues with discontinuity, you can see all the cases in trac. Years of them. Probably the patch is not perfect, but works for my use case. 

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...