From cdf7ad119957463892fba740e1ea8140ed46a1bb Mon Sep 17 00:00:00 2001 From: Mariano Gabriel Date: Mon, 20 Oct 2025 17:36:31 -0300 Subject: [PATCH] update prompts --- meetus/frame_extractor.py | 18 ++++++++++++++---- meetus/prompts/code.txt | 12 ++++-------- meetus/prompts/console.txt | 11 ++++------- meetus/prompts/dashboard.txt | 12 ++++-------- meetus/prompts/meeting.txt | 18 +++++++++--------- 5 files changed, 35 insertions(+), 36 deletions(-) diff --git a/meetus/frame_extractor.py b/meetus/frame_extractor.py index db04747..6cf447e 100644 --- a/meetus/frame_extractor.py +++ b/meetus/frame_extractor.py @@ -94,11 +94,21 @@ class FrameExtractor: try: result = subprocess.run(cmd, capture_output=True, text=True, check=True) - # Parse output to get frame timestamps + # Parse FFmpeg output to get frame timestamps from showinfo filter + import re frames_info = [] - for img in sorted(self.output_dir.glob(f"{video_name}_*.jpg")): - # Extract timestamp from filename or use FFprobe - frames_info.append((str(img), 0.0)) # Timestamp extraction can be enhanced + + # Extract timestamps from stderr (showinfo outputs there) + timestamp_pattern = r'pts_time:([\d.]+)' + timestamps = re.findall(timestamp_pattern, result.stderr) + + # Match frames to timestamps + frame_files = sorted(self.output_dir.glob(f"{video_name}_*.jpg")) + + for idx, img in enumerate(frame_files): + # Use extracted timestamp or fallback to index-based estimate + timestamp = float(timestamps[idx]) if idx < len(timestamps) else idx * 5.0 + frames_info.append((str(img), timestamp)) logger.info(f"Extracted {len(frames_info)} frames at scene changes") return frames_info diff --git a/meetus/prompts/code.txt b/meetus/prompts/code.txt index 13f4648..45084d8 100644 --- a/meetus/prompts/code.txt +++ b/meetus/prompts/code.txt @@ -1,9 +1,5 @@ -Analyze this code screenshot. Extract: -1. Programming language -2. File name or path (if visible) -3. Code content (preserve exact formatting) -4. Comments -5. Function/class names -6. Any error messages or warnings +You are analyzing a code screenshot from a meeting recording. -Preserve code exactly as shown. +Provide a brief description of what's being shown (1-2 sentences about the context), then extract the visible code exactly as it appears, preserving all formatting, indentation, and structure. + +If there's no code visible, just describe what you see on screen. diff --git a/meetus/prompts/console.txt b/meetus/prompts/console.txt index 7a7d307..63608d0 100644 --- a/meetus/prompts/console.txt +++ b/meetus/prompts/console.txt @@ -1,8 +1,5 @@ -Analyze this console/terminal output. Extract: -1. Commands executed -2. Output/results -3. Error messages -4. Warnings or status messages -5. File paths or URLs +You are analyzing console/terminal output from a meeting recording. -Preserve formatting and structure. +Provide a brief description of what's happening (1-2 sentences), then extract the visible commands and output exactly as shown, preserving formatting. + +Include any error messages, warnings, or important status information. diff --git a/meetus/prompts/dashboard.txt b/meetus/prompts/dashboard.txt index 9eaab31..d7317f0 100644 --- a/meetus/prompts/dashboard.txt +++ b/meetus/prompts/dashboard.txt @@ -1,9 +1,5 @@ -Analyze this dashboard/monitoring panel. Extract: -1. Panel titles and metrics names -2. Current values and units -3. Trends (up/down/stable) -4. Alerts or warnings -5. Time ranges shown -6. Any anomalies or notable patterns +You are analyzing a dashboard/monitoring panel from a meeting recording. -Format as structured data. +Provide a brief description of what's being monitored (1-2 sentences), then list the key panels, metrics, and their current values. Include any alerts, warnings, or notable trends. + +Keep it concise and focused on the important information. diff --git a/meetus/prompts/meeting.txt b/meetus/prompts/meeting.txt index c601fc6..49ed142 100644 --- a/meetus/prompts/meeting.txt +++ b/meetus/prompts/meeting.txt @@ -1,10 +1,10 @@ -Analyze this screen capture from a meeting recording. Extract: -1. Any visible text (titles, labels, headings) -2. Key metrics, numbers, or data points shown -3. Dashboard panels or visualizations (describe what they show) -4. Code snippets (preserve formatting and context) -5. Console/terminal output (commands and results) -6. Application names or UI elements +You are analyzing a screen capture from a meeting recording. -Focus on information that would help someone understand what was being discussed. -Be concise but include all important details. If there's code, preserve it exactly. +Provide a brief description of what's being shown (1-2 sentences about the context). Then extract the key information: +- Any visible text, titles, or headings +- Code (preserve exact formatting if present) +- Metrics, data points, or dashboard information +- Terminal/console commands and output +- Application or UI elements + +Be concise but capture all important details that help understand what was being discussed.