[mix]
videocaps=video/x-raw,format=I420,width=1920,height=1080,framerate=30/1,pixel-aspect-ratio=1/1,interlace-mode=progressive
audiocaps=audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000
preview=true

sources=cam1,cam2,slides,usbaudio
livesources=slides

[programoutput]
enabled = true
source = premix
videosink = kmssink
audiosink = alsasink device="hw:CARD=U192k,DEV=0"

[source.usbaudio]
kind = alsa
volume = 1.0
device = hw:CARD=U192k,DEV=0
audio.usbaudio = 1+0

[source.slides]
kind = v4l2
device = /dev/video-slides
width = 1920
height = 1080
framerate = 30/1
format = YUY2

[source.cam1]
kind = v4l2
device = /dev/video-cam1
width = 1920
height = 1080
framerate = 30/1
format = YUY2

[source.cam2]
kind = v4l2
device = /dev/video-cam2
width = 1920
height = 1080
framerate = 30/1
format = YUY2

[source.background]
kind=img
file=/opt/voc/assets/bg1080.png

[source.break]
kind=file
location=/opt/voc/assets/default-pause.ts

[previews]
; disable if ui & server run on the same computer and can exchange uncompressed video frames
enabled=true
live=true
videodecoder=vaapi
videoencoder=vaapi
videocodec=h264
videocaps=video/x-h264,width=960,height=540,framerate=30/1
sources=cam1,cam2,slides,mix,mix-blinded

[blinder]
enabled=true
videos=break

[source.blinder]
audio.original=0+1
kind=file
location=/opt/voc/assets/pause-music-voc.mp3

[overlay]
path=/opt/voc/overlays
; files =
; should the user be able to toggle the AUTO-OFF button?
user-auto-off = true
; should the AUTO-OFF button be initially be off?
auto-off = true
; set fading time when showing or hiding overlay
blend-time=300

[mirrors]
; disable if not needed
enabled = true
sources = mix,mix-blinded

[composites]
; fullscreen source A (B is full transparent)
fs.a                  = *
fs.b                  = *
fs.alpha-b            = 0
fs.noswap             = true

; fullscreen source A (facing picture-in-picture)
fs-pip.a              = *
fs-pip.b              = 0.86/0.85 0.0
fs-pip.alpha-b        = 0
fs-pip.inter          = true
fs-pip.mirror         = true

; fullscreen source A (facing side-by-side)
fs-sbs.a              = *
fs-sbs.b              = 1.0/0.5 0.0
fs-sbs.alpha-b        = 0
fs-sbs.inter          = true

; fullscreen source A (facing side-by-side-preview)
fs-lec.a             = *
fs-lec.b             = 1.0 0.0
fs-lec.alpha-b       = 0
fs-lec.crop-b        = 0.31/0
fs-lec.inter         = true
fs-lec.mirror        = true

; picture-in-picture (fullscreen source A with B as small overlay)
pip.a                   = *
pip.b                   = 0.73/0.72 0.26
pip.noswap              = true
pip.mirror              = true

; side-by-side (source A at left and B at right side)
sbs.a                  = 0.008/0.08 0.49
sbs.b                  = 0.503/0.42 0.49

; side-by-side-preview (source A bigger and B smaller and cropped beside)
lec.a                  = 0.006/0.01 0.75
lec.b                  = 0.60/0.42 0.56
lec.crop-b             = 0.31/0
lec.mirror             = true

; side-by-side-preview (source A bigger and B smaller and cropped beside)
lec_43.a               = -0.125/0.0 1.0
lec_43.b               = 0.60/0.42 0.56
lec_43.crop-a          = 0.125/0
lec_43.crop-b          = 0.31/0
lec_43.mirror          = true

; fullscreen source B (overlapping A)
fs-b.a                  = *
fs-b.b                  = *
fs-b.noswap             = true

; fullscreen source B (facing side-by-side)
fs-b-sbs.a              = 0.0/0.5 0.0
fs-b-sbs.alpha-a        = 0.0
fs-b-sbs.b              = *
fs-b-sbs.inter          = true

; fullscreen source B (facing side-by-side-preview)
fs-b-lec.a             = 0.0/1.0 0.0
fs-b-lec.b             = *
fs-b-lec.inter         = true
fs-b-lec.mirror        = true

; one-opon-the-other (like one-opon-the-other but overlapping)
oao.a                   = 0.3/0.2 0.4
oao.alpha-a             = 0.5
oao.b                   = 0.2/0.3 0.6
oao.inter               = true
oao.noswap              = true

