我有一个记录 x11 显示并输出三个 HLS 流的脚本。
./ffmpeg -y \
-f x11grab -framerate 60 -s 1920x1080 -i :1.0 \
-c:v:0 libx264 -c:s:0 copy -c:a:0 aac -b:v:0 4000k -b:a:0 512k -s:v:0 1920x1080 -r:0 30 -g:0 90 -preset:0 superfast -tune:0 zerolatency -level:v:0 4 -f flv \
-c:v:1 libx264 -c:s:1 copy -c:a:1 aac -b:v:1 2500k -b:a:1 256k -s:v:1 1280x720 -r:1 30 -g:1 90 -preset:1 superfast -tune:1 zerolatency -level:v:1 4 -f flv \
-c:v:2 libx264 -c:s:2 copy -c:a:2 aac -b:v:2 800k -b:a:2 256k -s:v:2 960x540 -r:2 …Run Code Online (Sandbox Code Playgroud) A couple weeks a go I moved from Ubuntu 14.04 to 16.04 and found my Upstart script no longer worked, so feeling adventurous I managed to create a Systemd script that worked instead.
But I'm having a couple issues still.
[/etc/systemd/system/ss13_server.service:3] Unknown lvalue 'User' in section 'Unit'
This is my Systemd Script:
[Unit]
Description=ss13_server
User=ss13
[Service]
WorkingDirectory=/home/ss13/ss13
ExecStart=/usr/local/byond/bin/DreamDaemon /home/ss13/ss13/baystation12.dmb 25565 -trusted
Restart=on-failure
RestartSec=90s
Run Code Online (Sandbox Code Playgroud)
It is meant to run the command
/usr/local/byond/bin/DreamDaemon /home/ss13/ss13/baystation12.dmb 25565 -trusted
within /home/ss13/ss13 as the user ss13 …