Upload recordings to S3 compatible storage
In the example below, we are recording the highest quality stream to S3 compatible storage (Cloudflare R2, AWS S3, Backblaze B2, Minio, etc). The recording will be split into segments of 10 seconds each and the maximum number of segments to keep is set to 17280. This means that the nominal playlist window will be segment_list_size x target_segment_duration, which in this case is 17280 x 10000 milliseconds = 48 hours.
See Recording for storage retention, restart recovery, and playback verification.
Set the DeckLink device name and YOUR_VINDRAL_PUBLISH_URL. For recording,
replace YOUR_S3_ENDPOINT, YOUR_BUCKET, YOUR_ACCESS_KEY_ID and
YOUR_SECRET_ACCESS_KEY, and set region to the value required by your storage
provider. The recording credentials need access to the selected bucket.
# Vindral Bridge Packager example
# SDI to Vindral Live, recording the highest quality as HLS to S3-compatible storage.
version = "3"
[[sources]]
id = "sdi"
source_type = "decklink_sdk"
[sources.protocol_options.device]
type = "string"
value = "DeckLink Duo (1)"
# 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"
[[sinks]]
id = "recording"
sink_type = "hls"
source_ids = ["encode"]
# Keep 48 hours in the playlist: 17,280 segments of 10 seconds.
[sinks.muxer_options.segment_list_size]
type = "u_int"
value = 17_280
# Segment duration in milliseconds.
[sinks.muxer_options.target_segment_duration]
type = "u_int"
value = 10_000
[sinks.protocol_options.delete_old_segments]
type = "bool"
value = true
[sinks.protocol_options.bucket]
type = "string"
value = "YOUR_BUCKET"
[sinks.protocol_options.url]
type = "string"
value = "s3://YOUR_S3_ENDPOINT"
[sinks.protocol_options.access_key_id]
type = "string"
value = "YOUR_ACCESS_KEY_ID"
[sinks.protocol_options.secret_access_key]
type = "string"
value = "YOUR_SECRET_ACCESS_KEY"
[sinks.protocol_options.region]
type = "string"
value = "auto"
[[sinks.track_selectors]]
type = "track-kind"
kind = "video"
codec = "h264"
[[sinks.track_selectors]]
type = "track-kind"
kind = "audio"
codec = "aac"
[[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 = "720p"
codec = "h264"
gop_size_ms = 1000
bit_rate = 2_500_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 = "540p"
codec = "h264"
gop_size_ms = 1000
bit_rate = 1_500_000
max_b_frames = 0
[transcoders.tracks.renditions.size]
width = 960
[transcoders.tracks.renditions.options.h264_nvenc]
preset = "p4"
[[transcoders.tracks.renditions]]
id = "360p"
codec = "h264"
gop_size_ms = 1000
bit_rate = 500_000
max_b_frames = 0
[transcoders.tracks.renditions.size]
width = 640
[transcoders.tracks.renditions.options.h264_nvenc]
preset = "p4"
[[transcoders.tracks.renditions]]
id = "jpeg-1280"
codec = "mjpeg"
gop_size_ms = 1000
bit_rate = 1280
frame_skipping = "frame_every_5_seconds"
[transcoders.tracks.renditions.size]
width = 1280
[[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