spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.79k stars 1.03k forks source link

Add jitsi recording (jibri support) #1473

Open Lostsite opened 2 years ago

Lostsite commented 2 years ago

Sometimes, people do need to record some videos from Jitsi, and there is an opposition is "matrix_jitsi_jibri_recorder_password:". So I believe that it's OK to bring the recording function back.

Because the installation are in the dockers, and there are too much functions in the installation, it is very hard to install jibri in outside VPS, than point the recording function to that VPS. So, for the convenience, just put the jibri with the recording function in the same VPS (that's enough for the home environment).

spantaleev commented 2 years ago

We're not opposed to adding the Jibri component, so that we can have recording support in Jitsi. This has been discussed in the past as well. I suppose that most people don't need the Jibri recording component, so it should be optional -- to be enabled explicitly, only by those who need it.

Still, no one has done the work to add Jibri support yet. If you're using Jitsi and have some time on your hands, you could work on adding Jibri support. Our Jitsi implementation is heavily inspired from the docker-compose implementation we see here: https://github.com/jitsi/docker-jitsi-meet

Of course, anyone else has interest in this and is willing to do the work is welcome to do so. I'll be happy to help with the PR.

aptiko commented 1 year ago

I have started work on this. I should have something ready in a month or so.

aptiko commented 7 months ago

I have started work on this. I should have something ready in a month or so.

So, I did work on this, but eventually I abandoned it when it became too difficult for me to make docker containers communicate with each other, especially when one is running in another machine. Incidentally, I fully identify with Adolph.

Instead, I created the grnet.jitsi Ansible collection.

Most of my unfinished jibri work for matrix-docker-ansible-deploy can be found in the last three commits here: https://github.com/aptiko/ansible-role-jitsi/commits/jibri/

I also have these modifications in matrix-docker-ansible-deploy itself:

diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers
index 816fb2b1..266b46f7 100755
--- a/group_vars/matrix_servers
+++ b/group_vars/matrix_servers
@@ -340,6 +340,8 @@ devture_systemd_service_manager_services_list_auto: |
     +
     ([{'name': (jitsi_identifier + '-jvb.service'), 'priority': 4100, 'groups': ['matrix', 'jitsi', 'jitsi-jvb']}] if jitsi_enabled else [])
     +
+    ([{'name': (jitsi_identifier + '-jibri.service'), 'priority': 4100, 'groups': ['matrix', 'jitsi', 'jitsi-jibri']}] if jitsi_enabled and jitsi_enable_recording else [])
+    +
     ([{'name': 'matrix-ldap-registration-proxy.service', 'priority': 2000, 'groups': ['matrix', 'ldap-registration-proxy']}] if matrix_ldap_registration_proxy_enabled else [])
     +
     ([{'name': 'matrix-ma1sd.service', 'priority': 2000, 'groups': ['matrix', 'ma1sd']}] if matrix_ma1sd_enabled else [])
diff --git a/jitsi_jibri.yml b/jitsi_jibri.yml
new file mode 100644
index 00000000..67f07d83
--- /dev/null
+++ b/jitsi_jibri.yml
@@ -0,0 +1,35 @@
+---
+- name: "Set up Jibri servers"
+  hosts: "jitsi_jibri_servers"
+  become: true
+
+  roles:
+    - role: galaxy/com.devture.ansible.role.playbook_help
+    - role: galaxy/com.devture.ansible.role.systemd_docker_base
+
+    - when: matrix_playbook_docker_installation_enabled | bool
+      role: galaxy/geerlingguy.docker
+      vars:
+        docker_install_compose: false
+      tags:
+        - setup-docker
+        - setup-all
+        - setup-jitsi-jibri
+        - install-docker
+        - install-all
+
+    - when: devture_docker_sdk_for_python_installation_enabled | bool
+      role: galaxy/com.devture.ansible.role.docker_sdk_for_python
+      tags:
+        - setup-docker
+        - setup-all
+        - setup-jitsi-jibri
+        - install-docker
+        - install-all
+
+    - custom/matrix-base
+    - galaxy/jitsi-jibri
+    - custom/matrix-common-after
+
+    - when: devture_systemd_service_manager_enabled | bool
+      role: galaxy/com.devture.ansible.role.systemd_service_manager