ODR-AUDIOENC(1)

πŸ’– ODR-AUDIOENC πŸ’–

okay bestie, welcome to the ODR-mmbTools corner of the manual β€” this is odr-audioenc, the DAB and DAB+ audio encoder, and honestly? she's iconic. let's get into it ✨


🌸 NAME 🌸

odr-audioenc β€” a DAB and DAB+ audio encoder. yes, both. she does both. periodt. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

odr-audioenc [OPTION...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so ODR-AudioEnc is an audio encoder for both DAB and DAB+ and she slots right into the ODR-mmbTools ecosystem. she can read from JACK, ALSA, a file source, libvlc or GStreamer, and then encode to an EDI and ZeroMQ output that's compatible with ODR-DabMux. there's a whole bunch of usage scenarios laid out in the README, which lives at /usr/share/doc/odr-audioenc. go read it, i'll wait 🫢

now. the -D option turns on sound card clock drift compensation, and this one is lowkey important. a consumer sound card's clock is always a lil bit imprecise (not her fault, she's doing her best 😭) and would slowly drift off. drift compensation makes sure the encoding rate stays correct by inserting or deleting audio samples. it works for both ALSA and VLC inputs, and it needs a system clock that's synchronised using NTP. when you enable it, you'll see U and O printed in the console β€” those are audio underruns and overruns caused by that sound card clock drift. when they're sparse, they shouldn't create audible artifacts. no cap.

this encoder can also insert PAD (that's DLS and MOT Slideshow) generated by ODR-PadEnc, and they talk to each other over a UNIX socket. bestie behaviour fr fr. πŸ’–


✨ OPTIONS ✨

  • -h, --help β€” print this help text and dip out
  • --version β€” print the program version and dip out
  • -D, --drift-comp β€” turn on ALSA/VLC sound card drift compensation

🎧 alsa input:

  • -d, --device=ALSA_DEVICE β€” set the ALSA input device

πŸ“ file input:

  • -i, --input=FILENAME β€” the input filename (and yes, use -i - for stdin, she's flexible like that)
  • -f, --format={ wav, raw } β€” set the input file format (default: wav)
  • --fifo-silence β€” the input file is a fifo, and the encoder generates silence when the fifo is empty. ignores EOF.

πŸŽ›οΈ JACK input:

  • -j, --jack=NAME β€” enable JACK input, and define our name

🎬 VLC input:

  • -v, --vlc-uri=URI β€” enable VLC input and use the URI given as the source
  • -C, --vlc-cache=MS β€” specify the VLC network cache length
  • -g, --audio-gain=DB β€” apply audio gain correction in dB to the source, negative values allowed. use this as a workaround to correct the gain for streams that are much too loud πŸ‘€
  • -V β€” bump the VLC verbosity up by one (can be given multiple times, go off)
  • -L OPTION β€” give an additional option to VLC (can be given multiple times)

🌈 GStreamer input:

  • -G, --gst-uri=URI β€” enable GStreamer input and use the URI given as the source

πŸ”₯ Encoder parameters:

  • -b, --bitrate={ 8, 16, ..., 192 } β€” output bitrate in kbps. must be a multiple of 8. no exceptions bestie.
  • -c, --channels={ 1, 2 } β€” number of input channels (default: 2)
  • -r, --rate={ 24000, 32000, 48000 } β€” input sample rate (default: 48000)

πŸ‘‘ DAB specific options:

  • -a, --dab β€” encode in DAB and not in DAB+
  • --dabmode=MODE β€” channel mode: s/d/j/m (default: j if stereo, m if mono)
  • --dabpsy=PSY β€” psychoacoustic model 0/1/2/3 (default: 1)

πŸ’œ DAB+ specific options:

  • -A, --no-afterburner β€” disable the AAC encoder quality increaser
  • --aaclc β€” force the usage of AAC-LC (no SBR, no PS)
  • --sbr β€” force the usage of SBR (HE-AAC)
  • --ps β€” force the usage of SBR and PS (HE-AACv2)
  • -B, --bandwidth=VALUE β€” set the AAC encoder bandwidth to VALUE [Hz]
  • --decode=FILE β€” decode the AAC back to a wav file (loopback test)

πŸ“‘ Output and PAD parameters:

  • -o, --output=URI β€” output ZMQ uri (e.g. 'tcp://localhost:9000') -or- output file uri (e.g. 'file.dabp') -or- a single dash '-' to denote stdout. if more than one ZMQ output is given, the socket will be connected to all listed endpoints.
  • -k, --secret-key=FILE β€” enable ZMQ encryption with the given secret key
  • -e, --edi=URI β€” EDI output uri (e.g. 'tcp://localhost:7000')
  • --fec=FEC β€” set EDI output FEC
  • -T, --timestamp-delay=DELAY_MS β€” enables timestamps in EDI (requires TAI clock bulletin download) and adds a delay (in milliseconds) to the timestamps carried in EDI
  • -w, --write-icy-text=FILENAME β€” write the ICY Text into the file, so that ODR-PadEnc can read it
  • -W, --write-icy-text-dl-plus β€” when writing the ICY Text into the file, add DL Plus information
  • --identifier=ID β€” an identifier string that is sent in the ODRv EDI TAG. max 32 characters length.
  • --startup-check=SCRIPT_PATH β€” before starting, run the given script, and only start if it returns 0
  • -p, --pad=BYTES β€” enable PAD insertion and set the PAD size in bytes
  • -P, --pad-socket=IDENTIFIER β€” use the given identifier to communicate with ODR-PadEnc
  • -l, --level β€” show peak audio level indication
  • -S, --stats=SOCKET_NAME β€” connect to the specified UNIX Datagram socket and send statistics. this lets external tools collect audio and drift compensation stats.
  • -s, --silence=TIMEOUT β€” abort encoding after TIMEOUT seconds of silence

🫢 AUTHOR 🫢

originally written by Robin Alexander <robin.alexander@netplus.ch>. king behaviour honestly πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page bestie!! this was odr-audioenc version 3.6.0, from December 2024 β€” go forth and encode something gorgeous, ily, bye!! πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from