GitHub automated builds for liveswitch-connect.
773
The LiveSwitch Connect CLI lets you send and receive media to and from LiveSwitch.
Use dotnet publish to create a single, self-contained file for a specific platform/architecture:
dotnet publish src/FM.LiveSwitch.Connect -r win-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true -o win
dotnet publish src/FM.LiveSwitch.Connect -r osx-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true -o osx
dotnet publish src/FM.LiveSwitch.Connect -r linux-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true -o linux
Alternatively, use dotnet build to create a platform-agnostic bundle (the .NET Core runtime must be installed):
dotnet build
Using this approach will generate a library instead of an executable. Use dotnet lsconnect.dll instead of lsconnect to run it.
Images are also hosted on DockerHub.
docker run --rm frozenmountain/liveswitch-connect [verb] [options]
Environment variables can be used in place of command-line arguments.
Environment variable names are lsconnect_{verb}_{option}, e.g. lsconnect_play_gateway-url.
Environment variable names are case-insensitive, so lsconnect_play_application-id is equivalent to LSCONNECT_PLAY_APPLICATION-ID.
Note that command-line arguments always take precedence over environment variables.
lsconnect [verb] [options]
shell Starts an interactive shell.
capture Captures local media from a named pipe.
ffcapture Captures local media from FFmpeg.
ndicapture Captures media from an ndi stream.
fake Sends media from a fake source.
play Sends media from a local file.
render Renders remote media to a named pipe.
ffrender Renders remote media to FFmpeg.
ndirender Renders remote media to an ndi stream.
log Logs remote media to stdout.
record Records remote media to a local file.
intercept Forwards packets for lawful intercept.
ndifind Find available NDI devices.
The shell verb starts an interactive shell that lets you monitor clients and connections in a LiveSwitch Server.
--gateway-url Required. The gateway URL.
--application-id Required. The application ID.
--shared-secret Required. The shared secret for the application ID.
--log-level (Default: Error) The LiveSwitch log level.
Once the shell is active:
register Registers a client.
exit Exits the shell.
After you register:
unregister Unregisters the client.
join Joins a channel.
exit Exits the shell.
After you join a channel (e.g. join my-channel-id):
leave Leaves the channel.
clients Prints remote client details to stdout.
connections Prints remote connection details to stdout.
exit Exits the shell.
The clients verb has additional options:
--ids Print IDs only.
--listen Listen for join/leave events. (Press Q to stop.)
The connections verb has additional options as well:
--ids Print IDs only.
--listen Listen for open/close events. (Press Q to stop.)
The capture verb lets you capture local media from a named pipe and send it to a LiveSwitch server.
--audio-pipe The named pipe for audio.
--video-pipe The named pipe for video.
--server Use a named pipe server.
--audio-clock-rate (Default: 48000) The audio clock rate in Hz. Must be
a multiple of 8000. Minimum value is 8000. Maximum
value is 48000.
--audio-channel-count (Default: 2) The audio channel count. Minimum value
is 1. Maximum value is 2.
--audio-frame-duration (Default: 20) The audio frame duration in
milliseconds. Minimum value is 5. Maximum value is
100.
--video-format (Default: Bgr) The video format.
--video-width The video width.
--video-height The video height.
--media-id The local media ID.
--audio-bitrate The audio bitrate in kbps.
--video-bitrate The video bitrate in kbps.
--video-frame-rate The video frame-rate, if known, for signalling.
--channel-id Required. The channel ID.
--data-channel-label The data channel label.
--region The local region.
--user-id The local user ID.
--user-alias The local user alias.
--device-id The local device ID.
--device-alias The local device alias.
--client-tag The local client tag.
--client-roles The local client roles.
--connection-tag The local connection tag.
--no-audio Do not process audio.
--no-video Do not process video.
--audio-codec (Default: Any) The audio codec to negotiate with
LiveSwitch.
--video-codec (Default: Any) The video codec to negotiate with
LiveSwitch.
--gateway-url Required. The gateway URL.
--application-id Required. The application ID.
--shared-secret Required. The shared secret for the application ID.
--log-level (Default: Error) The LiveSwitch log level.
The ffcapture verb lets you capture local media from FFmpeg and send it to a LiveSwitch server.
--input-args Required. The FFmpeg input arguments.
--audio-mode (Default: LSEncode) Where audio is encoded.
--video-mode (Default: LSEncode) Where video is encoded.
--audio-encoding The audio encoding of the input stream, if different
from audio-codec. Enables transcoding if audio-mode is
noencode or ffencode.
--video-encoding The video encoding of the input stream, if different
from video-codec. Enables transcoding if video-mode is
noencode or ffencode.
--keyframe-interval (Default: 60) The keyframe interval for video, in
frames. Only used if video-mode is ffencode.
--media-id The local media ID.
--audio-bitrate The audio bitrate in kbps.
--video-bitrate The video bitrate in kbps.
--video-width The video width, if known, for signalling.
--video-height The video height, if known, for signalling.
--video-frame-rate The video frame-rate, if known, for signalling.
--channel-id Required. The channel ID.
--data-channel-label The data channel label.
--region The local region.
--user-id The local user ID.
--user-alias The local user alias.
--device-id The local device ID.
--device-alias The local device alias.
--client-tag The local client tag.
--client-roles The local client roles.
--connection-tag The local connection tag.
--no-audio Do not process audio.
--no-video Do not process video.
--audio-codec (Default: Any) The audio codec to negotiate with
LiveSwitch.
--video-codec (Default: Any) The video codec to negotiate with
LiveSwitch.
--gateway-url Required. The gateway URL.
--application-id Required. The application ID.
--shared-secret Required. The shared secret for the application ID.
--log-level (Default: Error) The LiveSwitch log level.
The ndifind verb prints a list of the discoverable NDI® devices on the network.
The ndicapture verb lets you capture media from an NDI® device and send it to a LiveSwitch server.
--stream-name Required. Name of the NDI stream to capture.
--audio-clock-rate (Default: 48000) The audio clock rate in Hz. Minimum
value is 8000. Maximum value is 48000.
--audio-channel-count (Default: 2) The audio channel count. Minimum value
is 1. Maximum value is 4.
--video-format (Default: Bgra) The video format. (rgb, bgr, rgba,
bgra)
--video-width (Default: 1920) The video width.
--video-height (Default: 1080) The video height.
--media-id The local media ID.
--audio-bitrate The audio bitrate in kbps.
--video-bitrate The video bitrate in kbps.
--video-frame-rate The video frame-rate, if known, for signalling.
--channel-id Required. The channel ID.
--data-channel-label The data channel label.
--region The local region.
--user-id The local user ID.
--user-alias The local user alias.
--device-id The local device ID.
--device-alias The local device alias.
--client-tag The local client tag.
--client-roles The local client roles.
--connection-tag The local connection tag.
--no-audio Do not process audio.
--no-video Do not process video.
--audio-codec (Default: Any) The audio codec to negotiate with
LiveSwitch.
--video-codec (Default: Any) The video codec to negotiate with
LiveSwitch.
--gateway-url Required. The gateway URL.
--application-id Required. The application ID.
--shared-secret Required. The shared secret for the application ID.
--log-level (Default: Error) The LiveSwitch log level.
The fake verb lets you generate fake media and send it to a LiveSwitch server. Audio is generated as a continuous tone following the argument provided. Video is generated as a sequence of solid-fill images that rotate through the colour wheel.
--audio-clock-rate (Default: 48000) The audio clock rate in Hz. Must be
a multiple of 8000. Minimum value is 8000. Maximum
value is 96000.
--audio-channel-count (Default: 2) The audio channel count. Minimum value
is 1. Maximum value is 2.
--audio-frequency (Default: 440) The audio frequency in Hz. Minimum
value is 20. Maximum value is 20000.
--audio-amplitude (Default: 16383) The audio amplitude. Minimum value
is 1. Maximum value is 32767.
--video-format (Default: Bgr) The video format.
--video-width (Default: 640) The video width. Must be a multiple of
2.
--video-height (Default: 480) The video height. Must be a multiple
of 2.
--video-frame-rate (Default: 30) The video frame rate. Minimum value is
1. Maximum value is 120.
--media-id The local media ID.
--audio-bitrate The audio bitrate in kbps.
--video-bitrate The video bitrate in kbps.
--channel-id Required. The channel ID.
--data-channel-label The data channel label.
--region The local region.
--user-id The local user ID.
--user-alias The local user alias.
--device-id The local device ID.
--device-alias The local device alias.
--client-tag The local client tag.
--client-roles The local client roles.
--connection-tag The local connection tag.
--no-audio Do not process audio.
--no-video Do not process video.
--audio-codec (Default: Any) The audio codec to negotiate with
LiveSwitch.
--video-codec (Default: Any) The video codec to negotiate with
LiveSwitch.
--gateway-url Required. The gateway URL.
--application-id Required. The application ID.
--shared-secret Required. The shared secret for the application ID.
--log-level (Default: Error) The LiveSwitch log level.
The play verb lets you capture media from a local file (or pair of files) and send it to a LiveSwitch server. Note that this is specifically for files that have been recorded in the recording format of lsconnect or LiveSwitch itself. To stream arbitrary media, use ffcapture. For details, see Stream from an arbitrary mp4 file below.
--audio-path The audio file path.
--video-path The video file path.
--media-id The local media ID.
--audio-bitrate The audio bitrate in kbps.
--video-bitrate The video bitrate in kbps.
--video-width The video width, if known, for signalling.
--video-height The video height, if known, for signalling.
--video-frame-rate The video frame-rate, if known, for signalling.
--channel-id Required. The channel ID.
--data-channel-label The data channel label.
--region The local region.
--user-id The local user ID.
--user-alias The local user alias.
--device-id The local device ID.
--device-alias The local device alias.
--client-tag The local client tag.
--client-roles The local client roles.
--connection-tag The local connection tag.
--no-audio Do not process audio.
--no-video Do not process video.
--audio-codec (Default: Any) The audio codec to negotiate with
LiveSwitch.
--video-codec (Default: Any) The video codec to negotiate with
LiveSwitch.
--gateway-url Required. The gateway URL.
--application-id Required. The application ID.
--shared-secret Required. The shared secret for the application ID.
--log-level (Default: Error) The LiveSwitch log level.
The render verb lets you render remote media from a LiveSwitch server to a named pipe.
--audio-pipe The named pipe for audio.
--video-pipe The named pipe for video.
--client Use a named pipe client.
--audio-clock-rate (Default: 48000) The audio clock rate in Hz. Must be
a multiple of 8000. Minimum value is 8000. Maximum
value is 48000.
--audio-channel-count (Default: 2) The audio channel count. Minimum value
is 1. Maximum value is 2.
--audio-frame-duration (Default: 20) The audio frame duration in
milliseconds. Minimum value is 5. Maximum value is
100.
--video-format (Default: Bgr) The video format.
--video-width The video width.
--video-height The video height.
--media-id The remote media ID.
--connection-id The remote connection ID or 'mcu'.
--audio-bitrate The audio bitrate in kbps.
--video-bitrate The video bitrate in kbps.
--channel-id Required. The channel ID.
--data-channel-label The data channel label.
--region The local region.
--user-id The local user ID.
--user-alias The local user alias.
--device-id The local device ID.
--device-alias The local device alias.
--client-tag The local client tag.
--client-roles The local client roles.
--connection-tag The local connection tag.
--no-audio Do not process audio.
--no-video Do not process video.
--audio-codec (Default: Any) The audio codec to negotiate with
LiveSwitch.
--video-codec (Default: Any) The video codec to negotiate with
LiveSwitch.
--gateway-url Required. The gateway URL.
--application-id Required. The application ID.
--shared-secret Required. The shared secret for the application ID.
--log-level (Default: Error) The LiveSwitch log level.
The ffrender verb lets you render remote media from a LiveSwitch server to FFmpeg.
--output-args Required. The FFmpeg output arguments.
--audio-mode (Default: LSDecode) Where audio is decoded.
--video-mode (Default: LSDecode) Where video is decoded.
--audio-encoding The audio encoding of the output stream, if different
from audio-codec. Enables transcoding if audio-mode is
nodecode or ffdecode.
--video-encoding The video encoding of the output stream, if different
from video-codec. Enables transcoding if video-mode is
nodecode or ffdecode.
--keyframe-interval (Default: 60) The keyframe interval for video, in
frames. Only used if video-mode is nodecode.
--video-frame-rate The video frame rate in frames per second, if known.
Only used if video-mode is nodecode.
--media-id The remote media ID.
--connection-id The remote connection ID or 'mcu'.
--audio-bitrate The audio bitrate in kbps.
--video-bitrate The video bitrate in kbps.
--channel-id Required. The channel ID.
--data-channel-label The data channel label.
--region The local region.
--user-id The local user ID.
--user-alias The local user alias.
--device-id The local device ID.
--device-alias The local device alias.
--client-tag The local client tag.
--client-roles The local client roles.
--connection-tag The local connection tag.
--no-audio Do not process audio.
--no-video Do not process video.
--audio-codec (Default: Any) The audio codec to negotiate with
LiveSwitch.
--video-codec (Default: Any) The video codec to negotiate with
LiveSwitch.
--gateway-url Required. The gateway URL.
--application-id Required. The application ID.
--shared-secret Required. The shared secret for the application ID.
--log-level (Default: Error) The LiveSwitch log level.
The ndirender verb lets you render remote media from a LiveSwitch server to NDI®.
--stream-name (Default: LiveswitchConnect) Name of the NDI
stream
--audio-clock-rate (Default: 48000) The audio clock rate in Hz. Must
be a multiple of 8000. Minimum value is 8000.
Maximum value is 48000.
--audio-channel-count (Default: 2) The audio channel count. Minimum
value is 1. Maximum value is 2.
--audio-frame-duration (Default: 20) The audio frame duration in
milliseconds. Minimum value is 5. Maximum value is
100.
--video-format (Default: I420) The video format. Currently only
I420 is supported.
--video-width (Default: 1920) The video width.
--video-height (Default: 1080) The video height.
--frame-rate-numerator (Default: 30000) The frame rate numerator
--frame-rate-denominator (Default: 1000) The frame rate denominator
--media-id The remote media ID.
--connection-id The remote connection ID or 'mcu'.
--audio-bitrate The audio bitrate in kbps.
--video-bitrate The video bitrate in kbps.
--channel-id Required. The channel ID.
--data-channel-label The data channel label.
--region The local region.
--user-id The local user ID.
--user-alias The local user alias.
--device-id The local device ID.
--device-alias The local device alias.
--client-tag The local client tag.
--client-roles The local client roles.
--connection-tag The local connection tag.
--no-audio Do not process audio.
--no-video Do not process video.
--audio-codec (Default: Any) The audio codec to negotiate with
LiveSwitch.
--video-codec (Default: Any) The video codec to negotiate with
LiveSwitch.
--gateway-url Required. The gateway URL.
--application-id Required. The application ID.
--shared-secret Required. The shared secret for the application
ID.
--log-level (Default: Error) The LiveSwitch log level.
The log verb lets you log remote media frame details from a LiveSwitch server to standard output (stdout).
--audio-log (Default: audio: {duration}ms
{encoding}/{clockRate}/{channelCount} frame received
({footprint} bytes) for SSRC {synchronizationSource}
and timestamp {timestamp}) The audio log template.
Uses curly-brace syntax. Valid variables: footprint,
duration, clockRate, channelCount, mediaStreamId,
rtpStreamId, sequenceNumber, synchronizationSource,
systemTimestamp, timestamp, encoding, applicationId,
channelId, userId, userAlias, deviceId, deviceAlias,
clientId, clientTag, connectionId, connectionTag,
mediaId
--video-log (Default: video: {width}x{height} {encoding} frame
received ({footprint} bytes) for SSRC
{synchronizationSource} and timestamp {timestamp}) The
video log template. Uses curly-brace syntax. Valid
variables: footprint, width, height, mediaStreamId,
rtpStreamId, sequenceNumber, synchronizationSource,
systemTimestamp, timestamp, encoding, applicationId,
channelId, userId, userAlias, deviceId, deviceAlias,
clientId, clientTag, connectionId, connectionTag,
mediaId
--media-id The remote media ID.
--connection-id The remote connection ID or 'mcu'.
--audio-bitrate The audio bitrate in kbps.
--video-bitrate The video bitrate in kbps.
--channel-id Required. The channel ID.
--data-channel-label The data channel label.
--region The local region.
--user-id The local user ID.
--user-alias The local user alias.
--device-id The local device ID.
--device-alias The local device alias.
--client-tag The local client tag.
--client-roles The local client roles.
--connection-tag The local connection tag.
--no-audio Do not process audio.
--no-video Do not process video.
--audio-codec (Default: Any) The audio codec to negotiate with
LiveSwitch.
--video-codec (Default: Any) The video codec to negotiate with
Content type
Image
Digest
sha256:0a08a1a64…
Size
181.3 MB
Last updated
over 1 year ago
docker pull frozenmountain/liveswitch-connect