Frndly TV for Channels

I am running the no docker version on a Windows computer as described on Frndly TV for Channels (matthuisman.nz)

I have used the docker container before when it was also being used for Pluto TV. Later on, I found out about the playlist to have Pluto TV without docker so then Frndly was the only one left running in docker.
Since I also recently found out about the no docker version of Frndly TV for Channels, I wanted to use it so that I didn't have to have docker running on my Windows machine anymore.

When I set up the custom channel for it, I set it up this way:

However, when I open the settings now to see what that looks like, I'm seeing this:

That's interesting because this EPG configuration is a leftover from a previous configuration but the IP address is not valid anymore. I tried to clear the cache of the browser (Edge) and recreate the custom channel. That didn't help, it always repopulates the EPG part with this old and invalid IP address.

Any ideas how to avoid this?

1 Like

I've seen issues with Channels DVR leaving remnants of removed M3U sources and their channels, so I would remove it and add it again with a slightly different name, like Frndly-TV or frndlyTV. Something the devs should look into..

2 Likes

Thank you for the tip. It worked after I created it with a different name. :slightly_smiling_face:

I still get the guide issue every morning:

127.0.0.1 - - [27/May/2022 08:57:02] "GET /play/heroes___icons.m3u8 HTTP/1.1" 302 -
Failed to download: https://i.mjh.nz/frndly_tv/app.json
127.0.0.1 - - [27/May/2022 09:49:00] "GET /playlist.m3u8 HTTP/1.1" 200 -
No gracenote id found in epg map for: 31
No gracenote id found in epg map for: 44
No gracenote id found in epg map for: 33
No gracenote id found in epg map for: 1
No gracenote id found in epg map for: 2
No gracenote id found in epg map for: 15
...

I have to keep restarting it manually every time.
There are no other issues with my network and server at that time.

I take it that's the output from the python?
I never looked at the docker container log since everything works.
Here's my docker container log from yesterday

2022-05-26 03:03:55	stderr	172.18.0.1 - - [26/May/2022 03:03:55] "GET / HTTP/1.1" 200 -
2022-05-26 03:03:55	stderr	172.18.0.1 - - [26/May/2022 03:03:55] "GET /favicon.ico HTTP/1.1" 404 -
2022-05-26 16:56:00	stdout	401
2022-05-26 16:56:00	stdout	Unauthorized access
2022-05-26 16:56:00	stdout	logging in....
2022-05-26 16:56:01	stdout	Logged in!
2022-05-26 16:56:03	stderr	192.168.1.3 - - [26/May/2022 16:56:03] "GET /playlist.m3u8?start_chno=9001 HTTP/1.1" 200 -
2022-05-26 16:56:03	stdout	No gracenote id found in epg map for: 38
2022-05-26 16:56:03	stdout	No gracenote id found in epg map for: 16
2022-05-26 23:58:00	stdout	401
2022-05-26 23:58:00	stdout	Unauthorized access
2022-05-26 23:58:00	stdout	logging in....
2022-05-26 23:58:01	stdout	Logged in!
2022-05-26 23:58:02	stdout	channel/live/heroes___icons > https://sr-live2-frndly.akamaized.net/....
2022-05-26 23:58:02	stderr	192.168.1.3 - - [26/May/2022 23:58:02] "GET /play/heroes___icons.m3u8 HTTP/1.1" 302 -

Did you take my tip?

I've had 16 days of guide data since I set it up

Yes, I did take your tip and left the EPG field blank. This is what it looks like right now when I open the settings:

My log when I restarted the Python server earlier:

C:\Users\mjitk\frndlytv-for-channels>C:\Users\mjitk\AppData\Local\Programs\Python\Python310\python app.py --PORT 8183 --USERNAME "(hidden)" --PASSWORD "(hidden)"
Starting server on port 8183
logging in....
Logged in!
127.0.0.1 - - [27/May/2022 19:22:34] "GET /playlist.m3u8 HTTP/1.1" 200 -
No gracenote id found in epg map for: 38
No gracenote id found in epg map for: 16

That's all on the screen right now, it's just running, waiting for activity from Channels.
It's always in the morning when the first recording is scheduled that it fails to download the json file. After that, guide data is lost.

Hmmm.
Are you using his latest python script version?

Supposed to be the same as the latest docker container I'm running.

I downloaded the script 3 days ago. I don't see any version numbers in the code so I'm not sure which version it is. Here are the file attributes:

Screenshot 2022-05-27 211606

So it looks like it was last updated on 2/18/2022.

Commits

Thanks. I will try to update it.

10 minutes later...

OK, I cloned the latest code and I can see a difference in file sizes so I should have the latest code now.
Server restarted and running. I will keep an eye on it.

