sfatula 189 Posted July 20, 2020 Share Posted July 20, 2020 (edited) 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 July 20, 2020 by sfatula Link to comment Share on other sites More sharing options...
Luke 37994 Posted July 21, 2020 Share Posted July 21, 2020 We'll take a look at it, thanks. Link to comment Share on other sites More sharing options...
sfatula 189 Posted July 25, 2020 Share Posted July 25, 2020 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 More sharing options...
EZEd 54 Posted August 6, 2020 Author Share Posted August 6, 2020 @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 More sharing options...
sfatula 189 Posted August 6, 2020 Share Posted August 6, 2020 (edited) 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 August 6, 2020 by sfatula Link to comment Share on other sites More sharing options...
Luke 37994 Posted August 6, 2020 Share Posted August 6, 2020 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. 2 Link to comment Share on other sites More sharing options...
sfatula 189 Posted August 6, 2020 Share Posted August 6, 2020 Sounds like it may have a chance to work better then, great! 1 Link to comment Share on other sites More sharing options...
EZEd 54 Posted August 7, 2020 Author Share Posted August 7, 2020 Thanks Luke Link to comment Share on other sites More sharing options...
smills 13 Posted August 20, 2020 Share Posted August 20, 2020 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 More sharing options...
garyan2 53 Posted August 20, 2020 Share Posted August 20, 2020 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 More sharing options...
sfatula 189 Posted August 21, 2020 Share Posted August 21, 2020 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. 1 Link to comment Share on other sites More sharing options...
garyan2 53 Posted August 21, 2020 Share Posted August 21, 2020 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 More sharing options...
sfatula 189 Posted August 21, 2020 Share Posted August 21, 2020 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. 1 Link to comment Share on other sites More sharing options...
garyan2 53 Posted August 21, 2020 Share Posted August 21, 2020 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 More sharing options...
garyan2 53 Posted August 21, 2020 Share Posted August 21, 2020 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. Link to comment Share on other sites More sharing options...
sfatula 189 Posted August 22, 2020 Share Posted August 22, 2020 (edited) 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 August 22, 2020 by sfatula Link to comment Share on other sites More sharing options...
garyan2 53 Posted August 22, 2020 Share Posted August 22, 2020 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 More sharing options...
sfatula 189 Posted August 22, 2020 Share Posted August 22, 2020 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 More sharing options...
garyan2 53 Posted August 23, 2020 Share Posted August 23, 2020 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 More sharing options...
smills 13 Posted August 23, 2020 Share Posted August 23, 2020 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 More sharing options...
mysterio21 0 Posted October 26, 2020 Share Posted October 26, 2020 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 More sharing options...
sfatula 189 Posted October 26, 2020 Share Posted October 26, 2020 (edited) 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 October 26, 2020 by sfatula Link to comment Share on other sites More sharing options...
mysterio21 0 Posted October 27, 2020 Share Posted October 27, 2020 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 More sharing options...
sfatula 189 Posted October 29, 2020 Share Posted October 29, 2020 (edited) 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 October 29, 2020 by sfatula Link to comment Share on other sites More sharing options...
GiGo 103 Posted October 29, 2020 Share Posted October 29, 2020 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now