aboutsummaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-07-28 21:51:09 +0200
committerdec05eba <dec05eba@protonmail.com>2023-07-28 21:51:09 +0200
commit1cf7c778716fe5304b49ff344c711a12ffe33fe7 (patch)
treec4a5937dfefc63b289c445b4a2fedbbc0478f69e /extra
parent0db86f4a6992e1aa1fcf048ed1ae3a37c0283f8d (diff)
Systemd replay service: record default audio output by default
Diffstat (limited to 'extra')
-rw-r--r--extra/gpu-screen-recorder.service3
1 files changed, 2 insertions, 1 deletions
diff --git a/extra/gpu-screen-recorder.service b/extra/gpu-screen-recorder.service
index f8484e5..43d4cd2 100644
--- a/extra/gpu-screen-recorder.service
+++ b/extra/gpu-screen-recorder.service
@@ -8,10 +8,11 @@ Environment=CONTAINER=mp4
Environment=QUALITY=very_high
Environment=CODEC=auto
Environment=AUDIO_CODEC=opus
+Environment=AUDIO_DEVICE=
Environment=FRAMERATE=60
Environment=REPLAYDURATION=60
Environment=OUTPUTDIR=%h/Videos
-ExecStart=gpu-screen-recorder -v no -w $WINDOW -c $CONTAINER -q $QUALITY -k $CODEC -ac $AUDIO_CODEC -f $FRAMERATE -r $REPLAYDURATION -o $OUTPUTDIR $ADDITIONAL_ARGS
+ExecStart=/bin/sh -c 'AUDIO="${AUDIO_DEVICE:-$(pactl get-default-sink).monitor}"; gpu-screen-recorder -v no -w $WINDOW -c $CONTAINER -q $QUALITY -k $CODEC -ac $AUDIO_CODEC -a "$AUDIO" -f $FRAMERATE -r $REPLAYDURATION -o "$OUTPUTDIR" $ADDITIONAL_ARGS'
Restart=on-failure
RestartSec=5s