PseudeoTV-Plex - Create LiveTV channels from your Plex playlists

Thanks for this! So here is a problem, we actually use a HD Homerun in our home for Plex DVR and I find that setting this up breaks that usage and additionally I am asked to bind a PseudeoTV virtual channel to an actual real channel that the real HD Homerun uses.

Is there any way to get this tweak to work alongside an actual HD Homerun device?

You can define the channel numbers in pseudotv, so just set it to like 5000, 5001 etc…

2 Likes

There is a work around. The result will be TWO independent LIVE TV & DVR instances on the sidebar of your Plex Web UI.

Delete all the tuners and start from scratch. From what I can tell, I have not lost any of my scheduled programs. Then open TWO seperate tabs in your browser of the DVR setup. On the first tab, start the process to add the PseudoTV. Go through the steps, add the XML path, then finish but DONT refresh the page.

Go to the 2nd open tab, then add back your HDHrun tuner and install that like normal (zipcode, channel mapping). Then refresh in that tab. You will see two sets of Live TV & DVR located on the side. From my understanding, there can’t be a sharing of one EPG of two separate services (?).

The setup of PseudoTV tuner sees your channels as CABLE but not OTA. All I know is that’s how I got it to work. It would be nice if we don’t have to do it that way, but this was the work around others have suggested.

1 Like

So I’ve gotten this almost completely working. Created the channel, added content. Able to see the channel in Plex, and can even play it and it plays perfectly fine.
My issue happens when I exit out of the player in plex. Happens on the Plex iOS app, and from the web. When I exit the player, it completely kills pseudotv. I have to restart it to get it back up.
Heres the error from the logs:

`Stream ended. Channel: 1 (Channel 1)
FFMPEG ERROR {
code: 255,
cmd: ā€˜-threads 4 -ss 650.972 -re -i http://xx.xx.xx.xxx:32400/library/parts/86333/1439935796/file.avi?X-Plex-Token=xxxxxxxx -t 699.503 -filter_complex [0:v]null[v1];[v1]null[v] -map [v] -map 0:1 -c:v libx264 -c:a ac3 -ac 2 -ar 48000 -b:a 192k -b:v 10000k -s 1280x720 -r 30 -flags cgop+ilme -sc_threshold 1000000000 -minrate:v 10000k -maxrate:v 10000k -bufsize:v 1000k -metadata service_provider=ā€œPseudoTVā€ -metadata service_name=ā€œChannel 1ā€ -f mpegts -output_ts_offset 0 -muxdelay 0 -muxpreload 0 pipe:1’
}
_http_outgoing.js:533
throw new ERR_HTTP_HEADERS_SENT(ā€˜set’);
^

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (_http_outgoing.js:533:11)
at ServerResponse.header (/Users/xxxx/pseudotv-plex/node_modules/express/lib/response.js:771:10)
at ServerResponse.contentType (/Users/xxxx/pseudotv-plex/node_modules/express/lib/response.js:599:15)
at ServerResponse.send (/Users/xxxx/pseudotv-plex/node_modules/express/lib/response.js:145:14)
at FFMPEG.<anonymous> (/Users/xxxx/pseudotv-plex/src/video.js:71:29)
at FFMPEG.emit (events.js:315:20)
at ChildProcess.<anonymous> (/Users/xxxx/pseudotv-plex/src/ffmpeg.js:166:22)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1051:16)
at Socket.<anonymous> (internal/child_process.js:442:11)
at Socket.emit (events.js:315:20)
at Pipe.<anonymous> (net.js:671:12) {
code: ā€˜ERR_HTTP_HEADERS_SENT’
} `

As ridiculous as it sounds, this is patented by Google.

Issue already noted here

yeah, not news to most of us who dig deeper into things but this is the comments I get from others who ask why something is the way it is… and us here know its about pat.ent lol ( com- cast vs. rov-i for example)

@edge06 Yes, it’s listed as one of the options for the channels.

