How create custom channel using a remote Channels DVR server as a video source

Ah, I didn't realize that they couldn't be connected via the integrated. yes, I was trying to feed a specific channel from one of my servers to another. I guess I have to start researching at the device level. Having it within the application is so much more convenient, but looks like I exceeded the intent. Thanks for the quick replies.

1 Like

You're specifying format=ts; don't. You want the HLS stream, not the MPEG-TS.

Also, if you set the preferred bitrate/resolution in the Web Player section of your DVR settings, you can additionally omit the bitrate query parameter.

Thanks. I had actually tried both, but went ahead and re-loaded with the following settngs:

#EXTM3U

#EXTINF:-1 channel-id="1.1" tvg-id="1.1" tvg-chno="1.1" tvg-logo="https://tmsimg.fancybits.co/assets/s28717_ll_h15_ad.png?w=360&h=270" tvc-guide-stationid="25544" tvg-name="WGALDT" group-title="Favorites",NBC
http://100.93.xxx.x/devices/10A22667/channels/8.1/hls/master.m3u8

I still get the following error. Looks like I've exceeded the intent of the capabilities:

2023/08/26 11:13:35.089965 [ERR] Failed to start stream for ch1.1: M3U: Could not fetch playlist: 100.93.119.7 (Timeout): Get "http://100.93.xxx.x/devices/10A22667/channels/8.1/hls/master.m3u8": dial tcp 100.93.xxx.x:80: i/o timeout
2023/08/26 11:13:35.090195 [HLS] Couldn't generate stream playlist for ch1.1-dANY-ip192.168.1.34: M3U: Could not fetch playlist: 100.93.xxx.x (Timeout): Get "http://100.93.xxx.x/devices/10A22667/channels/8.1/hls/master.m3u8": dial tcp 100.93.xxx.x:80: i/o timeout
2023/08/26 11:13:35.090371 [HLS] Stopping transcoder session ch1.1-dANY-ip192.168.1.34

I just tested your text subbing in my tail net and hdhr device Id and it played just fine on a remote server. If you have double verified your tail net ip annd it’s still enabled in the dvr settings page and hdhr id are correct then try adding Tailscale to the client machine at the os level. And leave the m3u text with the dvr Tailscale and try again.

Per Tailscale status page, both machines were active and also showed active under the settings section of both DVR servers. I was testing using a web browser vs a client. I suppose I could add Tailscale for the windows machine, but seems like that wouldn't be necessary if the Host Server is sharing with the Client Server which in turn feeds the local clients.

Just an FYI.
When connecting to a Channels DVR using tailscale, if using the Channels DVR built-in tailscale you don't specify the port#. i.e. 100.100.100.100

If instead using tailscale on the server device (and not the Channels DVR built-in tailscale) you must specify the port#. i.e. 100.100.100.100:8089

Not sure on other installs, but I know this is true for a Synology NAS.

So installed Tailscale at the OS Level for my Home DVR Server and have Tailscale installed at the Channels DVR Server level on the remote server.

