Project

General

Profile

Plex with TVheadend

Added by Koop Koop over 8 years ago

Since Plex is similar to Kodi in some ways is there any way to integrate Plex with tvheadend? I'm fairly certain that scheduling recordings or viewing the EPG would not be possible, but is it possible to watch channels live via a playlist?
Has anyone successfully used tvheadend to record shows that then show up in Plex with the correct metadata (i.e. Plex recognizes the show and possibly even the episode number)?


Replies (8)

RE: Plex with TVheadend - Added by Jonathan Thomson over 8 years ago

There is TVPlexend (https://forums.plex.tv/discussion/151413/tvplexendchannel-bundle-a-tvheadend-channel-plugin-for-plex-media-server) - I've got it installed on my Plex server and it works "OK". You can view live channels (which include now/next data) and also view recordings.

The advantage of this over using Kodi are that Plex will transcode both live and recorded TV whereas TVH/Kodi currently only support transcoding of live content.

RE: Plex with TVheadend - Added by Koop Koop over 8 years ago

This is great! Thanks. I got it installed and configured, but so far it's not streaming any videos when I click play. But this is probably not a problem with the Plex channel because I have yet to get tvheadend live TV streaming to work through my browser...
https://tvheadend.org/boards/4/topics/20976

RE: Plex with TVheadend - Added by Jonathan Thomson over 8 years ago

Streaming support depends very much upon codec support in each browser, the recommended option is to use WEBM-based profiles.

I've just tried the default webtv-vp8-vorbis-webm profile using Chrome and it works fine (but in Kodi I get no sound with this profile so compatibility varies wildly).

If you don't have that profile, let me know and I'll post the settings. FYI the following profile also works (which I set up for 3G/low bandwidth playback);

Parameters:
Profile name: kodi.remote
Default priority: Normal
Force priority: 0
Timeout (sec) (0=infinite): 5
Restart on error: TRUE
Continue even if descrambling fails: TRUE
Preferred service video type: None
Container: Matroska (mkv)/av-lib

Transcoding:
Resolution (height): 576
Channels: Stereo
Language: English (eng)
Video codec: libx264: libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
Video codec preset: veryfast: h264 / h265 / qsv(h264)
Video bitrate (kb/s) (0=auto): 750
Audio codec: aac: AAC (Advanced Audio Coding)
Audio bitrate (kb/s) (0=auto): 64
Subtitle codec: Copy codec type

As an added bonus, this also works with Kodi :)

RE: Plex with TVheadend - Added by Jonathan Thomson over 8 years ago

Just thinking, did you build TVH yourself of use a prebuilt version? Is ffmpeg installed on your machine?

Which OS are you using? Can you check the logs for any meaningful output regards to transcoding?

RE: Plex with TVheadend - Added by Koop Koop over 8 years ago

Thanks a lot, this is very helpful. So I set the webm profile as the default (something I thought I had tried before) and it works with Plex! I also tried IE and when I clicked to play the channel it asked me to open/save the file so when I clicked "open" it opened VLC (separately from IE) and started streaming video (again, with the webm as default). So that seems to have done the trick. I will say, however that streaming from Plex to a wireless Roku box did have a few buffering interruptions but I tested it with Plex on my wired desktop and it seems to be working fine, so the wireless seems to be the problem there. I still haven't got it to stream with Firefox (what I usually use).

Since you asked, my tvheadend server is installed on the UnRaid OS (linux based) headless server as a docker and I have to use my Windows computer to access the interface via a browser.

This is a great step forward for me so thanks. However, since 90% of my viewing will be DVR'd shows I want to get that integration with Plex working better. Somone tipped me off to a great plugin called TVPlexendAgent (https://github.com/pgaubatz/TvplexendAgent.bundle) which claims to do the trick of grabbing the metadata from tvheadend and supplying it to Plex. However, I installed it and so far it isn't working... that's my next step, but I'll let you know if I make any progress improving the live streaming experience. Thanks again.

By the way, I tried to create the kodi profile you suggested and I got all of the parameters inputted, but what are the transcoding settings for? Are those settings for the tvheadend streaming profile or are they settings within Kodi (plex) itself?

RE: Plex with TVheadend - Added by Jonathan Thomson over 8 years ago

What part of TVPlexendAgent isn't working? I didn't know about that plugin so I installed it last night - Plex now "see's" the files in my library (which it didn't before) but I don't see any metadata being pulled down from TVH. Streaming works which is good, so that gives me recorded content on all my Plex-connected devices, including using Plex' excellent transcoding capabilities so it fits the bill for me.

I'd like to get the metadata bit working but I'm not too fussed if I'm honest.

As to your bottom question, all the parameters I posted are for TVH. The transcoding settings mean that any user who has access to that profile (and specifically requests or is assigned only that profile) will have their content transcoded on the fly. This only works for live TV but is a godsend for me when I stay in hotels as the wifi can be shocking so I use a stream profile which has low bitrates to enable me to still watch live TV in the hotel via TVH. I just wish it applied to recorded content too - makes no sense to me that it works for one and not the other.

RE: Plex with TVheadend - Added by Koop Koop over 8 years ago

Well for me Plex would always see the recorded files but it couldn't recognize the actual show and pull the artwork, etc. (because the file names were not per the standard). Renaming the files to the correct standard automatically probably isn't realistic but I was hoping to be proven wrong. For me adding the tvplexend.agent didn't change anything that I could tell. I want to get the metadata working so I can read the episode description and have it put the record date in the title of the episode. Otherwise, how do you keep track of which episode is which? Do you just have it sorted by created date in Plex?

I tried to contact the author of the agent via the Plex forums, but they haven't responded yet:
https://forums.plex.tv/discussion/comment/933208#Comment_933208

So when you need to use your streaming profile how do you choose to do that? Do you just go into your tvheadend settings and change the default profile or can you select it somehow when you try to play something?

Also, just to be clear, do I need to enter the Transcoding settings anywhere? If so, where do I do that? Thanks.

RE: Plex with TVheadend - Added by Koop Koop over 8 years ago

By the way, what kind of Plex library do you use for Recorded TV? Do you use a Movie library or a Home Video library? TV Show library is only really an option if you actually name the files correctly.

Also, I'm noticing that no matter what type of library I choose for my recorded shows, when I select the tvplexend.agent it converts it to a movie library. Not sure if that means anything but I just wanted to point that out.

    (1-8/8)