2024-05-20, 02:03 AM
Quote:You are missing the overall point that rescanning in NextPVR is generalized for all tuners to scan, select (by ticking or unticking) only the channels you want, save and then go to the guide and auto map. That works fine. What you want is to run install twice but that is logically only available if no channels exist because it is is installed.
Oops, there's the missing ingredient. Auto Map. I'd completely forgotten about doing that in the Channels settings page. No wonder EPG updates weren't working. The channels weren't associated with any XMLTV listing. Duh.
Quote:If you are using the scheduled update and timed updates you really don't need to run any python update is UpdateEPG.bat just let NextPVR use the old file and the new one will come in on time.
Working now. Sure enough the log showed a problem with psutil. Reinstalling it with correct permissions did the trick.
Quote:Yes my "and" on the wiki did mean both not sure how that can be mistaken.
It doesn't say "and". Clearly a typo, but I'd guessed wrong on the intention.
Quote:Suffice to say that NextPVR is not a PlutoTV live TV player and I don't think sub needs to worry about any of that. The Kodi thread is useless to me, NextPVR doesn't use Kodi inputstreams pvr.iptvsimple is play only, if it works for you feel free. If you want a continuous stream you can turn of streamlinks m3u8 filtering but then there will be more video streams.
Was referring to Streamlink there, and whether there might be something to gain from that fellow's ideas regarding UDP multicast relay and IPv6. Admittedly, I know next to nothing about either of those.
Still no luck piping Streamlink's output to FFmpeg's input. Streamlink 6.7.4-1 - Python 3.8 and FFmpeg 7.0 led to quite different results.
The supplied command line, verbatim.
Code:
streamlink https://pluto.tv/live-tv/6541010f770cf1000866be98 best -O | ffmpeg -hide_banner -i pipe: -codec copy -c:s copy -f mpegts NUL
...
[cli][info] Found matching plugin pluto for URL https://pluto.tv/live-tv/6541010f770cf1000866be98
error: No playable streams found on this URL: https://pluto.tv/live-tv/6541010f770cf1000866be98
[in#0 @ 0000000000361d80] Error opening input: Invalid data found when processing input
Error opening input file pipe:.
Error opening input files: Invalid data found when processing input
At least FFmpeg was opened and looking for piped input. Using the PBR RidePass URL, first making sure there's valid data.
Code:
streamlink https://pluto.tv/live-tv/60d39387706fe50007fda8e8
...
[cli][info] Found matching plugin pluto for URL https://pluto.tv/live-tv/60d39387706fe50007fda8e8
Available streams: 570k (worst), 1000k, 1500k, 2100k, 3100k (best)
...
streamlink https://pluto.tv/live-tv/60d39387706fe50007fda8e8 best -O | ffmpeg -i pipe: -codec copy -c:s copy -f mpegts NUL
...
[cli][info] Found matching plugin pluto for URL https://pluto.tv/live-tv/60d39387706fe50007fda8e8
[cli][info] Available streams: 570k (worst), 1000k, 1500k, 2100k, 3100k (best)
[cli][info] Opening stream: 3100k (hls-pluto)
It just hangs there until a break command is issued. What about writing to a file?
Code:
streamlink https://pluto.tv/live-tv/60d39387706fe50007fda8e8 best -O | ffmpeg -i pipe: -codec copy -c:s copy -f mpegts output.ts
...
[cli][info] Found matching plugin pluto for URL https://pluto.tv/live-tv/60d39387706fe50007fda8e8
[cli][info] Available streams: 570k (worst), 1000k, 1500k, 2100k, 3100k (best)
[cli][info] Opening stream: 3100k (hls-pluto)
Nope.
OK, let's take FFmpeg out of the picture and see what happens.
Code:
streamlink https://pluto.tv/live-tv/60d39387706fe50007fda8e8 best -o output.ts
...
[cli][info] Found matching plugin pluto for URL https://pluto.tv/live-tv/60d39387706fe50007fda8e8
[cli][info] Available streams: 570k (worst), 1000k, 1500k, 2100k, 3100k (best)
[cli][info] Opening stream: 3100k (hls-pluto)
[cli][info] Writing output to
C:\Users\Public\NPVR-data\scripts\output.ts
[download] Written 130.91 MiB to C:\Users\Public\NPVR-data\scripts\output.ts (6m36s @ 408.20 KiB/s) [
stream.hls][info] Filtering out segments and pausing stream output
[download] Written 130.91 MiB to C:\Users\Public\NPVR-data\scripts\output.ts (8m36s @ 0 bytes/s) [
stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][info] Resuming stream output
[download] Written 266.17 MiB to C:\Users\Public\NPVR-data\scripts\output.ts (15m47s @ 393.33 KiB/s) [
stream.hls][info] Filtering out segments and pausing stream output
[download] Written 266.17 MiB to C:\Users\Public\NPVR-data\scripts\output.ts (17m46s @ 0 bytes/s) [
stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][info] Resuming stream output
[download] Written 399.92 MiB to C:\Users\Public\NPVR-data\scripts\output.ts (24m51s @ 319.55 KiB/s) [
stream.hls][info] Filtering out segments and pausing stream output
[download] Written 399.92 MiB to C:\Users\Public\NPVR-data\scripts\output.ts (26m52s @ 0 bytes/s) [
stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[stream.hls][info] Resuming stream output
[download] Written 460.64 MiB to C:\Users\Public\NPVR-data\scripts\output.ts (30m01s @ 329.23 KiB/s)
[cli][info] Stream ended
Interrupted! Exiting...
[cli][info] Closing currently open stream...
Now we're cooking with gas. Remuxing....
Code:
ffmpeg.exe -hide_banner -i "output.ts" -c:v copy -c:a copy -c:s copy "output_remux.ts"
Input #0, mpegts, from 'output.ts':
Duration: 00:24:15.06, start: 3851.005333, bitrate: 2655 kb/s
Program 1
Stream #0:0[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 98 kb/s
Stream #0:1[0x102]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1216x684 [SAR 1:1 DAR 16:9], 30
fps, 30 tbr, 90k tbn
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Output #0, mpegts, to 'output_remux.ts':
Metadata:
encoder : Lavf61.1.100
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1216x684 [SAR 1:1 DAR 16:9], q=2-31, 3
0 fps, 30 tbr, 90k tbn
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 98 kb/s
Press [q] to stop, [?] for help
[mpegts @ 00000000005741c0] Packet corrupt (stream = 1, dts = 383937000).
[in#0/mpegts @ 0000000000591a40] corrupt input packet in stream 1
[aist#0:0/aac @ 000000000060fdc0] timestamp discontinuity (stream id=257): -4992000, new offset= 4992000
[vist#0:1/h264 @ 0000000002f75040] timestamp discontinuity (stream id=258): -4999999, new offset= 9991999
[mpegts @ 00000000005741c0] Packet corrupt (stream = 1, dts = 422637000).
[in#0/mpegts @ 0000000000591a40] corrupt input packet in stream 1
[aist#0:0/aac @ 000000000060fdc0] timestamp discontinuity (stream id=257): -5013333, new offset= 15005332
[vist#0:1/h264 @ 0000000002f75040] timestamp discontinuity (stream id=258): -5000000, new offset= 20005332
[mpegts @ 00000000005741c0] Packet corrupt (stream = 1, dts = 460437000).
[in#0/mpegts @ 0000000000591a40] corrupt input packet in stream 1
[aist#0:0/aac @ 000000000060fdc0] timestamp discontinuity (stream id=257): -4992000, new offset= 24997332
[vist#0:1/h264 @ 0000000002f75040] timestamp discontinuity (stream id=258): -5000000, new offset= 29997332
[out#0/mpegts @ 000000000039b800] video:431718KiB audio:17697KiB subtitle:0KiB other streams:0KiB global headers:0KiB mu
xing overhead: 4.704414%
size= 470557KiB time=00:24:44.99 bitrate=2595.8kbits/s speed=34.8x
Examining the format with ffprobe shows 1 video and 1 audio stream in each, with the following differences. First the original.
start_time=3851.005333
duration=1455.061334
And the remux.
start_time=1.405333
duration=1485.058667
The remux operation has, as expected, normalized the PTS values and consequently zeroed the start time.
Note that three 2 minute segments are missing for a total time of around 24 minutes, and 3 discontinuities were coincidentally reported by FFmpeg during the remux. They don't occur right on commercial boundaries, but the resultant video is commercial free, so it is a reasonable assumption that the missing 6 minutes consists of commercial breaks. Unfortunately if this were recorded in NextPVR, the duration would be reported as 30 minutes because that is derived from the start and end times in the metadata xml file, but that's another matter.
So where does 30 seconds difference arise? Having a look at the discontinuities, and those can be found easily from the numbers above, reveals that in the original, the video stops while the audio repeats for 5 or 6 seconds, and in the remux, the video is repeated as well, with some seconds at the end for both to resync.
Bottom line. Recording from at least some of the "broken" Pluto channels appears not only possible, but the Streamlink plugin seems adept at filtering out unwanted streams, including the ads. The caveat is that there may be some glitches during playback. This could also translate to live TV with time-shifting capability as long as appropriate precautions are taken, such as ensuring that the playback buffer doesn't close and/or clear during discontinuities and that playback pauses when the end of the buffer is reached.