tgorgdotcom / locast2plex

A very simple script to connect locast to Plex's live tv/dvr feature.
MIT License
234 stars 43 forks source link

Could not tune channel. Please check your tuner or antenna. #38

Open Babyjworks opened 4 years ago

Babyjworks commented 4 years ago

I keep getting a playback error and do not see anything jumping out in the cmd output that is occurring while the show is attempting to start. I can copy the whole thing but it seems to loop the same stuff.

Exception happened during processing of request from ('192.168.1.67', 58180) Traceback (most recent call last): File "C:\python27\lib\SocketServer.py", line 293, in _handle_request_noblock self.process_request(request, client_address) File "C:\python27\lib\SocketServer.py", line 321, in process_request self.finish_request(request, client_address) File "C:\python27\lib\SocketServer.py", line 334, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\python27\lib\SocketServer.py", line 655, in init self.handle() File "C:\python27\lib\BaseHTTPServer.py", line 340, in handle self.handle_one_request() File "C:\python27\lib\BaseHTTPServer.py", line 328, in handle_one_request method() File "C:\locast\locast2plex-master\main.py", line 91, in do_GET ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE) File "C:\python27\lib\subprocess.py", line 394, in init errread, errwrite) File "C:\python27\lib\subprocess.py", line 599, in _execute_child args = list2cmdline(args) File "C:\python27\lib\subprocess.py", line 266, in list2cmdline needquote = (" " in arg) or ("\t" in arg) or not arg TypeError: argument of type 'bool' is not iterable

192.168.1.67 - - [19/Aug/2020 11:10:35] "GET /discover.json HTTP/1.0" 200 - 192.168.1.67 - - [19/Aug/2020 11:10:35] "GET /lineup_status.json HTTP/1.0" 200 - 192.168.1.67 - - [19/Aug/2020 11:10:40] "GET /discover.json HTTP/1.0" 200 - 192.168.1.67 - - [19/Aug/2020 11:10:40] "GET /lineup_status.json HTTP/1.0" 200 - Getting station info for 657?X-Plex-Token=(secret)... Error when getting the video URL: Not Found 192.168.1.67 - - [19/Aug/2020 11:10:42] "GET /watch/657?X-Plex-Token=(secret) HTTP/1.1" 200 -

Exception happened during processing of request from ('192.168.1.67', 58235) Traceback (most recent call last): File "C:\python27\lib\SocketServer.py", line 293, in _handle_request_noblock self.process_request(request, client_address) File "C:\python27\lib\SocketServer.py", line 321, in process_request self.finish_request(request, client_address) File "C:\python27\lib\SocketServer.py", line 334, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\python27\lib\SocketServer.py", line 655, in init self.handle() File "C:\python27\lib\BaseHTTPServer.py", line 340, in handle self.handle_one_request() File "C:\python27\lib\BaseHTTPServer.py", line 328, in handle_one_request method() File "C:\locast\locast2plex-master\main.py", line 91, in do_GET ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE) File "C:\python27\lib\subprocess.py", line 394, in init errread, errwrite) File "C:\python27\lib\subprocess.py", line 599, in _execute_child args = list2cmdline(args) File "C:\python27\lib\subprocess.py", line 266, in list2cmdline needquote = (" " in arg) or ("\t" in arg) or not arg TypeError: argument of type 'bool' is not iterable

192.168.1.67 - - [19/Aug/2020 11:10:46] "GET /discover.json HTTP/1.0" 200 - 192.168.1.67 - - [19/Aug/2020 11:10:46] "GET /lineup_status.json HTTP/1.0" 200 - 192.168.1.67 - - [19/Aug/2020 11:10:51] "GET /discover.json HTTP/1.0" 200 - 192.168.1.67 - - [19/Aug/2020 11:10:51] "GET /lineup_status.json HTTP/1.0" 200 - 192.168.1.67 - - [19/Aug/2020 11:10:55] "GET /discover.json HTTP/1.0" 200 - 192.168.1.67 - - [19/Aug/2020 11:10:55] "GET /lineup_status.json HTTP/1.0" 200 -

dwkane commented 4 years ago

I had the same issue. You need to install ffmpeg and set the PATH to its executable

Babyjworks commented 4 years ago

Thanks for the info. Is the Path within locast2plex? or is this an enviromental variable I am not aware of having to set.

dwkane commented 4 years ago

I meant the Windows Environment Variable. So that locast2plex can execute it from any directory.

Here is a guide: http://blog.gregzaal.com/how-to-install-ffmpeg-on-windows/

Babyjworks commented 4 years ago

Ah I see where I went wrong. I have ffmpeg on my PMS but due to geolocation limitations of Locast, I had to spin up a node to run a VPN client to be in the correct city. Node was missing ffmpeg as it was a new build... the little things...

Babyjworks commented 4 years ago

Ok I thought that was going to fix it and closed prematurely. Still getting errors even with path set.

biztastic commented 4 years ago

Having the same issue. Keeping an eye on this thread.

diana1055 commented 4 years ago

The way I have it all installed: ffmpeg in its own directory off the root, with the bin directory in the path (eg. C:\ffmpeg-4.2.2\bin) Python in its own directory in the path (eg. c;\Python27) Locast2Plex in its own directory in the path (eg. C:\locast2plex)

If you type PATH at the command prompt you can get the current path. The following should appear, usually at the end unless you move it:

C:\ffmpeg-4.2.2\bin;C:\python27;C:\locast2plex

you have to close and reopen any command prompt windows(s) when you change the PATH.

biztastic commented 4 years ago

I have the same setup, except my Locat2Plex is inside the Python/Lib. I have all three in Path and checked at the command prompt. I have restarted. I can get through setup in Plex. Still getting this message:

Device not found. Ensure your device is powered on and connected to your network.

CTJohnK commented 4 years ago

@biztastic Are you seeing this under "Live TV & DVR" in Settings? If so, I see the same thing, but Locast2Plex is working, the Guide is populated and I able to watch and record.

biztastic commented 4 years ago

image

image image image

@CTJohnK The Guide is empty, What's On is empty, and DVR Schedule is empty

I know it's running because I can delete and re-add and it always says setup complete. But I can never get it to play anything.

dwkane commented 4 years ago

instead of using 127.0.0.1, try using the actual IP of your server (use it for the addy part when running Locast2Plex also, if that wasn't clear)

biztastic commented 4 years ago

I finally got it too work. i had to use a static IP and port forwarding with my actual IP.

Babyjworks commented 4 years ago

You had to do a port forward on the LAN side or is there some port that locast uses that needs forwarded? I looked through their documentation but didn't see anything

biztastic commented 4 years ago

On the LAN side. My first attempt to use my server's IP worked faster than using 127.0.0.1, and i took that as a good sign. So i went into my router settings to allow forwarding on the two ports from the readme. Not sure if it actually did anything, but i finally got it to work, so I'm happy.

Take note of the network accessible IP address of the server install you are using to create the container. Note that the ports used are:

6077 (tcp) for the hdhomerun device emulation service (and can be changed) 1900 (udp) for SSDP discovery (which cannot be changed -- see troubleshooting for workarounds).

eqpaisley commented 3 years ago

Installed on a Ubuntu 18. Works at first but if I close my SSH connection, I get this same error. Also, once I execute main.py, there's a stream of log info about what the main.py is doing - but I can no longer interact with the command line.