Sign inSign up

sound4/x1

By sound4

•Updated 3 months ago

SOUND4 x1.CL processing

Image
0

3.2K

sound4/x1 repository overview

This is the SOUND4 x1.CL⁠ processing.

It needs a SOUND4 license to work.

You can provide audio with RTP, and get it back with RTP.

It embeds a web server for setting up the processing.

⁠Usage

You need to define the following environment variables:

  • S4_AWS_ACCESS_KEY_ID : SOUND4 license AccessKeyID
  • S4_AWS_SECRET_ACCESS_KEY : SOUND4 license AccessKeySecret
  • RADIO_NAME : SOUND4 license RadioName
  • S4LOGINKEY : SOUND4 license LoginKey

⁠Storage

The process needs a storage mounted to /usr/share/sound4proc to save its state and presets.

⁠Parameters

The following variables are optional:

  • RTP_SRC_PORT : the port of the audio, which you send to this container (default: 5004)
  • RTP_DEST_IP : where to send the processed audio. If 0 send back to the sender (default: 0)
  • RTP_DEST_PORT: the port to which you want to send the processed audio (default: 5004)
  • RTP_SAMPLE_FORMAT : the audio sample format (S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE, F32_LE, F32_BE) (default: S16_BE)
  • RTP_PAYLOAD : the RTP payload type
  • RTP_FRAMES : the number of frames per RTP packet. 0 to send as many as received (default: 0)

If you want to setup authentication for user interface access, you have two solutions :

  1. Creating a setup account
    The setup account can create an administrator.
    The setup account always keeps the access and can delete the administrator.

    • SETUP_USER : create the setup user
    • SETUP_SECRET : the setup user's password.
      If not given, it will be randomly generated and print in logs
  2. Creating an admin account
    The administrator will be the sole administrator.

    • ADMIN_USER : create the admin user
    • ADMIN_SECRET : the admin user's password.
      If not given, it will be randomly generated and print in logs

Once the storage is created, you can not change those.

⁠Kubernetes Leader Election

When running inside a Kubernetes cluster, you can put an instance on hold while the main one is running.

  • LEADERELECTION_LEASENAME : lease name
  • LEADERELECTION_NAMESPACE : lease namespace
  • Optional:
    • LEADERELECTION_IFACE_IP : define ID with this interface IP instead of hostname
    • LEADERELECTION_WAITFORCREATE : block before creating instance instead of after (do not use license while waiting)
    • LEADERELECTION_LEASEDURATION : lease duration
    • LEADERELECTION_RENEWDEADLINE : lease renew deadline
    • LEADERELECTION_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).

⁠Example Docker-compose.yml

version: '3.4'
services:
  process:
    image: sound4/x1:${IMAGE_VERSION:-latest}
    restart: unless-stopped
    ports:
     - "${RTP_SRC_PORT:-5004}:${RTP_SRC_PORT:-5004}/udp"
     - "${HTTP_PORT:-80}:80"
    volumes:
     - state:/usr/share/sound4proc
    command: [
        "/usr/local/bin/sound4.x1.cloud-proc"
        # You can get the full command line options by running the program with -h

        # For Kantar, disable usage of offline licenses in cloud solutions
        , "-a", "KANTAR_OfflineLicense=0"
        # , "-a", "KANTAR_LicPath=/usr/share/sound4lic"
        # For Kantar, you may force KANTAR_Login, KANTAR_Password, KANTAR_LicenseName and KANTAR_ChannelName
        # For stream, known metadata parsers
        , "-a", "Metadata_provided_path=/usr/local/share/sound4/SOUND4 Stream.CL Metaparsers"
        # For stream, if you want no metadata management in UI, set to 1
        , "-a", "Metadata_no_ui=0"
    ]
    environment:
      # IDs for the licence SOUND4 gave you
      - S4LOGINKEY=${S4LOGINKEY}
      - RADIO_NAME=${RADIO_NAME}
      - S4_AWS_ACCESS_KEY_ID=${S4_AWS_ACCESS_KEY_ID}
      - S4_AWS_SECRET_ACCESS_KEY=${S4_AWS_SECRET_ACCESS_KEY}
      # RTP/UDP listening specific IP (use for broadcast) or Livewire channel in
      # use 0 to receive directly RTP (no Livewire)
      - RTP_SRC_IP=${RTP_SRC_IP:-0}
      - RTP_SRC_PORT=${RTP_SRC_PORT:-5004}
      # Send back to this IP or Livewire channel
      - RTP_DEST_IP=${RTP_DEST_IP}
      - RTP_DEST_PORT=${RTP_DEST_PORT:-5004}
      # verbose level: -v is 1, -vv is 2...
      - PROC_VERB=${PROC_VERB:--vv}
      # Choose sample format in S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE, F32_LE, F32_BE
      - RTP_SAMPLE_FORMAT=${RTP_SAMPLE_FORMAT:-S16_BE}
      # receive/send RTP payload. NOTE: payload 97 allows to receive payload 96 or 97, to ease compatibility.
      - RTP_PAYLOAD=${RTP_PAYLOAD:-97}
      # Audio frames Per Output Packet (default: same as received)
      - RTP_FRAMES=${RTP_FRAMES}
      # Setup/Admin user for web interface: only on storage creation
      - SETUP_USER=${SETUP_USER:-}
      - SETUP_SECRET=${SETUP_SECRET:-}
      - ADMIN_USER=${ADMIN_USER:-}
      - ADMIN_SECRET=${ADMIN_SECRET:-}
volumes:
  state:

Tag summary

Content type

Image

Digest

sha256:cade52999…

Size

74.5 MB

Last updated

3 months ago

docker pull sound4/x1