#!/usr/bin/env python3 """ Process meeting recordings to extract audio + screen content. Combines Whisper transcripts with OCR from screen shares. """ import argparse from pathlib import Path import sys import json import logging from meetus.frame_extractor import FrameExtractor from meetus.ocr_processor import OCRProcessor from meetus.transcript_merger import TranscriptMerger logger = logging.getLogger(__name__) def setup_logging(verbose: bool = False): """ Configure logging for the application. Args: verbose: If True, set DEBUG level, otherwise INFO """ level = logging.DEBUG if verbose else logging.INFO # Configure root logger logging.basicConfig( level=level, format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%H:%M:%S' ) # Suppress verbose output from libraries logging.getLogger('PIL').setLevel(logging.WARNING) logging.getLogger('easyocr').setLevel(logging.WARNING) logging.getLogger('paddleocr').setLevel(logging.WARNING) def main(): parser = argparse.ArgumentParser( description="Extract screen content from meeting recordings and merge with transcripts", formatter_class=argparse.RawDescriptionHelpFormatter, epilog=""" Examples: # Process video and extract frames only python process_meeting.py samples/meeting.mkv --extract-only # Process video with Whisper transcript python process_meeting.py samples/meeting.mkv --transcript meeting.json # Use scene detection instead of interval python process_meeting.py samples/meeting.mkv --scene-detection # Use different OCR engine python process_meeting.py samples/meeting.mkv --ocr-engine easyocr """ ) parser.add_argument( 'video', help='Path to video file' ) parser.add_argument( '--transcript', '-t', help='Path to Whisper transcript (JSON or TXT)', default=None ) parser.add_argument( '--output', '-o', help='Output file for enhanced transcript (default: