def prepare(bbb_version): if not os.path.exists(target_dir): os.mkdir(target_dir) if not os.path.exists(temp_dir): os.mkdir(temp_dir) if not os.path.exists('audio'): global audio_path #audio_path = temp_dir + 'audio/' os.mkdir(audio_path) ffmpeg.extract_audio_from_video(source_dir + 'video/webcams.webm', audio_path + 'audio.ogg') shutil.copytree("presentation", temp_dir + "presentation") dictionary, length = extract_timings(bbb_version) # debug print >> sys.stderr, "dictionary" print >> sys.stderr, (dictionary) print >> sys.stderr, "length" print >> sys.stderr, (length) dims = get_different_presentations(dictionary) # debug print >> sys.stderr, "dims" print >> sys.stderr, (dims) check_presentation_dims(dictionary, dims, bbb_version) return dictionary, length, dims
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()
def prepare(): if not os.path.exists(temp_dir): os.mkdir(temp_dir) if not os.path.exists('audio'): global audio_path os.mkdir(audio_path) ffmpeg.extract_audio_from_video(source_dir + 'video/webcams.mp4', audio_path + 'audio.ogg') if glob.glob('/var/bigbluebutton/recording/raw/' + meetingId + '/video/*/*.webm'): webcams_found = open(source_dir + 'video/webcams.found', 'a+') webcams_found.write("Hi, I found some webcams for you!") webcams_found.close() shutil.copytree("presentation", temp_dir + "presentation")
def prepare(): if not os.path.exists(target_dir): os.mkdir(target_dir) if not os.path.exists(temp_dir): os.mkdir(temp_dir) if not os.path.exists('audio'): global audio_path audio_path = temp_dir + 'audio/' os.mkdir(audio_path) ffmpeg.extract_audio_from_video('video/webcams.webm', audio_path + 'audio.ogg') shutil.copytree("presentation", temp_dir + "presentation") dictionary, length = extract_timings() dims = get_different_presentations(dictionary) check_presentation_dims(dictionary, dims) return dictionary, length, dims
def prepare(): if not os.path.exists(target_dir): os.mkdir(target_dir) if not os.path.exists(temp_dir): os.mkdir(temp_dir) if not os.path.exists('audio'): global audio_path audio_path = temp_dir + 'audio/' os.mkdir(audio_path) ffmpeg.extract_audio_from_video('video/webcams.webm', audio_path + 'audio.ogg') shutil.copytree("presentation", temp_dir + "presentation") dictionary, length = extract_timings() dims = get_different_presentations(dictionary) if dims: check_presentation_dims(dictionary, dims) return dictionary, length, dims