Random Quote Board

ATSC Transmissions with Gnu Radio

Gary Schafer, May 2025

ATSC, for whatever reason, interested me recently. It's not the first time. This time, however, I want to be able to both transmit and receive digital video.

Gnu Radio has the ability to both receive and transmit ATSC signals. (NOTE: As of this writing, most ATSC signals are version 1.0; some stations are starting to switch to version 3.0, which is also called "NextGen TV". This post will only look at version 1.0. It is the only version that Gnu Radio can currently handle.) I tried the receiver on some local signals. I even achieved some success. I really wanted to know how it handled signals in pristine condition. That meant making them myself. The problem is the lack of information on how to make the transmitter work.

Gnu Radio has a page that shows you how to make an ATSC Version 1 signal. Unfortunately, the flowgraph uses a file source that has the filename "advatsc.ts". Where does that file come from?

I figured it out. Making an ATSC signal is a two (or three) step process, depending on what you want to do with the signal.

  1. Convert the MP4 video to a MPEG2 transport stream (TS) using ffmpeg.
  2. Convert the TS to ATSC Ver 1 using Gnu Radio Companion. At this point, you have a pristine ATSC Ver 1 signal that you can use to test the ATSC receive blocks.
  3. Transmit ATSC to television. I've tested this with both a HackRF One and a Ettus Research B200-mini. It worked fine for both.

Tools Needed for Recreating ATSC Video

To recreate a ATSC video signal, aside from the need of a computer (or other processor), I used the following:

Converting MP4 Video to a Transport Stream

ATSC works not on a video signal, but a transport stream based on the MPEG2 standard. That's the ".ts" in the file source from the Gnu Radio Companion wiki page on ATSC. Think of a transport stream as a stream of digital data that consists of video, audio and other data. It most likely is even multiple video, audio and data streams put together into one, huuuuuuge stream. The first step is to take a video file and convert it to the appropriate transport stream.

I opened a terminal and navigated to the folder containing my MP4 file. I used the following "ffmpeg" command to create the transport stream file:

ffmpeg -i cornell-chimes.mp4 -c:v mpeg2video -b:v 3000k -acodec ac3 -b:a 768k -ar 48k -ac 2 -muxrate 19392658 -f mpegts cornell-chimes.ts

where:

Converting TS File to an ATSC Signal

I used the following Gnu Radio Companion flowgraph to convert the TS file to an ATSC signal. NOTE: The flowgraph is using two "Rational Resampler" blocks because I'm trying to get a final sample rate of 10 MHz. Given that, it's possible to both create the ATSC signal and transmit it at the same time, but in my experience, this requires a beefy computer. Even then, there's no guarantee that you will not experience a fair number of underflows. Let me explain it another way. I'm using an Intel, 13th generation, i9 processor, and I still got a fair number of underflows when running the flowgraph while transmitting at the end rather than saving to a file.

Gnu Radio Companion flowgraph showing a set of blocks to convert a TS file to a ATSC signal. The result is stored in a file.
Gnu Radio Companion flowgraph to convert a TS file into an ATSC signal. The input file is the TS file created using ffmpeg. The file source is set so that it is not repeated (Repeat: No). The output is an IQ file of the ATSC signal. There's no hardware-based throttle ("Throttle" block, connected SDR, "Audio Sink" block) as the point is to make the file as fast as possible. Afterwards, the file will be used to feed a SDR for transmission. WARNING: The resulting file will be HUGE! For the just-slightly-less than 3 minute video encoded at 3 Mbits/sec, the file wound up being 13.8 GB in size.
Spectrum of ATSC signal.
Spectrum of the generated ATSC signal when running the flowgraph. The spectral line near the lower frequency edge of the signal is the pilot tone. This is what a perfect ATSC signal should look like.
Spectral display of live ATSC signal.
This is a live ATSC signal. Note how the spectral amplitude is lower on the lower edge of the signal than on the higher end. This is partly due to the antenna, and partly due to the propagation. An actual receiver needs to account for this using some type of equalization. Even then, it's not guaranteed that the equalization circuit will be able to successfully recover the signal. NOTE: I captured this spectral snapshot before the digital television signals were forced out of the 600 MHz band. This frequency (617 MHz) is now used by cellular companies.

Using Gnu Radio to Receive the Stored ATSC Signal

