def main(): sys.stderr = open(LOGFILE, 'a') print >> sys.stderr, "\n<-------------------" + time.strftime("%c") + "----------------------->\n" bbb_version = bbbversion() print >> sys.stderr, "bbb_version: " + bbb_version os.chdir(source_dir) dictionary, length, dims = prepare(bbb_version) audio = audio_path + 'audio.ogg' audio_trimmed = temp_dir + 'audio_trimmed.m4a' result = target_dir + 'meeting.mp4' slideshow = temp_dir + 'slideshow.mp4' try: create_slideshow(dictionary, length, slideshow, bbb_version) ffmpeg.trim_audio_start(dictionary, length, audio, audio_trimmed) ffmpeg.mux_slideshow_audio(slideshow, audio_trimmed, result) serve_webcams() # zipdir('./download/') copy_mp4(result, source_dir + meetingId + '.mp4') finally: print >> sys.stderr, "Cleaning up temp files..." cleanup() print >> sys.stderr, "Done"
def main(): sys.stderr = open(LOGFILE, 'a') os.chdir(source_dir) print >> sys.stderr, "[" + meetingId + "]Verifying record" try: if not video_exists(source_dir + '_presentation.mp4'): prepare() audio = audio_path + 'audio.ogg' result = source_dir + '_presentation.mp4' drawing = temp_dir + 'drawing.mp4' try: print >> sys.stderr, "[" + meetingId + "]Creating presentation's .Mp4 video..." print >> sys.stderr, "[" + meetingId + "]Drawing" create_drawing(drawing) print >> sys.stderr, "[" + meetingId + "]Slideshow + audio" ffmpeg.mux_slideshow_audio(drawing, audio, result) print >> sys.stderr, "[" + meetingId + "]Presentation's Mp4 Creation Done" except: print >> sys.stderr, "[" + meetingId + "]Presentation's Mp4 Creation Failed" else: print >> sys.stderr, "[" + meetingId + "]Presentation record already exists: " + result finally: print >> sys.stderr, "[" + meetingId + "]Cleaning up temp files..." cleanup() print >> sys.stderr, "[" + meetingId + "]Process finished"
def start(self): os.chdir(str(self.meeting.source_dir)) self.prepare() self.create_slideshow() ffmpeg.trim_audio_start(self.meeting.slides[0]['in'], self.meeting.total_length, self.meeting.audio_file, self.meeting.audio_trimmed) ffmpeg.mux_slideshow_audio(self.meeting.slideshow_file, self.meeting.audio_trimmed, self.meeting.result_file) self.serve_webcams() # self.zipdir() self.copy_mp4() print("\n<------------------- ENDED [" + time.strftime("%c") + "] ----------------------->\n", file=sys.stderr)
def main(): sys.stderr = open(LOGFILE, 'a') print >> sys.stderr, "\n<-------------------" + time.strftime("%c") + "----------------------->\n" os.chdir(source_dir) dictionary, length, dims = prepare() audio = audio_path + 'audio.ogg' audio_trimmed = temp_dir + 'audio_trimmed.m4a' result = target_dir + 'meeting.mp4' slideshow = temp_dir + 'slideshow.mp4' try: create_slideshow(dictionary, length, slideshow) ffmpeg.trim_audio_start(dictionary, length, audio, audio_trimmed) ffmpeg.mux_slideshow_audio(slideshow, audio_trimmed, result) serve_webcams() zipdir('./download/') finally: print >> sys.stderr, "Cleaning up temp files..." cleanup() print >> sys.stderr, "Done"
def main(): sys.stderr = open(LOGFILE, 'a') print >> sys.stderr, "\n<-------------------" + time.strftime( "%c") + "----------------------->\n" bbb_version = bbbversion() print >> sys.stderr, "bbb_version: " + bbb_version os.chdir(source_dir) print >> sys.stderr, "Verifying record" try: if not video_exists(source_dir + meetingId + '_presentation.mp4'): dictionary, length, dims = prepare(bbb_version) audio = audio_path + 'audio.ogg' audio_trimmed = temp_dir + 'audio_trimmed.m4a' result = target_dir + 'meeting.mp4' slideshow = temp_dir + 'slideshow.mp4' try: print >> sys.stderr, "Creating presentation's .Mp4 video..." print >> sys.stderr, "Slideshow" create_slideshow(dictionary, length, slideshow, bbb_version) print >> sys.stderr, "audio" ffmpeg.trim_audio_start(dictionary, length, audio, audio_trimmed) print >> sys.stderr, "Slideshow + audio" ffmpeg.mux_slideshow_audio(slideshow, audio_trimmed, result) serve_webcams() # zipdir('./download/') copy_mp4(result, source_dir + meetingId + '_presentation.mp4') print >> sys.stderr, "Presentation's Mp4 Creation Done" except: print >> sys.stderr, "Presentation's Mp4 Creation Failed" else: print >> sys.stderr, "Presentation record already exists: " + source_dir + meetingId + '_presentation.mp4' if not video_exists(source_dir + meetingId + '_cams.mp4'): try: print >> sys.stderr, "Converting Webcam to .mp4..." ffmpeg.webm_to_mp4(source_dir + "video/webcams.webm", source_dir + meetingId + '_cams.mp4') print >> sys.stderr, "Webcams' Mp4 Creation Done" except: print >> sys.stderr, "Webcams' Mp4 Creation Failed" else: print >> sys.stderr, "Webcam record already exists: " + source_dir + meetingId + "_cams.mp4" if not video_exists(source_dir + meetingId + '_overlayed.mp4'): if (video_exists(source_dir + meetingId + '_presentation.mp4') and video_exists(source_dir + meetingId + '_cams.mp4')): try: print >> sys.stderr, "Overlayig Presentation and webcams..." ffmpeg.overlay_video( source_dir + meetingId + '_presentation.mp4', source_dir + meetingId + '_cams.mp4', source_dir + meetingId + '_overlayed.mp4') print >> sys.stderr, "Overlaying is done" except: print >> sys.stderr, "Overlaying is Failed" else: print >> sys.stderr, "Overlaying is not possible" else: print >> sys.stderr, "Webcam record already exists: " + meetingId + '_overlayed.mp4' finally: print >> sys.stderr, "Cleaning up temp files..." cleanup() print >> sys.stderr, "Process finished"