.CL Command-line tools
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.
Contents
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
Special storage information :
-R
: Storage is read-only-S
: 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)-F 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 (default: same as received)-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 parameter-m key=value
: Add metadata
For parameters and metadata, see libraries documentation.
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
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
JACK Audio Connection Kit support.
Parameters :
-C jack_name
: JACK client name-S jack_session
: JACK session name
See also Web interface, Storage and Advanced access.