Browse Source

jibri: default to recording in 720p

Saúl Ibarra Corretgé 3 years ago
parent
commit
7cd71a2
2 changed files with 6 additions and 9 deletions
  1. 2 3
      jibri/rootfs/defaults/jibri.conf
  2. 4 6
      jibri/rootfs/defaults/xorg-video-dummy.conf

+ 2 - 3
jibri/rootfs/defaults/jibri.conf

@@ -1,4 +1,5 @@
 {{ $JIBRI_USAGE_TIMEOUT := .Env.JIBRI_USAGE_TIMEOUT | default "0" -}}
 {{ $JIBRI_USAGE_TIMEOUT := .Env.JIBRI_USAGE_TIMEOUT | default "0" -}}
+{{ $JIBRI_RECORDING_RESOLUTION := .Env.JIBRI_RECORDING_RESOLUTION | default "1280x720" -}}
 {{ $XMPP_TRUST_ALL_CERTS := .Env.XMPP_TRUST_ALL_CERTS | default "true" | toBool -}}
 {{ $XMPP_TRUST_ALL_CERTS := .Env.XMPP_TRUST_ALL_CERTS | default "true" | toBool -}}
 
 
 jibri {
 jibri {
@@ -82,9 +83,7 @@ jibri {
     }
     }
 
 
     ffmpeg {
     ffmpeg {
-      {{ if .Env.JIBRI_RECORDING_RESOLUTION -}}
-      resolution =  "{{ .Env.JIBRI_RECORDING_RESOLUTION }}"
-      {{ end -}}
+      resolution =  "{{ $JIBRI_RECORDING_RESOLUTION }}"
       {{ if .Env.JIBRI_FFMPEG_AUDIO_SOURCE -}}
       {{ if .Env.JIBRI_FFMPEG_AUDIO_SOURCE -}}
       // The audio source that will be used to capture audio on Linux
       // The audio source that will be used to capture audio on Linux
       audio-source = "{{ .Env.JIBRI_FFMPEG_AUDIO_SOURCE }}"
       audio-source = "{{ .Env.JIBRI_FFMPEG_AUDIO_SOURCE }}"

+ 4 - 6
jibri/rootfs/defaults/xorg-video-dummy.conf

@@ -1,3 +1,5 @@
+{{ $JIBRI_RECORDING_RESOLUTION := .Env.JIBRI_RECORDING_RESOLUTION | default "1280x720" -}}
+
 # This xorg configuration file is meant to be used by xpra
 # This xorg configuration file is meant to be used by xpra
 # to start a dummy X11 server.
 # to start a dummy X11 server.
 # For details, please see:
 # For details, please see:
@@ -109,15 +111,11 @@ Section "Screen"
     Viewport 0 0
     Viewport 0 0
     Depth 24
     Depth 24
     Modes "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" "1024x600" "800x600" "320x200"
     Modes "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" "1024x600" "800x600" "320x200"
-    {{ if .Env.JIBRI_RECORDING_RESOLUTION -}}
-    Virtual {{ join " " (splitList "x" .Env.JIBRI_RECORDING_RESOLUTION) }}
-    {{ else -}}
-    Virtual 1920 1080
-    {{ end -}}
+    Virtual {{ join " " (splitList "x" $JIBRI_RECORDING_RESOLUTION) }}
   EndSubSection
   EndSubSection
 EndSection
 EndSection
 
 
 Section "ServerLayout"
 Section "ServerLayout"
   Identifier   "dummy_layout"
   Identifier   "dummy_layout"
   Screen       "dummy_screen"
   Screen       "dummy_screen"
-EndSection
+EndSection