finalizerecording puts all records in same dir
This commit is contained in:
parent
79abc93fcf
commit
93e7f04880
2 changed files with 33 additions and 7 deletions
32
type/__jitsi_jibri/files/finalize_recording.sh
Executable file
32
type/__jitsi_jibri/files/finalize_recording.sh
Executable file
|
@ -0,0 +1,32 @@
|
|||
# Managed remotely, changes will be lost
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -u
|
||||
|
||||
guess_room_name() {
|
||||
recording_meeting_path="${1}"
|
||||
# the approach is to delete the 25 fixed character postfix string on each
|
||||
# file (example: room_name_2022-06-08-15-28-25.mp4) another approach would be
|
||||
# to take the url
|
||||
# from the metadata.json file, but that would imply json parsing or jq dependency
|
||||
basename "$(ls "${recording_meeting_path}"/*.mp4)" | rev | cut -c25- | rev
|
||||
}
|
||||
|
||||
move_meeting() {
|
||||
mkdir -p "${recording_general_path}/${room}/"
|
||||
mv "${recording_meeting_path}"/*.mp4 "${recording_general_path}/${room}/"
|
||||
rm "${recording_meeting_path}/metadata.json"
|
||||
rmdir "${recording_meeting_path}"
|
||||
}
|
||||
|
||||
main() {
|
||||
recording_meeting_path="${1}"
|
||||
recording_general_path="$(dirname "${1}")"
|
||||
room="$(guess_room_name "${recording_meeting_path}")"
|
||||
move_meeting
|
||||
echo "$0 ${@} ${room}" >> /tmp/thisisatest.log
|
||||
}
|
||||
|
||||
main "${@}"
|
||||
|
||||
exit 0
|
|
@ -30,13 +30,7 @@ __line '/etc/modules' --line 'snd_aloop' --onchange 'modprobe snd_aloop'
|
|||
# thanks https://github.com/emrahcom/emrah-buster-templates/blob/master/machines/eb-jibri-template/usr/local/bin/finalize_recording.sh
|
||||
__file '/opt/finalize_recording.sh' \
|
||||
--mode '755' \
|
||||
--source '-' << EOF
|
||||
# Managed remotely, changes will be lost
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
--source "${__type}/files/finalize_recordding.sh"
|
||||
|
||||
__apt_key 'jitsi_meet' \
|
||||
--source "${__type}/files/apt-jitsi-keyring.gpg"
|
||||
|
|
Loading…
Add table
Reference in a new issue