-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add recording server #8708
Merged
Merged
Add recording server #8708
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e240bcd
to
db97983
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This was referenced Feb 8, 2023
b9f77c1
to
226aab9
Compare
nickvergessen
approved these changes
Feb 14, 2023
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
"server.conf.in" is provided as an example file with a description of all the configurations. Some descriptions were copied from https://github.com/strukturag/nextcloud-spreed-signaling/blob/v1.0.0/server.conf.in, which is also licensed under the GNU AGPLv3. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Based on the real participant class (and related) from "Talkbuchet-cli.py", but with some adjustments, like using kiosk mode, loading the browser with specific environment variables (which will make possible to load the browser in a specific display and to send the audio to a specific device) or preventing any microphone or camera from being used. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
To record a call a virtual display server and an audio sink are created. Then a browser is launched inside the virtual display server, and its audio is routed to the audio sink. This ensures that several browsers can be running at the same time without interfering with each other. Then the call is joined by the browser, and an FFMPEG process to record the virtual display driver and the audio sink is started. Once the recording is stopped it is uploaded to the Nextcloud server. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The script creates a Docker container and installs all the needed dependencies as well as the recording backend inside it. Once the container has been created running the script will just launch the recording backend again in the existing container, without setting it up. Note that the configuration (/etc/nextcloud-talk-recording/server.conf) needs to be customized as needed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Currently the recording server does not support clustering, so the UI is limited to add a single recording server, even if internally the configuration allows more than one. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The credentials to be used are specific to the recording server and unrelated to the SIP bridge. The code follows the same schema used for validation of external signaling server requests in SignalingController. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The owner of the recording must be provided when starting it to be able to later store it. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Chromium does not seem to play all Theora files (might be related to timestamp problems), while VP8 is supported in both Firefox and Chromium. Similarly Firefox can not play Matroska containers, while webm is supported in both Firefox and Chromium. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Although the recording itself does not require a user uploading the resulting file does, so it should be limited only to logged in moderators. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Given should be used for preconditions, When for the action being tested and Then for postconditions. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The fake recording server just accepts all backend requests (as long as the validation is correct) and records them to be able to check them from the integration tests. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This just updates the conversation property "callRecording" as soon as the signaling message is received, rather than having to wait until the whole conversation data is fetched again. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
bba65ea
to
4511978
Compare
This was referenced Feb 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8521
When a call needs to be started the Nextcloud server sends a request to the recording server. The recording server launches a browser in its own virtual display server and with its own audio device (so several browsers can be running at the same time without interfering with each other), joins the call in that browser and then captures the video and sound of the virtual display and the audio device. Once the recording server receives a request from the Nextcloud server to stop the recording the file is uploaded from the recording server to the Nextcloud server.
Right now, due to the use of a real participant, only public calls can be recorded (because the participant joins as a guest). This will be solved by using an internal client of the signaling server (which will also limit recording the calls only when an external signaling server is configured). Similarly, the recorded call right now shows the standard Talk UI; this will be solved by adding a custom UI for the recording client.
The format of the recording had to be changed from Theora in mkv to VP8 in webm, as Chromium does not play Theora (the Nextcloud viewer shows some of them, though, but I do not know if it provides a built-in codec like Wikipedia, and in any case the recorded ones did not play properly, maybe due to some timestamp issues) and Firefox does not play mkv (although, again, according to the ticket it does in some cases, but at least it did not work with Nextcloud viewer). Unfortunately VP8 seems to require more CPU to be encoded than Theora.
🚧 TODO
How to test
upload_max_filesize
andpost_max_size
in your PhP settingsserver.conf.in
with the following values:start-container.sh
inrecording
. This will create a Docker container with all the needed dependencies and use the settings just defined for the recording serverhttp://{IP_ADDRESS}:8000
; the IP address can be found withdocker inspect talk-recording
Next steps (follow up pull requests)
🏁 Checklist
docs/
has been updated or is not required