def prepare(self): self.meeting.log_file.parent.mkdir(parents=True, exist_ok=True) sys.stderr = self.meeting.log_file.open('a') ffmpeg.set_logfile(self.meeting.log_file.with_name('ffmpeg.log')) print("\n<------------------- STARTING [" + time.strftime("%c") + "] ----------------------->\n", file=sys.stderr) self.meeting.target_dir.mkdir(parents=True, exist_ok=True) self.meeting.temp_dir.mkdir(parents=True, exist_ok=True) self.meeting.audio_file.parent.mkdir(parents=True, exist_ok=True) if not self.meeting.audio_file.exists(): ffmpeg.extract_audio_from_video( self.meeting.source_dir / 'video' / 'webcams.webm', self.meeting.audio_file) shutil.rmtree(str(self.meeting.temp_dir / "presentation"), ignore_errors=True) shutil.copytree( str(self.meeting.source_dir / 'presentation'), str(self.meeting.temp_dir / "presentation"), ) self.check_presentation_dims()
meetingId = tmp[0] + '-' + tmp[1] else: sys.exit() except IndexError: meetingId = sys.argv[1] PATH = '/var/bigbluebutton/published/presentation/' LOGS = '/var/log/bigbluebutton/download/' source_dir = PATH + meetingId + "/" temp_dir = source_dir + 'temp/' target_dir = source_dir + 'download/' #audio_path = 'audio/' audio_path = temp_dir + 'audio/' events_file = 'shapes.svg' LOGFILE = LOGS + meetingId + '.log' ffmpeg.set_logfile(LOGFILE) source_events = '/var/bigbluebutton/recording/raw/' + meetingId + '/events.xml' # Deskshare SOURCE_DESKSHARE = source_dir + 'deskshare/deskshare.webm' TMP_DESKSHARE_FILE = temp_dir + 'deskshare.mp4' def extract_timings(bbb_version): doc = minidom.parse(events_file) dictionary = {} total_length = 0 j = 0 for image in doc.getElementsByTagName('image'): path = image.getAttribute('xlink:href')
if tmp[2] == 'presentation': meetingId = tmp[0] + '-' + tmp[1] else: sys.exit() except IndexError: meetingId = sys.argv[1] PATH = '/var/bigbluebutton/published/presentation/' LOGS = '/var/log/bigbluebutton/download/' source_dir = PATH + meetingId + "/" temp_dir = source_dir + 'temp/' target_dir = source_dir + 'download/' audio_path = 'audio/' events_file = 'shapes.svg' LOGFILE = LOGS + meetingId + '.log' ffmpeg.set_logfile(LOGFILE) def extract_timings(): doc = minidom.parse(events_file) dictionary = {} total_length = 0 j = 0 for image in doc.getElementsByTagName('image'): path = image.getAttribute('xlink:href') if j == 0: path = u'/usr/local/bigbluebutton/core/scripts/logo.png' j += 1 in_times = str(image.getAttribute('in')).split(' ') out_times = image.getAttribute('out').split(' ')