avibebuilder/claude-prime / .claude/skills/media-processor
media-processor
VerifiedSpecialized visual and multimedia processing tools. Use this skill whenever a task involves complex visual content — UI mockups, dense screenshots, design images, charts, artwork — where precise details like spacing, hex colors, font sizes, and component hierarchy need to be extracted accurately. Also use for: reviewing or auditing existing UI against designs, comparing screenshots for visual regressions, transcribing audio/video, extracting data from PDFs with complex layouts, and generating images. Trigger whenever the user wants to implement from a design, review or compare UI screenshots, analyze visual details precisely, describe artwork or aesthetic content, or process any media file (audio, video, PDF).
| File | Kind | Size |
|---|---|---|
| .env.example | other | 122 B |
| SKILL.md | skill md | 4.6 KB |
| references/api-gotchas.md | markdown | 1.9 KB |
| references/media-optimization.md | markdown | 1.3 KB |
| references/model-routing.md | markdown | 1.8 KB |
| scripts/document_converter.py | script | 11.0 KB |
| scripts/gemini_batch_process.py | script | 10.8 KB |
| scripts/image_gen.py | script | 6.9 KB |
| scripts/requirements.txt | manifest | 156 B |
references/media-optimization.md
View on GitHub# Media Optimization for Gemini API
Quick ffmpeg/ffprobe recipes to prepare oversized media before uploading to Gemini.
## Size Limits
| Method | Limit |
|--------|-------|
| Inline (base64) | 20 MB total request |
| File API | 2 GB per file |
## Video
```bash
# Compress to ~100 MB (two-pass is more accurate, single-pass is fine for most cases)
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -c:a aac -b:a 128k -ac 2 output.mp4
# Cap at 1080p (keeps aspect ratio)
ffmpeg -i input.mp4 -vf "scale=1920:-2" -c:v libx264 -crf 23 -c:a aac -b:a 128k output.mp4
# Target specific bitrate (e.g., fit 100 MB in 60s → ~13 Mbps)
ffmpeg -i input.mp4 -c:v libx264 -b:v 13M -c:a aac -b:a 128k output.mp4
# Trim duration (first 60 minutes)
ffmpeg -i input.mp4 -t 3600 -c copy trimmed.mp4
# Split into 1-hour chunks
ffmpeg -i input.mp4 -c copy -segment_time 3600 -f segment chunk_%03d.mp4
```
## Audio
```bash
# Compress to mono AAC (Gemini downsamples to 16kHz mono anyway)
ffmpeg -i input.mp3 -c:a aac -b:a 64k -ar 16000 -ac 1 output.m4a
```
## Images
```bash
# Resize to max 1920px wide (ImageMagick)
convert input.jpg -resize 1920x\> -quality 85 output.jpg
# Or with ffmpeg
ffmpeg -i input.png -vf "scale=1920:-2" output.jpg
```
## Probe File Info
```bash
ffprobe -v quiet -print_format json -show_format -show_streams input.mp4
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |