.TH ODR-AUDIOENC "1" "August 2023" "odr-audioenc 3.4.0" "ODR-mmbTools" .SH NAME odr-audioenc \- DAB and DAB+ audio encoder .SH SYNOPSIS odr-audioenc [OPTION...] .SH DESCRIPTION ODR\-AudioEnc is an audio encoder for both DAB and DAB+ that integrates into the ODR-mmbTools. The encoder can read from JACK, ALSA, a file source, libvlc or GStreamer and encode to an EDI and ZeroMQ output compatible with ODR\-DabMux. Several usage scenarios are outlined in the README located in /usr/share/doc/odr-audioenc. .PP The \fB\-D\fR option enables sound card clock drift compensation. A consumer sound card has a clock that is always a bit imprecise, and would drift off slowly. Drift compensation can make sure that the encoding rate is correct by inserting or deleting audio samples. It can be used for both ALSA and VLC inputs and requires a system clock synchronised using NTP. When this option is enabled, you will see U and O printed in the console. These correspond to audio underruns and overruns caused by sound card clock drift. When sparse, they should not create audible artifacts. .PP This encoder is able to insert PAD (DLS and MOT Slideshow) generated by ODR\-PadEnc, and communicates using a UNIX socket. .SH OPTIONS .TP \fB\-h\fR, \fB\-\-help\fR Print this help text and exit .TP \fB\-\-version\fR Print program version and exit .TP \fB\-D\fR, \fB\-\-drift\-comp\fR Enable ALSA/VLC sound card drift compensation. .SS alsa input: .TP \fB\-d\fR, \fB\-\-device\fR=\fI\,ALSA_DEVICE\/\fR Set ALSA input device. .SS file input: .TP \fB\-i\fR, \fB\-\-input\fR=\fI\,FILENAME\/\fR Input filename (use \fB\-i\fR \- for stdin). .TP \fB\-f\fR, \fB\-\-format=\fR{ wav, raw } Set input file format (default: wav). .TP \fB\-\-fifo\-silence\fR Input file is fifo and encoder generates silence when fifo is empty. Ignore EOF. .SS JACK input: .TP \fB\-j\fR, \fB\-\-jack\fR=\fI\,NAME\/\fR Enable JACK input, and define our name .SS VLC input: .TP \fB\-v\fR, \fB\-\-vlc\-uri\fR=\fI\,URI\/\fR Enable VLC input and use the URI given as source .TP \fB\-C\fR, \fB\-\-vlc\-cache\fR=\fI\,MS\/\fR Specify VLC network cache length. .TP \fB\-g\fR, \fB\-\-audio\-gain\fR=\fI\,DB\/\fR Apply audio gain correction in dB to source, negative values allowed. Use this as a workaround to correct the gain for streams that are much too loud. .TP \fB\-V\fR Increase the VLC verbosity by one (can be given multiple times) .TP \fB\-L\fR OPTION Give an additional options to VLC (can be given multiple times) .SS GStreamer input: .TP \fB\-G\fR, \fB\-\-gst\-uri\fR=\fI\,URI\/\fR Enable GStreamer input and use the URI given as source .SS Encoder parameters: .TP \fB\-b\fR, \fB\-\-bitrate=\fR{ 8, 16, ..., 192 } Output bitrate in kbps. Must be a multiple of 8. .TP \fB\-c\fR, \fB\-\-channels=\fR{ 1, 2 } Nb of input channels (default: 2). .TP \fB\-r\fR, \fB\-\-rate=\fR{ 24000, 32000, 48000 } Input sample rate (default: 48000). .SS DAB specific options: .TP \fB\-a\fR, \fB\-\-dab\fR Encode in DAB and not in DAB+. .TP \fB\-\-dabmode\fR=\fI\,MODE\/\fR Channel mode: s/d/j/m (default: j if stereo, m if mono). .TP \fB\-\-dabpsy\fR=\fI\,PSY\/\fR Psychoacoustic model 0/1/2/3 (default: 1). .SS DAB+ specific options: .TP \fB\-A\fR, \fB\-\-no\-afterburner\fR Disable AAC encoder quality increaser. .TP \fB\-\-aaclc\fR Force the usage of AAC\-LC (no SBR, no PS) .TP \fB\-\-sbr\fR Force the usage of SBR (HE\-AAC) .TP \fB\-\-ps\fR Force the usage of SBR and PS (HE\-AACv2) .TP \fB\-B\fR, \fB\-\-bandwidth\fR=\fI\,VALUE\/\fR Set the AAC encoder bandwidth to VALUE [Hz]. .TP \fB\-\-decode\fR=\fI\,FILE\/\fR Decode the AAC back to a wav file (loopback test). .SS Output and PAD parameters: .TP \fB\-o\fR, \fB\-\-output\fR=\fI\,URI\/\fR Output ZMQ uri. (e.g. 'tcp://localhost:9000') \fB\-or\-\fR Output file uri. (e.g. 'file.dabp') \fB\-or\-\fR a single dash '\-' to denote stdout. If more than one ZMQ output is given, the socket will be connected to all listed endpoints. .TP \fB\-k\fR, \fB\-\-secret\-key\fR=\fI\,FILE\/\fR Enable ZMQ encryption with the given secret key. .TP \fB\-e\fR, \fB\-\-edi\fR=\fI\,URI\/\fR EDI output uri, (e.g. 'tcp://localhost:7000') .TP \fB\-\-fec\fR=\fI\,FEC\/\fR Set EDI output FEC .TP \fB\-T\fR, \fB\-\-timestamp\-delay\fR=\fI\,DELAY_MS\/\fR Enabled timestamps in EDI (requires TAI clock bulletin download) and add a delay (in milliseconds) to the timestamps carried in EDI .TP \fB\-w\fR, \fB\-\-write\-icy\-text\fR=\fI\,FILENAME\/\fR Write the ICY Text into the file, so that ODR\-PadEnc can read it. .TP \fB\-W\fR, \fB\-\-write\-icy\-text\-dl\-plus\fR When writing the ICY Text into the file, add DL Plus information. .TP \fB\-\-identifier\fR=\fI\,ID\/\fR An identifier string that is sent in the ODRv EDI TAG. Max 32 characters length. .TP \fB\-\-startup\-check\fR=\fI\,SCRIPT_PATH\/\fR Before starting, run the given script, and only start if it returns 0. .TP \fB\-p\fR, \fB\-\-pad\fR=\fI\,BYTES\/\fR Enable PAD insertion and set PAD size in bytes. .TP \fB\-P\fR, \fB\-\-pad\-socket\fR=\fI\,IDENTIFIER\/\fR Use the given identifier to communicate with ODR\-PadEnc. .TP \fB\-l\fR, \fB\-\-level\fR Show peak audio level indication. .TP \fB\-S\fR, \fB\-\-stats\fR=\fI\,SOCKET_NAME\/\fR Connect to the specified UNIX Datagram socket and send statistics. This allows external tools to collect audio and drift compensation stats. .TP \fB\-s\fR, \fB\-\-silence\fR=\fI\,TIMEOUT\/\fR Abort encoding after TIMEOUT seconds of silence. .SH AUTHOR Originally written by Robin Alexander . .SH SEE ALSO odr-padenc(1), odr-dabmux(1)