Plex & Locast: Recording Local TV Without the Antenna

Home ServerMedia CenterSelf HostedSmart Home

Written by:

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.

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.

RELATED >>  Flashed CC2531 Zigbee Sticks for zigbee2mqtt Available

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:

35 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

    • brad says:

      I think Locast recommends 12Mbps internet. I have plenty of bandwidth so I’m not actually sure what happens if it buffers while recording.

  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!

Leave a Reply

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