wouterdebie / locast2tuner

Locast to Emby/Plex/Channels server
https://wouterdebie.github.io/locast2tuner/
MIT License
52 stars 8 forks source link

Stream failing to start #81

Closed MichelLopez closed 3 years ago

MichelLopez commented 3 years ago

Capture for bug template.txt Describe the bug The stream is failing to start

To Reproduce Using Plex the stream is failing to start when launched

Logs 2021-08-17T11:01:00.020525907Z config selected = /app/config/config 2021-08-17T11:01:00.047413388Z Aug 17 04:01:00.046 INFO locast2tuner 0.1.54 on Linux 4.19.0-17-amd64 starting.. 2021-08-17T11:01:00.047528060Z Aug 17 04:01:00.047 INFO UUID: ----***** 2021-08-17T11:01:00.047570654Z Aug 17 04:01:00.047 INFO Logging in with valid@email 2021-08-17T11:01:00.503907491Z Aug 17 04:01:00.503 INFO Login succeeded! 2021-08-17T11:01:01.281420969Z Aug 17 04:01:01.280 INFO Downloading FCC facilities 2021-08-17T11:01:03.664228667Z Aug 17 04:01:03.663 INFO Cached FCC facilities to /root/.locast2tuner/facilities 2021-08-17T11:01:05.851068420Z Aug 17 04:01:05.850 INFO Loading stations for Seattle (cache: true, cache timeout: 3600, days: 8).. 2021-08-17T11:01:05.914238396Z Aug 17 04:01:05.913 INFO Starting http server for Seattle on http://0.0.0.0:6077 2021-08-17T11:01:05.915425348Z Aug 17 04:01:05.915 INFO Starting 4 workers 2021-08-17T11:01:05.921706361Z Aug 17 04:01:05.920 INFO Starting "actix-web-service-0.0.0.0:6077" service on 0.0.0.0:6077 2021-08-17T11:01:05.921892535Z Aug 17 04:01:05.921 INFO Tuners: 2021-08-17T11:01:05.921931444Z Aug 17 04:01:05.921 INFO +---------+----------+-----+--------------------------------------+---------------------+---------------------+ 2021-08-17T11:01:05.921996646Z Aug 17 04:01:05.921 INFO | City | Zip code | DMA | UUID | Timezone | URL | 2021-08-17T11:01:05.922055674Z Aug 17 04:01:05.921 INFO +---------+----------+-----+--------------------------------------+---------------------+---------------------+ 2021-08-17T11:01:05.922113820Z Aug 17 04:01:05.921 INFO | Seattle | | 819 | f6879075-5d9f-58c7-b4aa-e06050361cfb | America/Los_Angeles | http://0.0.0.0:6077 | 2021-08-17T11:01:05.922177660Z Aug 17 04:01:05.922 INFO +---------+----------+-----+--------------------------------------+---------------------+---------------------+ 2021-08-17T11:01:05.922239621Z Aug 17 04:01:05.922 INFO locast2tuner started.. 2021-08-17T12:01:03.708228353Z Aug 17 05:01:03.707 INFO Reloading FCC facilities.. 2021-08-17T12:01:04.093742856Z Aug 17 05:01:04.093 INFO Using cached FCC facilities at /root/.locast2tuner/facilities 2021-08-17T15:01:14.968885998Z Aug 17 08:01:14.968 INFO Loading stations for Seattle (cache: true, cache timeout: 3600, days: 8).. 2021-08-17T15:03:07.229656740Z Aug 17 08:03:07.228 WARN Unable to decode media playlist, skipping a fetch.. expected #EXTM3U at the start of "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\nERROR: The request could not be satisfied\n\n

403 ERROR

\n

The request could not be satisfied.

