aboutsummaryrefslogtreecommitdiff
path: root/extra/gpu-screen-recorder.service
diff options
context:
space:
mode:
Diffstat (limited to 'extra/gpu-screen-recorder.service')
-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