Home DVR Server = 1.1.1.1 (as an example) <- Tailscale enabled at OS Level (Synology NAS)
Remote DVR Server = 2.2.2.2. (as an example) <- Tailscale enabled at the Channels DVR Server Level
Confirmed both IP addresses are valid (I can access the remote server from my home network using the following:

http://2.2.2.2:8089/admin/settings

I used the below to create a custom channel on my Home DVR Server:

#EXTM3U

#EXTINF:-1 channel-id="1.9" tvg-id="1.9" tvg-chno="1.9" tvg-logo="https://tmsimg.fancybits.co/assets/s28708_ll_h15_ac.png?w=360&h=270" tvc-guide-stationid="51960" tvg-name="WCJBDT" group-title="HD",ABC
http://2.2.2.2:8089/devices/ANY/channels/6001/hls/master.m3u8?

I'm still not able to get a live feed. Current error looks like this:

2023/08/28 21:29:26.502289 [ERR] Failed to start stream for ch1.9: M3U: Could not fetch playlist: 2.2.2.2:8089 (Timeout): Get "http://2.2.2.2:8089/devices/ANY/channels/6001/hls/master.m3u8?": context deadline exceeded

Will it work if you set up a custom source with hls and url with this as the url

http://2.2.2.2:8089/devices/ANY/channels.m3u?bitrate=3000

You may need to follow these additional steps on your Synology to get Tailscale to fully work:

The latest DVR pre-release now will support connecting two DVRs over the integrated Tailscale support without needing to install it on the OS.

Thanks for reporting this.

1 Like

Doesn't seem to matter for me which method is used, is the any benefit for omitting the port?

@eric
I've been testing using TailScale rather than using a session cookie and seem to have some amazing results. Rather than using HLS, I am able to use direct TS over WAN (~40ms latency) without issue. The individual channels are output in this format...

http://X.X.X.X/devices/ANY/channels/XX/stream.mpg?codec=copy&format=ts

There is no transcoder activity on the sender side and the channels start much quicker. Is TailScale just that much better at routing?

Also, is "codec=copy" needed or can I omit that and only specify "fortmat=ts"

Are you using URL as source or text? I've tried both and using your below code (obviously adjuting for my remote server IP and the correct channel number) and I get the following error. Usually I'm overlooking something obvious as I only understand about 20% of the code in these things.

I am able to use it with the transcoding, but as you pointed out, takes a while to load and I don't want to overtax the remote server as it's a entry level synology NAS (j series I beleive).
image

You can omit both. The stream.mpg endpoint is the raw TS that Channels uses. Both codec=copy and format=ts are redundant and superfluous.

The only downside of this is any TCP packets that get dropped will cause the stream to stall for much longer than using HLS which will retry the connection internally overcoming the TCP back off algorithm.

1 Like

May have changed with the latest prerelease (haven't tried), but it didn't work previously if you tried to specify the port# when connecting to a Channels DVR server with its built-in tailscale enabled. I have 4 servers, in 4 docker containers, using 4 different ports.

Nice, so if I have a work DVR in one location and a home DVR in another, I can turn on Tailscale on both DVR’s, and be able to access the work’s OTA channels at home? I’d just need to turn on Tailscale on my clients too? But what about the (mobile) work clients, if they are only accessing the channels from the work DVR, will they need Tailscale enabled too?

Just curious before diving in, trying to understand any caveats ahead of time. What a cool feature!

Tailscale is fantastic. When you dive in I recommend using both the integrated version in the channels clients (which will assign tailscale ip addresses to them) as well as using the stand alone app on your devices if possible (which will assign them a second tailscale ip address). There is no tailscale app for the apple TV for now, so you will have to use the built in support. Apple is planning on building the vpn support into the apple tv in TVOS17, and tailscale will hopefully release an app for the apple tv soo after that.

The stand alone app method has some advantages over the built in tailscale support with the way the guide loads remote channels and remembers your last used connections.

Yes i think so. I havent tested this.

If your work DVR is behind a cgnat, you will need tailscale. Whenever you use tailscale you connect to the DVR using “At Home”. If you are on the road, you could get into the second DVR by connecting to it using the Away From Home feature if the dvr port is exposed. But you will need to check with the developers to see if there is a restriction for how many “away from home” dvrs can be alive at once. Im not sure. I only use tailscale because in my case all my DVRs are behind cgnats.

1 Like

No, in the best case Tailscale will give you the same situation you had going directly (just without having to worry about ports and authentication) but in the worst case, could have to go through a relay node that gives you worse performance. There's nothing magical about Tailscale that would make it better than going directly in regards to performance.

If we're talking specifically about using these m3u's to export channels from one DVR to another, your clients do not need to have any sort of Tailscale enabled to be able to play the channels that are exported. They just need to connect to the DVR they're connected to and all traffic is sent through the connected DVR.

Using the native Tailscale integration that your OS has on your client will give you a better experience if it is available (the discovery situation you mentioned). Our integration on the client is purely there for the cases like tvOS where it is not yet possible (as you mentioned).