Thanks for your support, @chDVRuser ! :smiley:

1 Like

Again, this morning:

Failed to download: https://i.mjh.nz/frndly_tv/app.json
127.0.0.1 - - [28/May/2022 09:47:01] "GET /playlist.m3u8 HTTP/1.1" 200 -
No gracenote id found in epg map for: 31
No gracenote id found in epg map for: 44
No gracenote id found in epg map for: 33
No gracenote id found in epg map for: 1
No gracenote id found in epg map for: 2
No gracenote id found in epg map for: 15
No gracenote id found in epg map for: 38
...

I don't know why it fails to download it. I just checked the link manually now and I'm able to see the file.

I'm going to save the json file to my computer and then modify the code on my computer so that it uses the local copy of the json file instead of trying to download it.
This json file won't change until Frndly TV modifies the channel lineup so it's safe to keep it constant for now.

Strange.
I see you had guide problems using Docker previously (which uses the same code).
Maybe something with the user account running the python code, or a firewall, ad blocker or dns causing it to fail getting the json file.

Probably the python code should ignore the failure instead of wiping out the old mappings.

I suspect cloudflare protection may cause some of these types of intermittent errors.

cc @matthuisman

Wonder if @mjitkop has something else in his setup hitting that domain besides the daily morning guide update. Mine has been working fine and hasn't triggered any cloudflare protection.
Maybe the cloudflare server he's hitting is getting too many requests for that domain?
According to https://www.nslookup.io/ I'm using the San Francisco, CA servers.

Strange behavior when selecting channel on Frndly. The channel will timeout without loading. If you then change channels on Frndly it will load correctly. Then you can go back to the channel that would not load and it will then stream. Log entry below:

2022/05/30 06:52:18.344227 [ERR] Could not start stream for M3U-Frndly ch9033 MeTV: M3U: Could not fetch playlist: 192.168.1.16:8183 (Timeout): Get "http://192.168.1.16:8183/play/me_tv.m3u8": net/http: timeout awaiting response headers

That issue is discussed under the big ole Frndly TV for Channels topic. Frndly TV for Channels - #217 by Absenm. That link goes to where I brought it up. I don’t think we ever came up with a solution, but there are some ideas on how to deal with it.

I have seen this happen in different circumstances, but it might be related to your situation: a sleeping hard drive. If the device hosting your container/playlist is set to allow its hard drives to sleep/spin down, there is a chance that the drive is taking too long to spin up and serve the requested resource. That is why the initial request fails with a timeout, and subsequent requests succeed: the hard drive is now awake and can respond within the allowed timeframe.

You can:

  1. live with requiring a second request to get your resource,
  2. disable the sleep/spin down of your drives, or
  3. switch to SSDs, which don't have this issue.

You could check your frndlyTV for Channels log and see what it says for those times.

My docker logs things using UTC time and my server is UTC -0700.
Here's an example of a recording started on MeTV.

DVR log

2022/05/28 19:58:03.173734 [TNR] Opened connection to M3U-frndlyTV for ch9002 MeTV
2022/05/28 19:58:03.174150 [DVR] Recording for job 1653793080-8 from M3U-frndlyTV ch9002 into "TV/Star Trek/Star Trek S01E14 1966-12-15 Balance of Terror 2022-05-28-1958.mpg" for 1h3m59.998280954s

Had been long enough without activity when the recording started that it had to login to frndlyTV.
So in this case it took 2 seconds to login before the stream started.

frndlyTV container log

2022-05-29 02:58:00	stdout	401
2022-05-29 02:58:00	stdout	Unauthorized access
2022-05-29 02:58:00	stdout	logging in....
2022-05-29 02:58:02	stdout	Logged in!
2022-05-29 02:58:02	stdout	channel/live/me_tv > https://sr-live2-frndly.akamaized.net/...
2022-05-29 02:58:02	stderr	192.168.1.3 - - [29/May/2022 02:58:02] "GET /play/me_tv.m3u8 HTTP/1.1" 302 -

Drives are solid state. Power savings is off. Tried disabling firewalls. Reloaded M3U. Still seeing issue. When it works it looks as follows (edited)

`Channel/live/me_tv > https://sr-live2-frndly.akamaized.net/v1/master/....

172.17.0.1 - - [31/May/2022 16:09:58] "GET /play/me_tv.m3u8 HTTP/1.1" 302 -

The last line is missing (stream) when it fails.

It looks like it just needs a second or two before timing out.

Perhaps Matt will see this.

I'm still meaning to take a look at keeping access tokens up to date in the background. I've just been swamped with work and haven't had time yet. I still plan to see if that helps any.