If you’re an over-the-air TV enthusiast, you’re well aware of the current transition from ATSC 1.0 to 3.0.
3.0 adds support for things like HEVC video encoding, 4k video, and a host of consumer tracking options that has caused advertisers and broadcasters alike to salivate at the thought of a new revenue stream.
The ATSC 3.0 rollout has been a bit of a disaster thanks to half-baked (incomplete) DRM specifications, but that’s a topic that’s been well-documented and discussed elsewhere. Today’s post is all about working around one of ATSC 3.0’s biggest shortcomings.
Plex and ATSC 3.0
For better or worse, Plex has become the de facto standard for rolling your own over-the-air DVR without ongoing monthly fees. Paired with an HDHomeRun device, it’s a pretty slick system.
Grab an HDHomeRun from my Amazon affiliate link!
ATSC 3.0 has standardized on using Dolby AC-4 for its audio streams, and four years after the first permanent ATSC 3.0 station came online, Plex still doesn’t support AC-4. They’ve been trying since 2021 to license the AC-4 codec from Dolby and – three years later – have not been successful.
What did Emby do?
Plex competitor Emby managed to hack together a build of ffmpeg that includes support for decoding AC-4 audio. Nobody’s really sure how they were able to do this, but we can benefit from the fruits of their labor!
The Workaround
The workaround is to install and use hdhr-ac4. Once installed on your network, it will show up as a second, virtual HDHomeRun tuner which will use Emby’s custom ffmpeg binary to seamlessly transcode audio from Dolby AC-4 to AC-3. (AC-3 is supported on nearly every modern streaming platform.)
You’ll tell Plex to use this second virtual/fake tuner only for ATSC 3.0 stations, while your 1.0 stations will continue to be served by your original tuner. 1.0 and 3.0 stations will appear right alongside each other seamlessly in the Plex guide.
Setup Walkthrough
If you’re comfortable building Docker packages, you can probably stop reading now. Otherwise, here’s the step-by-step:
Install Docker if you haven’t already:
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker $(whoami)
exit
Pull down the hdhr-ac4 repo:
git clone https://github.com/johnb-7/hdhr-ac4
Find the latest Emby release (.deb) for your hardware over here, then grab it:
cd hdhr-ac4
wget -O emby.deb https://<latest emby server>.deb
Modify hdhr-ac4/Dockerfile
and change the Emby filename to ’emby.deb’.
Now build the container:
docker build -f Dockerfile -t hdhr-ac4 .
Great. The container’s been built, placed where it needs to be, and you can clean up the mess:
rm -rf hdhr-ac4
Now create (or add to) docker-compose.yml
:
version: "3.8"
services:
HDHomeRunAC4:
image: "hdhr-ac4"
restart: unless-stopped
ports:
- "80:80"
- "5004:5004"
environment:
- HDHR_IP=192.168.1.110
- HOST_IP=192.168.1.101
- DEVICEID_SWAP=1
Make sure to set HDHR_IP
to the IP of your HDHomeRun, and HOST_IP
to the IP of the device running hdhr-ac4.
Now get it running:
docker compose up -d
You should now be able to reach it on port 80 in a browser. Note that its device ID is that of your actual HDHomeRun, but reversed so that it appears as a unique device.
Configure Plex
Now in Plex you’ll need to hit the wrench icon to open up your settings, then navigate to “Manage / Live TV & DVR”. Click the “xxx enabled” link for your existing HDHomeRun tuner.
Remove Duplicate Stations
You’ll want to un-check the checkboxes for any stations that are dual-broadcasting ATSC 1.0/3.0 in your area. HDHomeRun adds 100 to the channel numbers of any ATSC 3.0 stations. If you see a channel 5.1 and 105.1 detected, for example, you’ll want to un-check 5.1. Save your changes.
Add hdhr-ac4 Tuner and Stations
Click Plex’s “+ Add Another Device” button. It will search your network and find your ‘new’ virtual HDHomeRun device. Add it, give it your zip code, all of that.
This new tuner should only show ATSC 3.0 stations.
Click to enable any of the stations that are in the 100 range. Map them in the drop-down to their short-number equivalents. In other words, for channel “105.1”, select “5.1” in the dropdown.
Save your changes and…you’re done!
You should now see no visible change to your Plex program guide – however the stations you’ve just configured will now stream their 3.0 counterparts to all your Plex clients with audio!
What’s the Downside?
Well there are two problems here.
The first problem is that this will absolutely mangle closed captions when streamed through Plex. They’re still there, but they’re now transformed into a random and infrequent jumble of characters. When watching these exact same streams through VLC, captions will work correctly.
The second problem only affects Roku users. There is a well-known, well-documented, 4-year-old bug in Roku OS that throws a heavily saturated red overlay over one specific type of video. And that one type of video is – you guessed it – HEVC video with AC-3 audio. There is no workaround for this, and Roku has no idea how to fix it.
DRM Woes
None of this will help you view or listen to ATSC 3.0 stations that have been encrypted with digital rights management. Those stations show up as “Protected” in Plex. You still can’t watch these stations with an HDHomeRun.
SiliconDust has been working for years with A3SA (the ATSC 3.0 Security Authority) to figure out a way to enable this functionality.
Despite the ATSC alliance announcing they’ve made things easier for HDHomeRun users back in February, the HDHomeRun folks claim that it was all smoke and mirrors and nothing has changed.
They’ve made it clear that A3SA is the blocker here, dragging their feet and not releasing critical information needed for client playback on anything that isn’t an Android device.
All Done!
At the rate things are going, Plex is probably a few years away from being able to support ATSC 3.0 natively, so this is a decent workaround until that day comes. Enjoy!
Thanks for this! I’ll be following it soon.
However I have been trying to ditch amazon and go to roku (or Shields when I get the money). It seems the roku issue is eac-3, is it possible to make the emby conversion go to ac-3 and not eac-3 to combat this?
You might be on to something.
Before you build the Docker container, edit line 75 of hd_home_run.py.
Change the codec from ac3 to anything that your client devices support. So flac, opus, whatever.
Subtitles, video, and audio are separate streams embedded within the main stream so the audio codec shouldn’t impact subtitle playback, but as we’ve seen Roku’s video player can be wildly unpredictable.
If you end up doing this, please come back and post your findings!