@baberim & @crackers81991 are y’all using 0.0.5? I’m still on 0.0.4h and don’t get that error. (I’m staying on that branch cuz it works fine for me and I don’t wanna have to reprogram all my channels again, lol)

@yodandy Yep! Here, I’ll attach mine.

I am on 0.0.5. I wouldn’t have a clue on how to upgrade this, let alone downgrade to 0.0.4…but I kinda wish I have 0.0.4 now lol.

1 Like

my guess is you have to check out the 0.0.4 branch and then rebuild the docker image. i’ll tinker with it later if i have some time after work.

Thank you, this worked.

New issue, if I close show from client end it kills the service. Should I cron service? nvm; created scrip and have cron.

This is a great app you created, thanks!

@crackers81991 I didn’t build with docker. Couldn’t get it to work unfortunately so I used the source build instructions. Oh well…hopefully 0.0.6 fixes it :slight_smile:

Yep, that’s as far as I have gotten. I took a pause on tinkering with it, but the next time I mess with it I’m going to swap out the encoders again.

Blockquote Utilize your hardware accelerated encoders, or use mpeg2 instead of h264 by changing the default video encoder in FFMPEG settings. Note that some encoders may not be capable of handling every transcoding scenario, libx264 and mpeg2video seem to be the most stable.

  • Intel Quick Sync: h265_qsv , mpeg2_qsv
  • NVIDIA GPU: h264_nvenc
  • MPEG2 mpeg2video
  • H264 libx264 (default)

0.0.4 has a different error, no picture, and made the buffering worse.

FFMPEG ERROR {
  code: 255,
  cmd: '-threads 1 -ss 1.657 -t 1333.31 -re -i http://192.168.88.253:32400/library/parts/8649/1584604919/file.mkv?X-Plex-Token=xxx -c:v libx264 -c:a ac3 -ac 2 -ar 48000 -b:a 192 -b:v 2048 -s 1280x720 -r 30 -flags cgop+ilme -sc_threshold 1000000000 -minrate:v 2048 -maxrate:v 2048 -bufsize:v 100000 -f mpegts -output_ts_offset 11.767 pipe:1'
}

on the plus side, the ffmpeg error doesn’t crash the entire docker container like it does with 0.0.5…but it’s still unusable.

1 Like

Something within the setup is killing the entire docker container from running. Each and every time I stop playback, the container exits with the following in the Docker log:

http://tardis.local:32400/library/parts/63221/1587527375/file.mkv?X-Plex-Token=MyPlexTokenWasHere -t 468.486 -filter_complex [0:0]null[v1];[v1]yadif[v] -map [v] -map 0:3 -c:v libx264 -preset veryfast -c:a ac3 -ac 2 -ar 48000 -b:a 192k -b:v 10000k -s 1280x720 -r 30 -flags cgop+ilme -sc_threshold 1000000000 -minrate:v 10000k -maxrate:v 10000k -bufsize:v 1000k -metadata service_provider="PseudoTV" -metadata service_name="Sliders Central" -f mpegts -output_ts_offset 0 -muxdelay 0 -muxpreload 0 pipe:1'

npm ERR! /root/.npm/_logs/2020-05-11T21_35_38_003Z-debug.log

You could make a simple systemd service.

1 Like

So when i add it to my DVR it wants to use my existing OTA channels for the mapping? I am not prompted to enter the custom xmltv file info…Am i missing something?

1 Like

From what some us know, based on others attempting this, creating TWO separate instances of tuners, each having their own EPG is what is required to get this to work. You currently aren’t able to simply add PseudoTV channels to the EPG guide that’s imported from the HDHR tuner, which is OTA. PseudoTV is read as cable channels.

1 Like

@D_eight6 Thanks for the info. I use Plex as my main DVR and not so sure i wanna go messing around and hacking/tricking it. Kinna worried it could mess up my recordings. Just thought this would be cool feature to try.

3 Likes

yeah, this is basically what we were discussing above with the ffmpeg errors.