Use Channels-DVR as a tuner for Emby

I prefer EMBY because of user Profiles but they fall short in comskip support.

@mike_here

Do you care to share the python script and maybe a full set up guide? I'm a long time Emby User interested in giving this a go.

What started as a python script ended up being a full blow program with a back-end database. In order to have Emby identify the channels without having to match each one in Emby, I had to normalize the call signs and I had to split the m3u file into 5 pieces. This is due to not having a single guide provider that could cover all channels. I didn't want to use SchedulesDirect/xTeve. I did want to use the built in providers that Emby provides. Each of the 5 m3u files were loaded into Emby and each assigned a different guide provider. The benefit of all this is there was not additional configuration of Emby needed. I could convert the back-end db to SQLite if you want to try this. PM me and let's discuss. Not trivial so you will need some skills and a good bit of Gin. :wink:

Also, I can't tell you what I did was right, but it works. I knew nothing about any of this when I started.

Wow that is a lot I edited the m3u and added the channels and corrected call signs then I simply added an EMBY comcast east coast lineup along with my west coast one and it worked. That way I can easily add and remove channels. First thing I did in Notepad+ is change

#EXTINF:-1 to #EXTINF:-1 channel-id="XXXX" all ... then edited with correct channel.

#EXTINF:-1 channel-id="6007" tvg-logo="https://tmsimg.fancybits.co/assets/s68344_ll_h3_ad.png" tvg-name="CSPAN" group-title="HD",CSPAN

http://mediapc:8089/devices/TVE-Comcast_SSO/channels/6007/hls/master.m3u8?

#EXTINF:-1 channel-id="6008" tvg-logo="https://tmsimg.fancybits.co/assets/s68334_ll_h3_ac.png" tvg-name="CSPAN2" group-title="HD",CSPAN2
http://mediapc:8089/devices/TVE-Comcast_SSO/channels/6008/hls/master.m3u8?

#EXTINF:-1 channel-id="6009" tvg-logo="https://tmsimg.fancybits.co/assets/s68332_ll_h3_ac.png" tvg-name="CSPAN3" group-title="HD",CSPAN3
http://mediapc:8089/devices/TVE-Comcast_SSO/channels/6009/hls/master.m3u8?

#EXTINF:-1 channel-id="6030" tvg-logo="https://tmsimg.fancybits.co/assets/s58646_ll_h3_ac.png" tvg-name="CNNHD" group-title="HD",CNNHD
http://mediapc:8089/devices/TVE-Comcast_SSO/channels/6030/hls/master.m3u8?

#EXTINF:-1 channel-id="6031" tvg-logo="https://tmsimg.fancybits.co/assets/s64549_ll_h3_ab.png" tvg-name="HLNHD" group-title="HD",HLNHD
http://mediapc:8089/devices/TVE-Comcast_SSO/channels/6031/hls/master.m3u8?

I'm in the AZ timezone and the guide times were off on quite a few channels. Your approach would have been a lot easier, but for some reason I had to use a combination of Spectrum, Dish, Direct TV and OTA to get the guide correct for me. I ended up getting rid of the Roku and got a new TV for the pool a few months later so I haven't touched this since.

I made some improvements in the latest pre-release:

  • use channels.m3u?format=ts for stream.mpg urls
  • added channel-id
  • changed tvg-name to use call sign for easier guide matching
  • removed duplicate channels when using ANY device
2 Likes

You guys are really great thanks for making this easier much appreciated.

1 Like

This is great @tmm1. As @Edwin_Perez said, much easier. Thank you.

This has proven to be better than I thought... By having Channels DVR be the backend I can share tuners between EMBY and other Apps on my test System. I can watch the same Channels on EMBY and Channels DVR and only use 1 tuner... Also from my test systems.

:star: :star: :star: :star: :star:

1 Like

Are you having any problems with channels releasing the HDHR tuner after emby is finished with it.

I recently started using Jellyfin (open source fork of Emby) to hook up a friend out of the area to get local sports channels and that issue with Jellyfin where the tuner still looks like the channel is being watched when it isn't.

No Problem at all they are release right away.

Use format=ts to prevent that issue.

1 Like

That is what I am using.

Ok thanks. I would like to see channels and emby share the HDHR.

They do, but maybe not in the way you are thinking. Presently, any app can request a stream from the tuner, and if there are free tuners, it will serve the stream to the requesting program. So, both Emby and Channels can request a stream from a Quatro (for example), and that will use 2 of the 4 available tuners.

If what you are asking for is that the tuner stream the same program to both Emby and Channels simultaneously (1 tuner being used to send the same stream to different programs/addresses), that is not possible.

Yes it does I am doing it now using M3U from Channels DVR as a tuner IN EMBY and it shares the 1 tuner for the same channel. I am watching the Basketball game in EMBY and Channels and only using 1 tuner.

2020/09/22 18:34:59.643938 [TNR] Opened connection to 13147C7B/1 for ch754 TNTPHD
2020/09/22 18:35:33.734277 [TNR] Sharing existing connection to 13147C7B/1 for ch754 TNTPHD (clients=2, len=0, transcode=none)

You just have to make sure to use ANY when extracting the M3U

http://yourserverip:8089/devices/ANY/channels.m3u?format=ts

True, sort of. If using Channels' M3U playlist as your tuner for Emby, then Channels and Emby can share an open tuner for the same program. However, if you are using the HDHR directly in both Channels and Emby, then they can share the physical device, but not the individual streams.

Thanks for all the information. When I tried it I was not using format=ts and channels did not always release the tuner when emby was finished with it. So eventually all tuners were in use when none really were. The only way I could release the tuners was close and restart channels. Thanks again now that I know it's possible I'll put more time into it.

What are you saying here?