From 158c4f7e4dfa477507a472de468bb7923834c123 Mon Sep 17 00:00:00 2001 From: chandi Date: Mon, 27 Jul 2020 21:32:36 +0200 Subject: [PATCH] recording: small bug fixes, clean up, better logging --- mod/core/Dockerfile | 6 +- .../presentation.yml | 20 ------- .../record-monitor.sh | 60 ------------------- mod/core/bigbluebutton.yml | 37 ------------ mod/core/entrypoint.sh | 4 -- mod/recordings-process/entrypoint.sh | 1 + scripts/bbb-record | 3 +- 7 files changed, 7 insertions(+), 124 deletions(-) delete mode 100644 mod/core/bbb-playback-presentation/presentation.yml delete mode 100755 mod/core/bbb-playback-presentation/record-monitor.sh delete mode 100644 mod/core/bigbluebutton.yml diff --git a/mod/core/Dockerfile b/mod/core/Dockerfile index 625faf61..ae173027 100644 --- a/mod/core/Dockerfile +++ b/mod/core/Dockerfile @@ -55,8 +55,6 @@ COPY red5-webapps/screenshare/application.conf /usr/share/red5/webapps/screensha COPY red5-webapps/video/bigbluebutton-video.properties /usr/share/red5/webapps/video/WEB-INF/bigbluebutton-video.properties COPY red5-webapps/video-broadcast/video-broadcast.properties /usr/share/red5/webapps/video-broadcast/WEB-INF/video-broadcast.properties -COPY bigbluebutton.yml /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml.tmpl - COPY web/bigbluebutton.properties /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl COPY web/turn-stun-servers.xml /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml.tmpl @@ -71,5 +69,9 @@ COPY entrypoint.sh /entrypoint.sh COPY prefix-log /usr/local/bin/prefix-log RUN mkdir -p /var/log/supervisor +# add default presentation thumbnail +RUN mkdir -p /usr/share/bigbluebutton/blank \ + && wget -O /usr/share/bigbluebutton/blank/blank-thumb.png https://raw.githubusercontent.com/bigbluebutton/bigbluebutton/v2.2.20/bigbluebutton-config/slides/blank-thumb.png + ENTRYPOINT ["/entrypoint.sh"] CMD [] diff --git a/mod/core/bbb-playback-presentation/presentation.yml b/mod/core/bbb-playback-presentation/presentation.yml deleted file mode 100644 index 19973ce2..00000000 --- a/mod/core/bbb-playback-presentation/presentation.yml +++ /dev/null @@ -1,20 +0,0 @@ -video_output_width: 640 -video_output_height: 480 -# Alternate output size to use when deskshare videos are present -# Set higher so that deskshare output is higher quality, but uses more space. -deskshare_output_width: 1280 -deskshare_output_height: 720 -# offset applied to audio in the output video file -# audio_offset = 1200 means that the audio will be delayed by 1200ms -audio_offset: 0 -include_deskshare: true - -# For PRODUCTION -publish_dir: /var/bigbluebutton/published/presentation -video_formats: -- webm -# - mp4 - -# For DEVELOPMENT -#publish_dir: /home/ubuntu/temp/published/presentation - diff --git a/mod/core/bbb-playback-presentation/record-monitor.sh b/mod/core/bbb-playback-presentation/record-monitor.sh deleted file mode 100755 index 61ede81f..00000000 --- a/mod/core/bbb-playback-presentation/record-monitor.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# /var/bigbluebutton/recording/status/processed/*.done -> publish-worker.rb -# /var/bigbluebutton/recording/status/sanity/*.done -> process-worker -# /var/bigbluebutton/recording/status/ended/*.done -> events-worker -# /var/bigbluebutton/recording/status/recorded/*.done -> archive-worker -# /var/bigbluebutton/recording/status/archived/*.done -> sanity-worker - -FILES_TO_CHECK=$1 - -PATH_TO_CHECK="/var/bigbluebutton/recording/status" -CMD_DIR_PATH="/usr/local/bigbluebutton/core/scripts" - -function do_monitoring() { - while ! compgen -G "$PATH_TO_CHECK" > /dev/null; do - echo "$PATH_TO_CHECK returning 0 files, sleeping for 30s..." - sleep 30 - done - if [[ -d "$CMD_DIR_PATH" ]]; then - pushd $CMD_DIR_PATH > /dev/null - ruby $CMD_PATH - popd > /dev/null - fi - sleep 5 - echo "Re-monitoring files.." - do_monitoring -} - -function initialize_variables() { - echo "$FILES_TO_CHECK" - if [[ ! -z $FILES_TO_CHECK ]]; then - if [[ $FILES_TO_CHECK == "processed" ]]; then - PATH_TO_CHECK="$PATH_TO_CHECK/processed/*.done" - CMD_PATH="/usr/local/bigbluebutton/core/scripts/rap-publish-worker.rb" - elif [[ $FILES_TO_CHECK == "sanity" ]]; then - PATH_TO_CHECK="$PATH_TO_CHECK/sanity/*.done" - CMD_PATH="/usr/local/bigbluebutton/core/scripts/rap-process-worker.rb" - elif [[ $FILES_TO_CHECK == "ended" ]]; then - PATH_TO_CHECK="$PATH_TO_CHECK/ended/*.done" - CMD_PATH="/usr/local/bigbluebutton/core/scripts/rap-events-worker.rb" - elif [[ $FILES_TO_CHECK == "recorded" ]]; then - PATH_TO_CHECK="$PATH_TO_CHECK/recorded/*.done" - CMD_PATH="/usr/local/bigbluebutton/core/scripts/rap-archive-worker.rb" - elif [[ $FILES_TO_CHECK == "archived" ]]; then - PATH_TO_CHECK="$PATH_TO_CHECK/archived/*.done" - CMD_PATH="/usr/local/bigbluebutton/core/scripts/rap-sanity-worker.rb" - else - echo "invalid argument, exiting..." - exit - fi - else - echo "invalid argument, exiting..." - exit - fi -} - -# first check variables -initialize_variables -# main execution -do_monitoring diff --git a/mod/core/bigbluebutton.yml b/mod/core/bigbluebutton.yml deleted file mode 100644 index 5f647a2f..00000000 --- a/mod/core/bigbluebutton.yml +++ /dev/null @@ -1,37 +0,0 @@ -bbb_version: '2.1.0' -raw_audio_src: /var/freeswitch/meetings -raw_video_src: /usr/share/red5/webapps/video/streams -kurento_video_src: /var/kurento/recordings -kurento_screenshare_src: /var/kurento/screenshare -raw_screenshare_src: /usr/share/red5/webapps/screenshare/streams -raw_webrtc_deskshare_src: /usr/share/red5/webapps/video-broadcast/streams -raw_deskshare_src: /var/bigbluebutton/deskshare -raw_presentation_src: /var/bigbluebutton -notes_endpoint: http://etherpad:9001/p -# Specify the notes formats we archive -# txt, doc and odt are also supported -notes_formats: -- etherpad -- html -- pdf -redis_host: redis -redis_port: 6379 -# Uncomment and set password if redis require it. -# redis_password: changeme - -# For PRODUCTION -log_dir: /var/log/bigbluebutton -events_dir: /var/bigbluebutton/events -recording_dir: /var/bigbluebutton/recording -published_dir: /var/bigbluebutton/published -captions_dir: /var/bigbluebutton/captions -playback_host: {{ .Env.DOMAIN }} -playback_protocol: https - -# For DEVELOPMENT -# This allows us to run the scripts manually -#scripts_dir: /home/ubuntu/dev/bigbluebutton/record-and-playback/core/scripts -#log_dir: /home/ubuntu/temp/log -#recording_dir: /home/ubuntu/temp/recording -#published_dir: /home/ubuntu/temp/published -#playback_host: meet.livingutopia.org diff --git a/mod/core/entrypoint.sh b/mod/core/entrypoint.sh index 5eb52067..f10a0121 100755 --- a/mod/core/entrypoint.sh +++ b/mod/core/entrypoint.sh @@ -22,14 +22,10 @@ mkdir -p /var/bigbluebutton/deleted mkdir -p /var/bigbluebutton/unpublished mkdir -p /var/bigbluebutton/playback -# add playback-presentation to /var/bigbluebutton volume -cp -r /usr/src/bbb-src-playback/* /var/bigbluebutton/playback - # -- fix directory permissions chown -R bigbluebutton:bigbluebutton /var/bigbluebutton dockerize \ - -template /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml.tmpl:/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml \ -template /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl:/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties \ -template /usr/share/bbb-apps-akka/conf/application.conf.tmpl:/usr/share/bbb-apps-akka/conf/application.conf \ -template /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml.tmpl:/usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml \ diff --git a/mod/recordings-process/entrypoint.sh b/mod/recordings-process/entrypoint.sh index ff6269ec..151e7ff2 100755 --- a/mod/recordings-process/entrypoint.sh +++ b/mod/recordings-process/entrypoint.sh @@ -6,6 +6,7 @@ python3 -u /log-collector.py & cd /usr/local/bigbluebutton/core/scripts while true; do + echo "execute workers..." bundle exec ruby rap-archive-worker.rb bundle exec ruby rap-sanity-worker.rb bundle exec ruby rap-process-worker.rb diff --git a/scripts/bbb-record b/scripts/bbb-record index cc353cfc..c69c6f58 100755 --- a/scripts/bbb-record +++ b/scripts/bbb-record @@ -16,4 +16,5 @@ if [ ! "$ENABLE_RECORDING" == true ]; then exit 1 fi -./scripts/compose exec recordings-process bbb-record $@ \ No newline at end of file +./scripts/compose exec recordings-process bbb-record $@ +./scripts/compose logs --tail=15 recordings-process \ No newline at end of file