This gave me my "perfect" ATSC signal, which I can then use to test the ATSC receive block in Gnu Radio. I created a basic flowgraph sending the ATSC samples directly into the "ATSC Receive Pipeline" block. The output is the transport stream. I used a UDP sink block to stream the transport stream to VLC.

Once the flowgraph was running, I opened VLC, set the network stream parameters, and hit "Play". The result is shown below.

A Gnu Radio flowgraph showing a file source, throttle, ATSC receive pipelie and UDP sink.
Gnu Radio flowgraph that sends the ATSC samples directly into the "ATSC Receive Pipeline" block. This block incorporates all of the necessary processing to demodulate and decode an ATSC version 1 signal. The output is sent to the UDP sink, which will provide the connection for VLC to stream and display the video signal.
Screenshot showing the settings for a network stream for the program VLC.
Settings page for the network stream for VLC (Media -> Open Network Stream). The syntax for the stream (since I'm using the loopback address) is "udp://@:1234". After this, press "Play" to start the stream.
Screenshot of a video playing on VLC.
Screenshot showing the video playing on VLC using a network stream.

Using Gnu Radio to Transmit a Live ATSC Signal

For my second test, I transmitted the ATSC signal from my Ettus Research B200-mini to a television. NOTE: I used a cable to direct connect so as not to run afoul of any FCC regulations. The results were just as you would expect.

Gnu Radio flowgraph used to transmit an ATSC signal to my television.
Gnu Radio flowgraph sending the ATSC IQ samples to a B200-mini.
A topview of a small software defined radio a few centimeters per side and connected to a USB cable on the left and a coaxial cable on the right.
I used this Ettus Research B200-mini to transmit the ATSC signal to my television. Note the F-to-BNC adapter (along with several, other adapters to allow me to connect to the SMA on the B200-mini).

I set the center frequency of the B200-mini to 63 MHz, which in the USA is the center frequency for channel 3. The television I used (an older Toshiba) allows for direct tuning to an ATSC signal for channel 3 by entering "3-1" using the remote control.

Using Gnu Radio to Receive a Live ATSC Signal

Once I had a better idea of recovering ATSC signals, I went back and re-looked at recovering, live, over-the-air ATSC signals. It turns out that the Gnu Radio receive block needs two things to recover live ATSC signals. These are:

  1. A strong ATSC signal. Anything close to the noise floor will most likely be unrecoverable.
  2. A flat spectrum. A major problem with ATSC is the fact that it, like many wideband signals, suffers from frequency-selective fading. As I was watching an OTA station (WETA near Washington, DC), I saw the video signal have the occasional drop-out. It correlated with the wind outside. As the wind picked up, the station would drop-out. The signal would recover when the wind faded.

It also turns out that the Gnu Radio flowgraph to recover ATSC is much simpler than I first thought. When I typically tune signals using Gnu Radio, I'll add a filter to get rid of everything except for the signal I want. No need to do that with ATSC. The "ATSC Receive Pipeline" block has the filtering needed.

Gnu Radio flowgraph showing blocks needed to recover an over-the-air ATSC signal.
Gnu Radio flowgraph for demodulating and decoding an over-the-air ATSC signal. The output of the SDR (the B200-mini, in this case) is input directly to the "ATSC Receiver Pipeline" block. It provides all of the signalling necessary to recover the data stream.
Spectrum of ATSC signal.
This is how the spectrum of one of the few ATSC signals I was able to recover. Note the strength (amplitude of the signal compared with the noise level), as well as that the spectrum of the ATSC signal is fairly flat. Both of these things appear necessary to recover ATSC signals with Gnu Radio.
Screenshot from live TV showing a man standing in front of a desk.
This is a screenshot taken with VLC from a recording of a live, OTA ATSC signal. VLC is actually decoding the entire stream, and this particular RF channel contains 5 different video feeds.

Summary

ATSC version 1 does provide some advantages over the older (now mostly-defunct) analog video transmissions. The images can have better resolution and fidelity, and each carrier can carry multiple video feeds simultaneously. Recording the direct feed, however, can require a lot of storage. As I stated previously, the ATSC signal consists of a net data stream of roughly 19.393 Mbits/sec. That's 2.424 MB/sec. A 30 minute recording would provide a 4.36 GB file.

I hope this helps you to look more into Gnu Radio and ATSC signals. Til next time!

Here's a Random Fact...