Uses for OPUS codec in ka9q-radio?

13 views
Skip to first unread message

John Ackermann N8UR

unread,
Dec 19, 2024, 9:27:22 PM12/19/24
to ka9q-radio
I wonder if anyone has examples of using the OPUS codec in ka9q-radio.
I see various config files in /etc/radio but don't see any documentation
about applications. Would its main purpose be to reduce streaming
bandwidth? Can the monitor program input opus as well as pcm?

Thanks,
John

Phil Karn

unread,
Dec 21, 2024, 4:12:22 AM12/21/24
to ka9q-...@googlegroups.com
I threw in the Opus codec when I added support for 32-bit floating
point. I added an "encoding" setting to the channel that lets you pick
any of several encoding formats:

S16BE (the default)
S16LE
F32LE
F16LE
Opus

Opus, being a lossy codec, is useful only for voice. I've used it for a
long time to compress my FM repeater archives, but I first recorded wav
files and then ran opusenc in a cron job. That was a kludge. Now radiod
can stream Opus directly, pcmrecord can record it, and monitor can play
it. They do so automatically, by looking at the channel status data stream.

When pcmrecord records an Opus stream, it uses the Ogg container with
suffix .opus. For the PCM formats, it uses WAV, or optionally raw.

There's an 'encoding=' keyword in the config file, and the 'e' command
in 'control' also lets you select it manually.

The target bit rate can be selected with the 'bitrate=' keyword or the
'b' command in 'control'. A value of 0 means "automatic".

Opus is widely supported by lots of players.

John Ackermann N8UR

unread,
Dec 21, 2024, 9:40:38 AM12/21/24
to ka9q-...@googlegroups.com
Thanks for that, Phil. Actually, I was interested in Opus with the idea
of recording the FM bands here locally. Would you mind sharing the
scripts you have set up to do that?

In addition to recording the audio, I'm hoping to be able to extract the
amount of active time on each frequency, which I think might open the
eyes of some of the local repeater owners. :-)

Thanks,
John
----
Reply all
Reply to author
Forward
0 new messages