Plex & Locast: Recording Local TV Without the Antenna

Home ServerMedia CenterSelf HostedSmart Home

Written by:

Update: Locast has ceased operations. Old post archived here:

I have been a long time Plex user for years. Alongside my extensive movie collection, I also like to keep up on the local news and occasionally watch some sports or TV special. Previously I had successfully used a TV tuner with Plex, but after moving to a new home that got terrible reception, I had to look for other solutions. Thankfully, here in the US, Locast allows you to get local OTA TV over the internet. Here’s how to get it into Plex.

THE PROBLEM

The way I had solved this previously was buying a HDHomeRun TV tuner and a basic antenna. Setting that up with Plex could not be more simple: Simple plug in an antenna and plug the tuner into your network, Plex auto-discovers it and populates the TV Guide.

But after moving to a dead spot in OTA reception, this wouldn’t work. And I know I’m not the only one with this problem – many people live in apartments where they can’t mount an antenna, or live too far from a broadcast source to reliably pick up a signal.

THE SOLUTION

Locast is a non-profit whose mission is to modernize and digitize public broadcast TV in the United States. They do this currently in 22 markets – mostly large cities – and it is funded by a $5/monthly donation if you want to stream or watch for more than 15 minutes at a time. I think this is a service well worth supporting. In my market, that $5/month donation gets me 47 channels, including the local NPR affiliate, enough sports for my casual fan vibe, and every major local news network in HD.

Locast does not integrate with Plex directly. To get Locast streams into Plex requires another piece of software – locast2plex. This proxies the Locast stream and emulates a hardware TV tuner – just like connecting that physical HDHomeRun box I previously had.

RELATED >>  Big List of Useful Home Automation Nodes for Node-Red

SETTING IT UP

First off, sign up for a Locast account, select a market, and set up a monthly donation. A free account on Locast won’t work with locast2plex.

In my home server, everything runs in Docker. And conveniently, locast2plex comes as an easy to deploy Docker container as well.

Here’s my Docker Compose config:

version: '2'
services:
  locast2plex:
    image: tgorg/locast2plex
    container_name: locast2plex
    ports:
      - "6077:6077"
      - "1900:1900/udp"
    restart: unless-stopped
    environment:
      - username=example@domain.com
      - 'password=XXXXX'
      - external_addy=192.168.0.X
      - external_port=6077
      - debug=yes

Fairly straight forward: the username and password are your Locast credentials. I ran into trouble with Docker parsing my password correctly because of special characters, and including the whole line in single quotes solved it.

The external address is the LAN IP address of your server machine.

COMBINING WITH PLEX

In your Plex server settings, you will need to go to the “Manage” section and look in “Live TV & DVR”. Here, add a new device.

Plex Settings: Add DVR Tuner

Auto-discover didn’t work for me – I had to give it the IP and port manually. Then it connected and showed up as a regular DVR and my guide information began downloading:

Awesome!

CONCLUSIONS

This has been working great for me for the past month. If you’re not able to set up a physical OTA antenna & tuner, Locast provides a great, reliable service for getting local content into your Plex server.

If you’re not in a market covered by Locast, or would prefer not to pay a monthly fee, the equipment I used previously for use with Plex was:

56 Replies to “Plex & Locast: Recording Local TV Without the Antenna”

  1. Wiko says:

    Works great, Thanks!

  2. Matt says:

    Are you able to schedule and record using the PLEX DVR functionality using Locast?

  3. Bob says:

    Thanks Brad, I have a very similar situation and have been looking for a solution to wean us off of Dish TV. I’ll try implementing your solution and repost here with results.

  4. Mike S says:

    “In my home server, everything runs in Docker.”
    Are you running Plex in Docker as well? Or is it running outside of it?
    I don’t currently use Docker and have Plex running on a stand alone Win 10 machine. I am wondering if I install Docker, configure and run locast2plex with my current Plex configuration see it.
    Thanks for the article – brought Locast to my attention!

    • brad says:

      Plex communicates with locast2plex over the network, so as long as they can talk to each other you can run them however you want.

  5. Chris says:

    Thanks for this! I have been having problems recently getting certain OTA channels. I had looked into Locast previously, but did not think the cost of their DVR was worth it. Knowing Plex can handle it changes the equation enough for me to try it!

  6. Akore says:

    How about in other countries? I live in Jardin Colombia and would like to get my local channels with out having to setup an antenna. It would be nice if all these great services that are only available in the USA would become available to the rest of the world.

    • brad says:

      I am not sure of any digital broadcasts for Colombia, but I would begin by searching for “IPTV” and see if you can find a service that digitizes your region.

  7. Ric says:

    Hi there,
    I am currently running Plex with an antenna and local live TV. Can I add Locast as an additional DVR device and use both my local TV DVR and the Locast DVR? If I can do that can I add several Locast cities as several Plex DVR’s and use like a national TV network? I use Roku on my TV to view Plex and am curious how I would tell Roku to use additional Plex DVRs.
    Thanks,
    Ric

    • brad says:

      I think one Locast account is tied to one region, I am not sure if they are attempting to restrict that by geolocation. It may be possible to just open multiple accounts

      As far as your question a helpful commenter on Reddit pointed out this tool which allows multiple DVR/IPTV sources to be combined into one for Plex. I have not tried this yet but you can take a look at the project page: https://github.com/xteve-project/xTeVe

      I am thinking my next step is I will combine Locast with an additional IPTV service using this tool. If I do so I will make another post 🙂

  8. Ren says:

    YOU JUST MADE MY DAY!!!!!

    been looking for a solution like this for a long time – I too am unable to use a tuner and antenna as I get no reception – only option was to pay my ISP for the internet tv package – unfortunately it ends up being nearly 40$ month for basic channels not cool. This looks promising and since I am a huge Plex fan early adopter and docker user (my plex server runs as a docker container) this should be perfect! thank you !!

  9. Nathaniel says:

    Along with bad reception…I have bad internet. If I wanted to DVR an episode over locast would it just show a lot of buffering? Thanks

  10. […] Posted on August 17, 2020 by Angel Plex & Locast: Recording Local TV Without the Antenna […]

  11. Damian says:

    Brad – this is awesome! Same boat as you, just moved and lost capability to use an outdoor antenna. I don’t pull much from OTA, but what I do are VHF channels and can’t for the life of me get an antenna that will pull in those channels. I have an Unraid server and I was able to spin up a docker container with the variables you specified in your dockerfile, connected my Plex instance to it and BOOM. Live TV. Now I can clean up these coax cables and throw this antenna in storage!

  12. Derrick Hilton says:

    So is there a limit to the number of streams? I was assuming I could configure it to switch to my antenna after I hit a limit, but it just keeps adding recording streams.

    • Derrick Hilton says:

      Nevermind, I figured it out, 3 streams from Locast, then 2 from my HDhomerunDUO. I’ll take that. Nice program. Im using Unraid Docker and just set up a new container with tgorg/locast2plex in the repository field, and put everything else into the extra parameters: -e username=xxxxxx@gmail.com -e password=xxxxx -e external_addy=(your unraid server IP) -p 6077:6077 -p 1900:1900/udp Just remember to add your data where the x are located.

      • Mahkelon Morris says:

        I’ve tried adding the loast2plex container via portainer and also the method you described. My Plex and emby instance can’t find thelocast to plex docker. Can you assist?

  13. Lance says:

    Oh man! I JUST purchased a HDHomeRun for my Plex Server only to set this up today. Guess it’s going back on OfferUp. Thanks Brad!

  14. Jim Ryan says:

    Nice job on the instructions! Quick and nearly painless! Worked with Emby as well so you might want to update your article. I did run into the port 1900 in use issue which was corrected by removing the “1900:1900/udp” stanza in the docker-compose.yml file as suggested the project git repository. external_addy rather than external_addr is not a typo as I had thought :-). In my opinion, the Plex and Emby interfaces with record, rewind, pause, etc are a tremendous upgrade to the Locast interface.

    • Brandon says:

      Great tip. I had this problem too and deleting that fixed the issue.

      Now I can not figure out why I can not see the channels fromn “Live TV” when viewing from clients. All I see is the free streaming TV channels you can get from Plex. It works if I use the Plex browser my laptop.

  15. Matt Engel says:

    This is awesome! I can’t wait to try this!

    So I’m not in a region that locast services… However, I use a VPN on my Plex server.

    Has anyone encountered an issue of being outside of a region using this process?

    I haven’t had much luck setting the vpn to a region and getting locast to work through a browser… However, I can use the chrome extension Change Geolocation to trick the browser into streaming the channels.

    Any tips from anyone?

    Thanks in advance!

  16. […] post Plex & Locast: Recording Local TV Without the Antenna appeared first on DIY […]

  17. Rick says:

    Ran docker compose and its not working, Anyone else having an issue getting it to start? I keep getting the same error below and it keeps restarting.

    Locast2Plex v0.5.0

    Tuner count set to 3

    No UUID found. Generating one now…

    Traceback (most recent call last):

    File “/app/main.py”, line 331, in

    config_handler.set(‘main’, ‘uuid’, DEVICE_UUID)

    File “/usr/lib/python2.7/ConfigParser.py”, line 396, in set

    Locast2Plex v0.5.0

    Tuner count set to 3

    No UUID found. Generating one now…

    raise NoSectionError(section)

    ConfigParser.NoSectionError: No section: ‘main’

    • highmarker says:

      Have you put your username and pwd in the config.ini (or for me in the environment settings in the docker container) ? I was getting the same error before I did that. Got past that part but still can’t get plex to see the tuner.

  18. Fidel M says:

    Can someone be kind enough to do a guide
    Steps to add.
    Thanks in advamced, im a newbie and would love to do this

  19. […] But I still didn’t have DVR access. Then I found a clever little program someone wrote called locast2plex. The idea being that it mimics an HDHomeRun tuner and allows Plex to record from Locast. Perfect. Rather than reinvent the wheel, I’ll link you to someone who already has a writeup on this process. […]

  20. Mike says:

    First of all, thank you for this guide! I think I got everything set up correctly, but I can’t actually get Plex to play any of the content. I run Plex server on an older Mac Mini and used the Python script (I couldn’t figure out how to use Docker).

    I got Locast added to the DVR and the guide shows up. When I click to watch something it gives me an error “Could not tune channel. Please check your tuner or antenna.”. I can see stuff happening in the Terminal window and there’s a reference to “FileNotFoundError: [Errno 2] No such file or directory: ‘ffmpeg'”.

    I’m in a little over my head but it seems like I’m so close! Can anyone help me with this?

  21. Mike says:

    I actually got it working a couple of days ago by installing ffmpeg. Couldn’t figure out how to install it so I used Homebrew. It works pretty well now. Thank you for this tutorial!

  22. Sean Smith says:

    I installed on my plex server(windows) and when I launch command line I get “Error in function login: Bad Request” and it exits. Any ideas?

  23. Aaron says:

    Author states he got a pre C&D letter. im guessing its probably from silicon dust since he is using software from another project that emulates the hdhomerun. I hope that whatever he comes up with continues to be simple like this. I had issues getting a standard iptv provider setup like this. I have an actual hdhomerun but now live somewhere that the signal is weak and this was just the thing i was looking for

  24. MARK J PELLETIER says:

    Hello:

    Which “external_addy” for I be using. Running this from my headless Win10 Plex server, behind a VPN. Port 6077 should be fine as-is.

    I’ve dinked with the config.ini and docker-compose.yml file without any luck (Plex cannot see, no listener seems available via: netstat -an |find /i “listening”):

    When I run Plex Server web UI, I see: 127.0.0.1
    My Public Address (whatsmyIP) looks like: 216.151.xxx.xx (VPN on), 173.195.xx.xx (VPN off)

    Tried the methods you described:

    a) docker-compose up

    b) docker run -v c:\users\markp\desktop\locast2plex\config.ini -p 6077:6077 -p 1900:1900/udp tgorg/locast2plex

    c) python main.py

    Any breadcrumbs to offer to help me along the path? I’m most the way there, I think. I have a locast subscription, working with channels dvr.

    Thanks!

  25. MARK J PELLETIER says:

    Locast2Plex was working great just yesterday. Today LocastService.py is kicking an error from “urlError”. Nothing in my config has changed. Locast login info is confirmed valid and is being passed to main.py as expected.

    Suggestions?

  26. Neal says:

    Thanks! This is very very cool! I am going to give it try and see if I can get it working. It is the last peice I need to disconnect from comcast TV.

  27. Runciter says:

    This is fantastic in a pinch. Has anyone gotten TVE working with Plex? That is one thing from holding me back from using Plex DVR vs Channels DVR. One niggle with using/recording Locast streams vs OTA, at least for me, Locast (as well as TVE sources) only does 2 channel audio vs multichannel (programming specific) for OTA.

  28. David Ciaglia says:

    This is cool! I donated to Localcast.

    Do you require a HD Homerun, or can you just stream? I sold mine too recently. 🙁
    Docker container started up for me,

    locast2plex_1 | User didDonate: True
    locast2plex_1 | User donationExpire: XXXXXXXXXXXXX
    locast2plex_1 | Getting user location…
    locast2plex_1 | Getting location via IP Address.
    locast2plex_1 | Got external IP b’XXXXXXXX’.
    locast2plex_1 | Got location as XXXXXXXXXXXXXXXXXXX
    locast2plex_1 | Getting list of stations based on DMA…
    locast2plex_1 | Loading FCC Stations list…
    locast2plex_1 | Starting device server on XXXXXXXXXXXXXX
    locast2plex_1 | Starting SSDP server…
    locast2plex_1 | Locast2Plex is active and listening…

    Configured Plex, downloaded guide. Looks good, but when I click on channel I get:
    Could not tune channel. Please check your tuner or antenna

    Can anyone offer any assistance?

    Thanks!

  29. Tony says:

    I thought I could do this but I do not understand Dockors I guess and can’t get it to work for me.

  30. Lorne says:

    Great Job Brad- this is awesome. I’ve been frustrated by poor reception on my HDHomerun- so trying to get this to work. I run plex on my synology NAS, and installed Docker and locast2plex on separate Ubuntu machine. After a couple hrs (and lots of google) I learned enough about docker to believe I got it installed properly… had to turn off my VPN…think its right. BUT my plex system can’t find it! Not even when I manually enter the ipaddress 192.168.x.x:6077 . I feel like locast2plex can’t access the network…or something. Any ideas? (also- you should totally do a youtube vid on this…you’d get a bajillion views).

  31. Neal Noble says:

    Thanks! works for me. It does require above average technical skills to setup up, but once setup an average person can use the Plex UI.

  32. Graham says:

    Got it set up and showing the guide in Plex but every time I try to play something Plex errors out.

  33. Graham says:

    Actually interestingly it only errors out when using the web interface to Plex server. If I connect from Plex client on my phone it is working. The server is on a Synology Diskstation.

  34. Steve says:

    Hi Brad! I too am a long time Plex Pass member however, a little more of a novice when it comes to computers… I am usually and eventually able to figure things out but this Docker has me a little complexioned… I have down loaded correctly and pull tgorg/locast2plex from Docker hub but when I try to run it… I get “Config file missing, Exiting” message… Any ideas where I could get a little help? Thanks, Steve

  35. James says:

    Can this be run on a Synology NAS drive?

    I have a Synology DS918 and have Plex Media Server running on it.

    The NAS drive has the ability to run Docker as well.

    Any help would be greatly appreciated.

    Thanks

  36. […] Plex & Locast: Recording Local TV Without the Antenna […]

  37. […] and I get my main 4 channels in HD. The great thing is I also use Plex at home and there’s a way to DVR the Locast broadcast TV into Plex. So there you have it. Now I’ll save $25 a month for the […]

  38. Scott says:

    Thanks for the post! I was curious how you have your DVR recording and transcoding settings configured. I am getting a little jitter when I play back the Locast recordings, so just wanted to see if anyone out there had any advice on their setups for this.

  39. jason wirtz says:

    would you advise me how to do locast and plex so that I can DVR local channels thanks

  40. Joel R says:

    Anyone looking at this as an OTA DVR option needs to know that Locast is not longer operational. They were sued by major broadcast networks for copywrite infringement and were forced to cease operations on August 31, 2021.

  41. umen dom says:

    this is great. now will test recordin in wireless HDD

Leave a Reply

Your email address will not be published. Required fields are marked *