From 98e75d55f5f8494e7133efca13838fcb0bef3e9a Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Sun, 8 Mar 2020 18:59:25 +0800 Subject: [PATCH] Fix small issues with OBS and force monitoring device --- README.md | 5 +- ansible/event | 10 +- ansible/event-generate.go | 6 +- ansible/event.wol | 10 + ansible/roles/recorder/tasks/user.yml | 6 +- .../basic/profiles/1080p/basic.ini.j2 | 2 + .../basic/profiles/720p/basic.ini.j2 | 2 + .../obs-studio/basic/scenes/event_id.json.j2 | 80 +++- ansible/shutdown.yml | 8 + guide.html | 347 ------------------ 10 files changed, 97 insertions(+), 379 deletions(-) create mode 100644 ansible/event.wol create mode 100644 ansible/shutdown.yml delete mode 100644 guide.html diff --git a/README.md b/README.md index 0ef12ee..e7e89ce 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ The FOSSASIA video recording setup -Looking for the [video recorder's guide](guide.html)? +Looking for the [video recorder's guide](https://docs.google.com/document/d/1LWKt0kXWGVuPHCLvBBH35frJFtfhQuNIZ7DSS2HNLZI/edit?usp=sharing)? ## Overview @@ -104,8 +104,9 @@ ansible-playbook -Kf 4 -i event reboot.yml ansible-playbook -Kf 4 -i event upgrade.yml ``` -## Install Wireless Drivers +And run commands like so: ``` ansible -Kf 8 -b -i event all -a 'apt install firmware-iwlwifi' ``` + diff --git a/ansible/event b/ansible/event index 836498d..396b06c 100644 --- a/ansible/event +++ b/ansible/event @@ -1,6 +1,6 @@ [recorders] -x220-01 ansible_host=fd11:f055:a514::2 ansible_user=opentech room_id= room_type= -x230-01 ansible_host=fd11:f055:a514::3 ansible_user=opentech room_id=EH2-1 room_type=EH2 -x240-01 ansible_host=fd11:f055:a514::4 ansible_user=opentech room_id= room_type= -x240-02 ansible_host=fd11:f055:a514::5 ansible_user=opentech room_id= room_type= -x240-03 ansible_host=fd11:f055:a514::6 ansible_user=opentech room_id= room_type= +x220-01 ansible_host=fd11:f055:a514::2 ansible_user=opentech room_id= room_type=setup2 +x230-01 ansible_host=fd11:f055:a514::3 ansible_user=opentech room_id=EH2-1 room_type=setup1 +x240-01 ansible_host=fd11:f055:a514::4 ansible_user=opentech room_id= room_type=setup3 +x240-02 ansible_host=fd11:f055:a514::5 ansible_user=opentech room_id= room_type=setup3 +x240-03 ansible_host=fd11:f055:a514::6 ansible_user=opentech room_id= room_type=setup3 diff --git a/ansible/event-generate.go b/ansible/event-generate.go index 5ef5c70..4d70131 100644 --- a/ansible/event-generate.go +++ b/ansible/event-generate.go @@ -38,7 +38,7 @@ func main() { } func discover(host, user string) (hostname, roomId, roomType string, err error) { - cmd := exec.Command("/usr/bin/ssh", "-l", user, host, "sh", "-c", "hostname; cat room_id; cat room_type; exit 0") + cmd := exec.Command("/usr/bin/ssh", "-l", user, host, "sh", "-c", "hostname; cat room_type; cat room_id; exit 0") fmt.Fprintf(os.Stderr, "command: %s\n", cmd) var out bytes.Buffer cmd.Stdout = &out @@ -51,9 +51,9 @@ func discover(host, user string) (hostname, roomId, roomType string, err error) return } hostname = strings.TrimSpace(hostname) - roomId, _ = out.ReadString('\n') - roomId = strings.TrimSpace(roomId) roomType, _ = out.ReadString('\n') roomType = strings.TrimSpace(roomType) + roomId, _ = out.ReadString('\n') + roomId = strings.TrimSpace(roomId) return } diff --git a/ansible/event.wol b/ansible/event.wol new file mode 100644 index 0000000..044d05b --- /dev/null +++ b/ansible/event.wol @@ -0,0 +1,10 @@ +# x220-01 +3c:97:0e:00:32:1c +# x230-01 +3c:97:0e:9f:b5:4d +# x240-01 +28:d2:44:bb:6d:b4 +# x240-02 +28:d2:44:7d:2f:c3 +# x240-03 +28:d2:44:bb:60:b1 diff --git a/ansible/roles/recorder/tasks/user.yml b/ansible/roles/recorder/tasks/user.yml index bdedbdc..7946fb7 100644 --- a/ansible/roles/recorder/tasks/user.yml +++ b/ansible/roles/recorder/tasks/user.yml @@ -61,9 +61,9 @@ - /usr/bin/gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'nothing' - /usr/bin/gsettings set org.gnome.desktop.lockdown disable-lock-screen true - /usr/bin/gsettings set org.gnome.desktop.lockdown disable-log-out false - - /usr/bin/gsettings set org.gnome.desktop.lockdown disable-printing true - - /usr/bin/gsettings set org.gnome.desktop.lockdown disable-print-setup true - - /usr/bin/gsettings set org.gnome.desktop.lockdown disable-save-to-disk true + - /usr/bin/gsettings set org.gnome.desktop.lockdown disable-printing false + - /usr/bin/gsettings set org.gnome.desktop.lockdown disable-print-setup false + - /usr/bin/gsettings set org.gnome.desktop.lockdown disable-save-to-disk false - /usr/bin/gsettings set org.gnome.desktop.session idle-delay 0 become: yes become_user: mixer diff --git a/ansible/roles/recorder/templates/obs-studio/basic/profiles/1080p/basic.ini.j2 b/ansible/roles/recorder/templates/obs-studio/basic/profiles/1080p/basic.ini.j2 index 38307a7..baf9550 100644 --- a/ansible/roles/recorder/templates/obs-studio/basic/profiles/1080p/basic.ini.j2 +++ b/ansible/roles/recorder/templates/obs-studio/basic/profiles/1080p/basic.ini.j2 @@ -12,6 +12,8 @@ Mode=Simple [Audio] SampleRate=44100 +MonitoringDeviceName=Monitor of PCM2902 Audio Codec Digital Stereo (IEC958) +MonitoringDeviceId=alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.iec958-stereo.monitor [Hotkeys] OBSBasic.StartRecording={\n "bindings": [\n {\n "control": true,\n "key": "OBS_KEY_RETURN"\n }\n ]\n} diff --git a/ansible/roles/recorder/templates/obs-studio/basic/profiles/720p/basic.ini.j2 b/ansible/roles/recorder/templates/obs-studio/basic/profiles/720p/basic.ini.j2 index 83a739e..3fd94e8 100644 --- a/ansible/roles/recorder/templates/obs-studio/basic/profiles/720p/basic.ini.j2 +++ b/ansible/roles/recorder/templates/obs-studio/basic/profiles/720p/basic.ini.j2 @@ -12,6 +12,8 @@ Mode=Simple [Audio] SampleRate=44100 +MonitoringDeviceName=Monitor of PCM2902 Audio Codec Digital Stereo (IEC958) +MonitoringDeviceId=alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.iec958-stereo.monitor [Hotkeys] OBSBasic.StartRecording={\n "bindings": [\n {\n "control": true,\n "key": "OBS_KEY_RETURN"\n }\n ]\n} diff --git a/ansible/roles/recorder/templates/obs-studio/basic/scenes/event_id.json.j2 b/ansible/roles/recorder/templates/obs-studio/basic/scenes/event_id.json.j2 index accb357..49a2f15 100644 --- a/ansible/roles/recorder/templates/obs-studio/basic/scenes/event_id.json.j2 +++ b/ansible/roles/recorder/templates/obs-studio/basic/scenes/event_id.json.j2 @@ -3,10 +3,14 @@ "deinterlace_field_order": 0, "deinterlace_mode": 0, "enabled": true, -{% if room_type == "EH2" %} +{% if room_type == "setup1" %} + "flags": 2, +{% elif room_type == "setup2" %} + "flags": 2, +{% elif room_type == "setup3" %} "flags": 2, {% else %} - "flags": 0, + "flags": 2, {% endif %} "hotkeys": { "libobs.mute": [], @@ -25,12 +29,14 @@ "push-to-talk": false, "push-to-talk-delay": 0, "settings": { -{% if room_type == "EH2" %} +{% if room_type == "setup1" %} + "device_id": "alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo" +{% elif room_type == "setup2" %} + "device_id": "alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo" +{% elif room_type == "setup3" %} "device_id": "alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo" -{% elif room_type == "TR9" %} - "device_id": "alsa_input.pci-0000_00_1b.0.analog-stereo" {% else %} - "device_id": "alsa_input.pci-0000_00_1b.0.analog-stereo" + "device_id": "alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo" {% endif %} }, "sync": 0, @@ -58,9 +64,11 @@ "push-to-talk": false, "push-to-talk-delay": 0, "settings": { -{% if room_type == "EH2" %} +{% if room_type == "setup1" %} "device_id": "alsa_input.usb-VXIS_Inc_ACASIS-02.analog-stereo" -{% elif room_type == "TR9" %} +{% elif room_type == "setup2" %} + "device_id": "alsa_input.usb-VXIS_Inc_ACASIS-02.analog-stereo" +{% elif room_type == "setup3" %} "device_id": "alsa_input.usb-VXIS_Inc_ACASIS-02.analog-stereo" {% else %} "device_id": "alsa_input.usb-VXIS_Inc_ACASIS-02.analog-stereo" @@ -91,9 +99,11 @@ "push-to-talk": false, "push-to-talk-delay": 0, "settings": { -{% if room_type == "EH2" %} +{% if room_type == "setup1" %} "device_id": "alsa_input.pci-0000_00_1b.0.analog-stereo" -{% elif room_type == "TR9" %} +{% elif room_type == "setup2" %} + "device_id": "alsa_input.usb-046d_HD_Pro_Webcam_C920_CEB3336F-02.analog-stereo" +{% elif room_type == "setup3" %} "device_id": "alsa_input.usb-046d_HD_Pro_Webcam_C920_CEB3336F-02.analog-stereo" {% else %} "device_id": "alsa_input.usb-046d_HD_Pro_Webcam_C920_CEB3336F-02.analog-stereo" @@ -447,7 +457,7 @@ "push-to-talk": false, "push-to-talk-delay": 0, "settings": { - "key_color": "4294639610", + "key_color": 4294639610, "key_color_type": "custom", "similarity": 1, "smoothness": 1 @@ -611,7 +621,7 @@ "push-to-talk": false, "push-to-talk-delay": 0, "settings": { - "key_color": "4294639610", + "key_color": 4294639610, "key_color_type": "custom", "similarity": 1, "smoothness": 1 @@ -885,9 +895,11 @@ "push-to-talk-delay": 0, "settings": { "buffering": true, -{% if room_type == "EH2" %} +{% if room_type == "setup1" %} + "device_id": "/dev/v4l/by-path/pci-0000:00:14.0-usb-0:1:1.0-video-index0",{# X230 LEFT BACK PORT #} +{% elif room_type == "setup2" %} "device_id": "/dev/v4l/by-id/usb-VXIS_Inc_ACASIS-video-index0", -{% elif room_type == "TR9" %} +{% elif room_type == "setup3" %} "device_id": "/dev/v4l/by-id/usb-VXIS_Inc_ACASIS-video-index0", {% else %} "device_id": "/dev/v4l/by-id/usb-VXIS_Inc_ACASIS-video-index0", @@ -922,7 +934,7 @@ "push-to-talk": false, "push-to-talk-delay": 0, "settings": { - "key_color": "4294639610", + "key_color": 4294639610, "key_color_type": "custom", "similarity": 1, "smoothness": 1 @@ -954,6 +966,34 @@ "deinterlace_field_order": 0, "deinterlace_mode": 0, "enabled": true, + "filters": [ + { + "deinterlace_field_order": 0, + "deinterlace_mode": 0, + "enabled": true, + "flags": 0, + "hotkeys": {}, + "id": "crop_filter", + "mixers": 0, + "monitoring_type": 0, + "muted": false, + "name": "Digital Zoom", + "private_settings": {}, + "push-to-mute": false, + "pust-to-mute-delay": 0, + "push-to-talk": false, + "push-to-talk-delay": 0, + "settings": { + "bottom": 60, + "left": 80, + "relative": true, + "right": 80, + "top": 60 + }, + "sync": 0, + "volume": 1.0 + } + ], "flags": 0, "hotkeys": {}, "id": "v4l2_input", @@ -968,9 +1008,11 @@ "push-to-talk-delay": 0, "settings": { "buffering": true, -{% if room_type == "EH2" %} - "device_id": "/dev/video0", -{% elif room_type == "TR9" %} +{% if room_type == "setup1" %} + "device_id": "/dev/v4l/by-path/pci-0000:00:14.0-usb-0:2:1.0-video-index0",{# X230 LEFT FRONT PORT #} +{% elif room_type == "setup2" %} + "device_id": "/dev/v4l/by-id/usb-046d_HD_Pro_Webcam_C920_CEB3336F-video-index0", +{% elif room_type == "setup3" %} "device_id": "/dev/v4l/by-id/usb-046d_HD_Pro_Webcam_C920_CEB3336F-video-index0", {% else %} "device_id": "/dev/v4l/by-id/usb-046d_HD_Pro_Webcam_C920_CEB3336F-video-index0", @@ -1119,7 +1161,7 @@ "push-to-talk": false, "push-to-talk-delay": 0, "settings": { - "key_color": "4294639610", + "key_color": 4294639610, "key_color_type": "custom", "similarity": 1, "smoothness": 1 diff --git a/ansible/shutdown.yml b/ansible/shutdown.yml new file mode 100644 index 0000000..7f8d4b8 --- /dev/null +++ b/ansible/shutdown.yml @@ -0,0 +1,8 @@ +--- +- hosts: all + tasks: + - name: shutdown machines + become: yes + command: /sbin/shutdown -h now + ignore_errors: yes + diff --git a/guide.html b/guide.html deleted file mode 100644 index 87560ba..0000000 --- a/guide.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - FOSSASIA Video Recorder's Guide - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - V - S - -
Slides Primary
-
- - - - - S - V - -
Video Primary
-
- - - S - -
Slides Only
-
- - - V - -
Video Only
-
- - - -
Blank
-
- - - -
Start Recording
-
- - - -
Stop Recording
-
16:9F1F2F3F4F9Ctrl
+
Enter
Ctrl
+
Backspace
4:3F5F6F7F8
Example UsageSlides show important pointsPresenter is talking or gesturing a lotSlides show small text or code demosQ&A or presenter is talking beyond the slidesRarely used
-
- -
- -
-
- -
-

OBS Basics

-
    -
  • Start recording before the speaker starts talking
  • -
  • Stop recording after the Q&A
  • -
  • - Perform frequent checks to ensure -
      -
    • The speaker microphone is working (either with the headphones or level meters) T1
    • -
    • The slides and video are not frozen T2
    • -
    • The recording is still ongoing ("REC" timer in the status bar)
    • -
    -
  • Look out for all cabling, ensure they are safe and secure
  • -
  • Use the correct scene for the correct aspect ratio. Aspect ratio is incorrect when squares or circles look warped
  • -
-
- -
-

OBS Issues

-
    -
  • Look out for the "Encoding overloaded!" message in the status bar T3
  • -
  • - Look out for out of sync audio and video within OBS -
      -
    • Usually not a problem, but inform the chat group S1
    • -
    -
  • -
-
- -
-

Standard Procedures

-
    -
  1. Inform the chat group on every issue encountered, so we can account for all the encountered failure scenarios and improve the setup
  2. -
-
- -
-

Notes

-
    -
  1. Might need to wait a while for video to reappear or audio to be heard. If it doesn't after 30s, restart OBS
  2. -
  3. - When you need to leave urgently -
      -
    • Try to get another volunteer to temporarily replace you
    • -
    • Use the "Slides Primary" scene and leave it recording
    • -
    -
  4. -
-
-
- -
- -
-

Troubleshooting

-
    -
  1. -
      -
    • Check that the "Microphone" and "Slides Audio" audio sources are not muted or at a low volume
    • -
    • Check that all the cables are securely plugged in N1
    • -
    • - Click on ▸ "Properties" and ensure the correct device is selected N1 -
        -
      • "Microphone" audio source is either "PCM2902 Audio Codec Analog Stereo" or "Built-in Audio Analog Stereo"
      • -
      • "Slides Audio" audio source is "ACASIS"
      • -
      -
    • -
    • - If above fails, switch to emergency audio with the following steps: -
        -
      • Unmute "Emergency Audio"
      • -
      • Mute "Microphone" and "Slides Audio"
      • -
      • Once the talk ends, fix the problems
      • -
      -
    • -
    • If above fails, restart OBS
    • -
    -
  2. -
  3. -
      -
    • Check that all the cables are securely plugged in N1
    • -
    • - Right-click on the source ("Slides" or "Camera") ▸ "Properties" and ensure the correct device is selected N1 -
        -
      • "Slides" source is "ACASIS"
      • -
      • "Camera" source is either "HD Pro Webcam C920" or "ACASIS"
      • -
      -
    • -
    • If above fails, restart OBS
    • -
    -
  4. -
  5. -
      -
    • Ensure the laptop cooling airflow is not impeded
    • -
    • Close all other programs
    • -
    • If above fails, inform the chat group S1
    • -
    • Ensure the next recording uses the 720p profile ("Profile" option in the menu bar)
    • -
    • If the video blacks out or crashes, restart OBS
    • -
    -
  6. -
-
- -
-
- - - - - -