\n<HR noshade size=\"1px\">\nThe Amazon CloudFront distribution is configured to block access from your country.\nWe can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.\n<BR clear=\"all\">\nIf you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.\n<BR clear=\"all\">\n<HR noshade size=\"1px\">\n
\nGenerated by cloudfront (CloudFront)\nRequest ID: ULpqyc44DhbiVpijUy-p_SpKKTPRDksnC-9Gapms671ZLh6eqk4_iw==\n
\n
\n
\n" 2021-08-17T15:03:07.229866974Z Aug 17 08:03:07.228 WARN No first segment found. Stopping stream.. 2021-08-17T15:03:23.954721791Z Aug 17 08:03:23.954 WARN Unable to decode media playlist, skipping a fetch.. unexpected tag: "#EXT-X-STREAM-INF:BANDWIDTH=1600000,RESOLUTION=854x480\n../variant/36gdgQ6vHwzixuzHy78KDUWtI24EBnY9EvdQAfuxtciNQ1k1ciElGnybrcynAmUOhhfDioUOXFhBO177IK93RpSaiBozwTm53SFHfzb7e7sN.m3u8" 2021-08-17T15:03:23.955120310Z Aug 17 08:03:23.954 WARN No first segment found. Stopping stream.. 2021-08-17T15:03:45.346234390Z Aug 17 08:03:45.345 WARN Unable to decode media playlist, skipping a fetch.. expected #EXTM3U at the start of "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\nERROR: The request could not be satisfied\n\n

403 ERROR

\n

The request could not be satisfied.

\n<HR noshade size=\"1px\">\nThe Amazon CloudFront distribution is configured to block access from your country.\nWe can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.\n<BR clear=\"all\">\nIf you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.\n<BR clear=\"all\">\n<HR noshade size=\"1px\">\n
\nGenerated by cloudfront (CloudFront)\nRequest ID: oSdP7SX5a0Hm4Kf1NZjai_t2kd4gDqi_lHKw9EfNLDYopVzAsTZtKg==\n
\n
\n
\n" 2021-08-17T15:03:45.346443765Z Aug 17 08:03:45.345 WARN No first segment found. Stopping stream.. 2021-08-17T16:01:05.404476934Z Aug 17 09:01:05.404 INFO Reloading FCC facilities.. 2021-08-17T16:01:05.934951148Z Aug 17 09:01:05.934 INFO Using cached FCC facilities at /root/.locast2tuner/facilities 2021-08-17T16:01:15.061449995Z Aug 17 09:01:15.061 INFO Login token expired: Mutex { is_locked: true, has_waiters: false } 2021-08-17T16:01:15.061572454Z Aug 17 09:01:15.061 INFO Logging in with valid@email 2021-08-17T16:01:15.550513084Z Aug 17 09:01:15.550 INFO Login succeeded! 2021-08-17T16:01:17.218048371Z Aug 17 09:01:17.217 INFO Loading stations for Seattle (cache: true, cache timeout: 3600, days: 8)..

Configuration Plex with both a Windows and Linux server serving multiple Apple TVs

Environment

**Docker compose file : services: locast2tuner: image: ghcr.io/wouterdebie/locast2tuner container_name: locast2tuner network_mode: bridge volumes:

**config from http://localhost:6077/config bind_address = "0.0.0.0" cache_directory = "/root/.locast2tuner" cache_timeout = 3600 days = 8 device_firmware = "hdhomerun3_atsc" device_model = "HDHR3-US" device_version = "20170612" disable_station_cache = false multiplex = false no_tvc_guide_station = false password = "***" port = 6077 quiet = false remap = false rust_backtrace = false syslog = false tuner_count = 3 username = "valid@email" verbose = 0

Additional context Have been able to verify that this is not a network or Locast issue as at the exact same time when it is failing with Plex on an Apple TV, it is playing ok using the Locast Apple TV app on another Apple TV.

wouterdebie commented 3 years ago

Look at the error: The Amazon CloudFront distribution is configured to block access from your country. It seems like you're using locast2tuner from outside of the US and unfortunately the Cloudfront storage that locast.org is using is configured to not accept requests from where you're located. Unfortunately there's not much we can do here, except for using a VPN.

I didn't know that this was the case, but I'll add it to the documentation.