Each .CL library offers some command-line programs.
They can be used to provide input/output audio to the processing library.
Each tool support -h
parameter to get help.
sound4.any.cl-proc
This is the generic processor, which can be used for RTP or raw audio.
It is the preferred way to use it in a container (see Cloud Containerization).
Some parameters can be passed via environment variable. In this case, the help shows those variable.
License
You need to provide license information to the instance.
u
loginkey
: User ID for License (default from envS4LOGINKEY
)n
radioname
: Radioname for License (default from envRADIO_NAME)
- env only
S4_AWS_ACCESS_KEY_ID
: the license key ID - env only
S4_AWS_SECRET_ACCESS_KEY
: the license key secret
Web interface
Start a web browser to setup this instance.
Parameters:
w
http_port
: port to listen for HTTP (current:0)s
https_port
: port to listen for HTTPS (current:0)
HTTPS needs a certificate, which information is in env variables:
SSL_CERTIFICATE_PATH
: the certificateSSL_PRIVATE_PATH
: the certificate private key
Storage
The instance needs to have a storage directory to save its state and its presets.
Parameters:
D
storepath
: Storage path (default:STATE_DIR
)
You can have multiple instances using the same storage folder, so they can share their presets.
But in this case, you should give each a different statename, so each has its own settings and onair preset.
N
statename
: Storage state filename, if sharing storepath between instances
Also, if you want instances to follow the onair preset, you can set them the same onairname : changing preset on one instance will change for all at the same time.
O
onairname
: Storage onair filename, if sharing storepath between instances
See also Cloud Process Configuration Storage
Special storage information :
R
: Storage is read-onlyS
: Storage state is read-only
Audio I/O
Parameters:
i
ip|lwr
: Livewire channel in or UDP listening specific IP (use for broadcast) (defaultRTP_SRC_IP
)p
port
: UDP listening port (default:RTP_SRC_PORT
=5000)I
dstip|lwr
: Livewire channel out or Send back to this IP if zero (defaultRTP_DEST_IP
=0.0.0.0)P
dstport
: Send back to this port (default:RTP_DEST_PORT
=5004)B
ip
: IP to bind for input. Uses source IP if not given (defaultRTP_BIND_IP
=0.0.0.0)G
ip
: IP to bind for output (default:RTP_OUT_BIND_IP
=0.0.0.0)t
pt
: Rcv/Send Payload Type (default:RTP_PAYLOAD
=96). NOTE: payload 97 allows receiving payload 96 or 97, to ease compatibilityF
format
: Sample format (default:RTP_SAMPLE_FORMAT
=S16_BE) (S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE, F32_LE, F32_BE)f
frames
: Frames Per Output Packet. Same as input if zero (default:RTP_FRAMES
=0)c
channels
: Channels in RTP stream (default:RTP_CHANNELS
=2)r
: RAW mode, get audio from stdin in float32 native 48000Hz stereo, send it to stdout.
RTP Input/Output
Example: process locally received audio on port 5004, send the processed to 10.3.1.25 port 5004
sound4.impact.cl-proc -i 127.0.0.1 -p 5004 -I 10.3.1.25 -P 5004 -F S16_BE -w 8080
AES67 Input/Output
Example: receive from 239.4.27.1, send to 239.4.83.1
sound4.impact.cl-proc -i 239.4.27.1 -p 5004 -I 239.4.83.1 -P 5004 -F S24_BE -w 8080
Note: there is no advertising
Livewire Input/Output
Example: receive from channel 1001, send to 2001
sound4.impact.cl-proc -i 1001 -I 2001 -w 8080
Note: there is no advertising
Raw audio
This uses stdin and stdout for audio, so you can use another program to provide and to play audio.
Example: process RTP stream received on port 5000 and play it
ffmpeg -i rtp://127.0.0.1:5000 -ar 48000 -ac 2 -f f32le - | sound4.impact.cl-proc -r -w 8080 | ffplay -f f32le -ar 48000 -ac 2 -i -
For this sample, audio can be sent with ffmpeg -re -i myfile.mp3 -map a:0 -acodec libmp3lame -f rtp udp://127.0.0.1:5000
Advanced parameters
a
key=value
: Add parameterm
key=value
: Add metadata
For parameters and metadata, see libraries documentation.
Kubernetes Leader Election
Linux only, with environment variables:
LEADERELECTION_LEASENAME
: lease nameLEADERELECTION_NAMESPACE
: lease namespace- Optional:
LEADERELECTION_IFACE_IP
: define ID with this interface IP instead of hostnameLEADERELECTION_WAITFORCREATE
: block before creating instance instead of afterLEADERELECTION_LEASEDURATION
: lease durationLEADERELECTION_RENEWDEADLINE
: lease renew deadlineLEADERELECTION_RETRYPERIOD
: lease retry period
When both LEADERELECTION_LEASENAME
and LEADERELECTION_NAMESPACE
are set and working, only one pod will process.
Duration are Go duration strings, like 3s, 100ms, ...
The pod needs access to apiGroups 'coordination.k8s.io' resources 'leases' for 'get', 'update', 'list' (and 'create' if not pre-created).
Advanced access
j
json_port
: port for TCP JSON (default:PROC_PORT
=0)
This starts a server for the Cloud JSON Protocol. It can be used to have a separate interface web server
Warning: there is no authentication protection on this socket, even if the web interface has some set up.
Web access authentication
Details are in the process library documentation.
If the storage is not yet initialized, you can choose how to protect the web access.
There are 2 modes:
- Setup mode: you define a setup account, which can then create an administrator account. The setup account always keeps the access and can delete the administrator.
- Admin mode: you define the administrator, which will be the single administrator.
To select the mode, you have to put in the parameters
- SETUP_USER (and optionally SETUP_SECRET) to select Setup mode
- ADMIN_USER (and optionally ADMIN_SECRET) to select Admin mode
- none: the web access is opened, no login will be asked
If you do not set the xxx_SECRET, then the setup password will be randomly generated and print in logs (at info severity).
sound4.any.cl-server
Separate interface web server, which can be used if you want a different container for processing and interface.
i
process_ip
: IP address of the process to connect to (envPROC_IP
)p
process_port
: port of the process to connect to (envPROC_PORT
)
For other parameters, see Web interface :
w
http_port
: port to listen for HTTP (envHTTP_PORT
)s
https_port
: port to listen for HTTPS (envHTTPS_PORT
)
sound4.any.cl-jack
Linux JACK Audio Connection Kit support.
Parameters :
C
jack_name
: JACK client nameS
jack_session
: JACK session name
See also Web interface, Storage and Advanced access.
sound4.any.cl-pipewire
Linux PipeWire support.
Parameters :
C
name
: client name