90 lines
2.8 KiB
Plaintext
90 lines
2.8 KiB
Plaintext
|
|
# Gerado automaticamente pela API — não editar manualmente
|
||
|
|
# Stream: {{STREAM_ID}}
|
||
|
|
|
||
|
|
[program:xvfb-{{STREAM_ID}}]
|
||
|
|
command=Xvfb {{DISPLAY}} -screen 0 {{RESOLUTION}}x24 -ac
|
||
|
|
autorestart=true
|
||
|
|
priority=10
|
||
|
|
stdout_logfile=/app/data/streams/{{STREAM_ID}}/xvfb.log
|
||
|
|
stderr_logfile=/app/data/streams/{{STREAM_ID}}/xvfb.log
|
||
|
|
|
||
|
|
[program:chrome-{{STREAM_ID}}]
|
||
|
|
command=bash -c "rm -rf /app/data/streams/{{STREAM_ID}}/chrome-profile/Singleton* && google-chrome \
|
||
|
|
--no-sandbox \
|
||
|
|
--disable-gpu \
|
||
|
|
--window-size={{RESOLUTION}} \
|
||
|
|
--start-maximized \
|
||
|
|
--user-data-dir=/app/data/streams/{{STREAM_ID}}/chrome-profile \
|
||
|
|
--test-type \
|
||
|
|
--disable-infobars \
|
||
|
|
--no-first-run \
|
||
|
|
--disable-extensions \
|
||
|
|
--disable-background-networking \
|
||
|
|
--disable-sync \
|
||
|
|
--disable-translate \
|
||
|
|
--disable-background-timer-throttling \
|
||
|
|
--remote-debugging-port={{DEBUG_PORT}} \
|
||
|
|
"{{STREAM_URL}}""
|
||
|
|
environment=DISPLAY={{DISPLAY}}
|
||
|
|
autorestart=true
|
||
|
|
priority=20
|
||
|
|
startsecs=5
|
||
|
|
stdout_logfile=/app/data/streams/{{STREAM_ID}}/chrome.log
|
||
|
|
stderr_logfile=/app/data/streams/{{STREAM_ID}}/chrome.log
|
||
|
|
|
||
|
|
[program:autologin-{{STREAM_ID}}]
|
||
|
|
command=/app/data/streams/{{STREAM_ID}}/autologin.sh
|
||
|
|
autorestart=false
|
||
|
|
priority=30
|
||
|
|
startsecs=0
|
||
|
|
environment=DISPLAY={{DISPLAY}}
|
||
|
|
stdout_logfile=/app/data/streams/{{STREAM_ID}}/autologin.log
|
||
|
|
stderr_logfile=/app/data/streams/{{STREAM_ID}}/autologin.log
|
||
|
|
|
||
|
|
[program:x11vnc-{{STREAM_ID}}]
|
||
|
|
environment=DISPLAY={{DISPLAY}}
|
||
|
|
command=bash -c "while [ ! -e /tmp/.X11-unix/X$(echo $DISPLAY | cut -d: -f2 | cut -d. -f1) ]; do sleep 0.2; done; exec x11vnc -nopw -listen 0.0.0.0 -rfbport {{VNC_PORT}} -xkb -forever -shared"
|
||
|
|
autorestart=true
|
||
|
|
priority=40
|
||
|
|
stdout_logfile=/app/data/streams/{{STREAM_ID}}/vnc.log
|
||
|
|
stderr_logfile=/app/data/streams/{{STREAM_ID}}/vnc.log
|
||
|
|
|
||
|
|
[program:novnc-{{STREAM_ID}}]
|
||
|
|
command=websockify --web /usr/share/novnc {{NOVNC_PORT}} localhost:{{VNC_PORT}}
|
||
|
|
autorestart=true
|
||
|
|
priority=50
|
||
|
|
stdout_logfile=/app/data/streams/{{STREAM_ID}}/novnc.log
|
||
|
|
stderr_logfile=/app/data/streams/{{STREAM_ID}}/novnc.log
|
||
|
|
|
||
|
|
[program:ffmpeg-{{STREAM_ID}}]
|
||
|
|
command=bash -c "sleep {{STREAM_DELAY}} && ffmpeg \
|
||
|
|
-loglevel warning \
|
||
|
|
-f x11grab \
|
||
|
|
-video_size {{RESOLUTION}} \
|
||
|
|
-framerate {{FPS}} \
|
||
|
|
-i {{DISPLAY}} \
|
||
|
|
-f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 \
|
||
|
|
-shortest \
|
||
|
|
-c:v libx264 \
|
||
|
|
-preset {{PRESET}} \
|
||
|
|
-tune {{TUNE}} \
|
||
|
|
-profile:v baseline \
|
||
|
|
-level 3.1 \
|
||
|
|
-pix_fmt yuv420p \
|
||
|
|
-g {{GOP}} \
|
||
|
|
-keyint_min {{GOP}} \
|
||
|
|
-sc_threshold 0 \
|
||
|
|
-b:v {{BITRATE}} \
|
||
|
|
-maxrate {{BITRATE}} \
|
||
|
|
-bufsize {{BUFSIZE}} \
|
||
|
|
-c:a aac \
|
||
|
|
-b:a 128k \
|
||
|
|
-ar 44100 \
|
||
|
|
-ac 2 \
|
||
|
|
-vsync cfr \
|
||
|
|
-f flv rtmp://localhost:1935/live/{{STREAM_ID}}"
|
||
|
|
autorestart=true
|
||
|
|
startretries=999
|
||
|
|
priority=60
|
||
|
|
stdout_logfile=/app/data/streams/{{STREAM_ID}}/ffmpeg.log
|
||
|
|
stderr_logfile=/app/data/streams/{{STREAM_ID}}/ffmpeg.log
|