[transitions]
; list of transitions each one can be freely named and is a list of composites
; which will be morphed into an animation. Interpolation will be linear with two
; composites and B-Splines for more.

; unique name           =   ms, from / [... /] to
fs-fs                   = 750, fs / fs-b
fs-pip                  = 750, fs-pip / pip
fs-sbs                  = 750, fs-sbs / sbs
fs-b-pip                = 750, fs-b / pip
fs-b-sbs                = 750, fs-b-sbs / sbs
fs-lec                  = 750, fs-lec / lec
fs-b-lec                = 750, fs-b-lec / lec
fs-lec_43               = 750, fs-lec / lec_43
fs-b-lec_43             = 750, fs-b-lec / lec_43
pip-pip                 = 750, pip / sbs / pip
sbs-sbs                 = 750, sbs / oao / sbs
_sbs-sbs                = 750, ^sbs / ^oao / sbs

fs-pip_                 = 750, |fs-pip / |pip
fs-b-pip_               = 750, fs-b / |pip
fs-lec_                 = 750, fs-lec / |lec
fs-lec_43_              = 750, fs-lec / |lec_43
fs-b-lec_               = 750, fs-b-lec / |lec
fs-b-lec_43_            = 750, fs-b-lec / |lec_43
pip-pip_                = 750, |pip / sbs / |pip

; default blending
; unique name                       =   ms, from / [... /] to
def                     = 750, * / *

[toolbar]
; only evaluated in voctogui, but having it here means we don't have
; to configure two systems if we change configs.
fullscreen = false
ports = false
queues = false
presets = fs_cam1,fs_cam2,fs_slides,sbs_cam1_cam2,lec_slides_cam1,lec_slides_cam2

[preset.fs_cam1]
name = CAM1
icon = speaker.svg
key = q

[preset.fs_cam2]
name = CAM2
icon = speaker.svg
key = w

[preset.fs_slides]
name = SLIDES
icon = slides.svg
key = e

[preset.sbs_cam1_cam2]
name = CAM1|CAM2
icon = side-by-side.svg
key = r

[preset.lec_slides_cam1]
name = CAM1|SLIDES
icon = side-by-side-preview.svg
key = t

[preset.lec_slides_cam2]
name = CAM2|SLIDES
icon = side-by-side-preview.svg
key = z

[toolbar.sources.a]
buttons=cam1,cam2,slides
cam1.name = cam1
cam1.key = F1
cam1.tip = Select source cam1 on channel A
cam2.name = cam2
cam2.key = F2
cam2.tip = Select source cam2 on channel A
slides.name = slides
slides.key = F3
slides.tip = Select source slides on channel A

[toolbar.sources.b]
buttons=cam1,cam2,slides
cam1.name = cam1
cam1.key = 1
cam1.tip = Select source cam1 on channel B
cam2.name = cam2
cam2.key = 2
cam2.tip = Select source cam2 on channel B
slides.name = slides
slides.key = 3
slides.tip = Select source slides on channel B

[toolbar.composites]
buttons = fs,sbs,lec

fs.name = FULL SCREEN
fs.key = F5
fs.tip = Show channel A on full screen
fs.icon = speaker.svg

sbs.name = SIDE BY SIDE
sbs.key = F6
sbs.tip = Put channel A beside channel B
sbs.icon = side-by-side.svg

lec.name = LECTURE
lec.key = F7
lec.tip = Put cropped channel B beside large channel A
lec.icon = side-by-side-preview.svg

[toolbar.mods]
buttons = mirror,ratio

mirror.name = MIRROR
mirror.key = F9
mirror.replace = lec->|lec
mirror.tip = Horizontally mirror composite\n(e.g. when speaker moves to the other side)

ratio.name = 4:3
ratio.replace = lec->lec_43
ratio.key = F10
ratio.tip = Crop channel A to 4:3 ratio

[toolbar.mix]
buttons = retake,cut,trans

retake.name   = RETAKE
retake.key    = BackSpace
retake.tip    = Copy output composite to preview for modification\n(output remains untouched)
retake.icon   = retake.svg
cut.name      = CUT
cut.key       = Return
cut.tip       = Hard cut preview composite to output.
cut.expand    = True
cut.icon      = cut.svg

trans.name    = TRANS
trans.key     = space
trans.tip     = Use transition to cut preview composite to output
trans.expand  = True
trans.icon    = transition.svg

[toolbar.insert]
auto-off.name = AUTO-OFF
auto-off.key  = o
auto-off.tip  = automatically turn off insertion before every mix

update.name   = UPDATE
update.key    = u
update.tip    = Update current event

insert.name   = INSERT
insert.key    = i
insert.tip    = Show or hide current insertion