Skip to main content

SDI to Vindral

This example encodes an SDI source into a full rendition ladder and publishes it to Vindral Live using the vindral_ws WebSocket sink.

Set the DeckLink device name to your input and replace YOUR_VINDRAL_PUBLISH_URL with your channel's publish URL, https://lb.cdn.vindral.com/api/edge/publish-url/YOUR_STREAM_KEY.

Download sdi-to-vindral.toml.

toml
# Vindral Bridge Packager example
# Encode SDI into a full ABR ladder and send it to Vindral Live over the Vindral WebSocket transport.

version = "3"

[[sources]]
id = "sdi"
source_type = "decklink_sdk"

[sources.protocol_options.device]
type = "string"
value = "DeckLink Duo (1)" # first port

# Keep video flowing through signal loss so the publisher is not dropped.
[sources.demuxer_options.signal_loss_action]
type = "string"
value = "black_frame"

# 32-bit PCM keeps the card's 24-bit samples.
[sources.demuxer_options.audio_depth]
type = "u_int"
value = 32

[[sinks]]
id = "vindral"
sink_type = "vindral_ws"
source_ids = ["encode"]

[sinks.protocol_options.url]
type = "string"
value = "YOUR_VINDRAL_PUBLISH_URL"

[[transcoders]]
id = "encode"
source_ids = ["sdi"]

[[transcoders.tracks]]
id = "video"
type = "video"

[transcoders.tracks.track_selector]
type = "track-kind"
kind = "video"

[[transcoders.tracks.renditions]]
id = "1080p"
codec = "h264"
gop_size_ms = 1000
bit_rate = 4_500_000
max_b_frames = 0

[transcoders.tracks.renditions.size]
width = 1920
height = 1080

[transcoders.tracks.renditions.options.h264_nvenc]
profile = "high"
preset = "p4"

[transcoders.tracks.renditions.options.libx264]
profile = "high"

[[transcoders.tracks.renditions]]
id = "720p"
codec = "h264"
gop_size_ms = 1000
bit_rate = 3_000_000
max_b_frames = 0

[transcoders.tracks.renditions.size]
width = 1280
height = 720

[transcoders.tracks.renditions.options.h264_nvenc]
preset = "p4"

[[transcoders.tracks.renditions]]
id = "576p"
codec = "h264"
gop_size_ms = 1000
bit_rate = 1_500_000
max_b_frames = 0

[transcoders.tracks.renditions.size]
width = 1024

[transcoders.tracks.renditions.options.h264_nvenc]
preset = "p4"

[[transcoders.tracks.renditions]]
id = "432p"
codec = "h264"
gop_size_ms = 1000
bit_rate = 900_000
max_b_frames = 0

[transcoders.tracks.renditions.size]
width = 768

[transcoders.tracks.renditions.options.h264_nvenc]
preset = "p4"

[[transcoders.tracks.renditions]]
id = "288p"
codec = "h264"
gop_size_ms = 1000
bit_rate = 400_000
max_b_frames = 0

[transcoders.tracks.renditions.size]
width = 512

[transcoders.tracks.renditions.options.h264_nvenc]
preset = "p4"

[[transcoders.tracks.renditions]]
id = "jpeg-1280"
codec = "mjpeg"
gop_size_ms = 2000
bit_rate = 1280
frame_skipping = "frame_every_5_seconds"

[transcoders.tracks.renditions.size]
width = 1280

[[transcoders.tracks.renditions]]
id = "jpeg-640"
codec = "mjpeg"
gop_size_ms = 2000
bit_rate = 640
frame_skipping = "frame_every_5_seconds"

[transcoders.tracks.renditions.size]
width = 640

[[transcoders.tracks]]
id = "audio"
type = "audio"

[transcoders.tracks.track_selector]
type = "track-kind"
kind = "audio"

[[transcoders.tracks.renditions]]
id = "aac"
codec = "aac"
sample_rate = 48_000
channels = 2
bit_rate = 128_000

[[transcoders.tracks.renditions]]
id = "opus"
codec = "opus"
sample_rate = 48_000
channels = 2
bit_rate = 128_000