Video Processor

From lilinji/GeneTind-Life-Skills · View interactive version

Video Processor is an AI agent skill from the GitHub repository lilinji/GeneTind-Life-Skills. Process video files with audio extraction, format conversion (mp4, webm), and Whisper transcription. Use when user mentions video conversion, audio extraction, transcription, mp4, webm, ffmpeg, or whisper transcription.

How to use this skill

Skill file

Video Processor

Instructions

This skill provides video processing utilities including audio extraction, format conversion, and audio transcription using FFmpeg and OpenAI's Whisper model.

Prerequisites

Required tools (must be installed in your environment):

```bash

# macOS

brew install ffmpeg

# Ubuntu/Debian

apt-get install ffmpeg

# Verify installation

ffmpeg -version

```

```bash

# Install via pip

pip install -U openai-whisper

# Verify installation

whisper --help

```

Python packages (included in script via PEP 723):

Workflow

Use the scripts/video_processor.py script for all video processing tasks. The script provides a simple CLI with the following commands:

1. **Extract Audio from Video**

Extract the audio track from a video file:

uv run .claude/skills/video-processor/scripts/video_processor.py extract-audio input.mp4 output.wav

Options:

2. **Convert Video to MP4**

Convert any video file to MP4 format:

uv run .claude/skills/video-processor/scripts/video_processor.py to-mp4 input.avi output.mp4

Options:

3. **Convert Video to WebM**

Convert any video file to WebM format (web-optimized):

uv run .claude/skills/video-processor/scripts/video_processor.py to-webm input.mp4 output.webm

Options:

4. **Transcribe Audio with Whisper**

Transcribe audio or video files to text using OpenAI's Whisper model:

# Transcribe video file (audio will be extracted automatically)
uv run .claude/skills/video-processor/scripts/video_processor.py transcribe input.mp4 transcript.txt

# Transcribe audio file directly
uv run .claude/skills/video-processor/scripts/video_processor.py transcribe audio.wav transcript.txt

Options:

Transcription workflow:

  1. If input is video, FFmpeg extracts audio to temporary WAV file
  2. Whisper processes the audio file
  3. Transcription is saved in requested format
  4. Temporary files are cleaned up automatically
5. **Combined Workflow Example**

Process a video end-to-end:

# 1. Extract audio for analysis
uv run .claude/skills/video-processor/scripts/video_processor.py extract-audio lecture.mp4 lecture.wav

# 2. Transcribe to SRT subtitles
uv run .claude/skills/video-processor/scripts/video_processor.py transcribe lecture.mp4 lecture.srt --format srt --model small

# 3. Convert to web format
uv run .claude/skills/video-processor/scripts/video_processor.py to-webm lecture.mp4 lecture.webm

Key Technical Details

FFmpeg and Whisper Integration:

Audio Format for Transcription:

Output Formats:

Error Handling

The script includes comprehensive error handling:

Performance Tips

Examples

Example 1: Quick Video to MP4 Conversion

User request:

I have an AVI file from my old camera. Can you convert it to MP4?

You would:

  1. Use the to-mp4 command with default settings:

```bash

uv run .claude/skills/video-processor/scripts/video_processor.py to-mp4 old_video.avi output.mp4

```

  1. Confirm the conversion completed successfully
  2. Inform the user about the output file location

Example 2: Extract Audio and Transcribe

User request:

I recorded a lecture video and need a transcript. Can you extract the audio and transcribe it?

You would:

  1. First extract the audio:

```bash

uv run .claude/skills/video-processor/scripts/video_processor.py extract-audio lecture.mp4 lecture.wav

```

  1. Then transcribe using the base model (good balance of speed/accuracy):

```bash

uv run .claude/skills/video-processor/scripts/video_processor.py transcribe lecture.mp4 transcript.txt --model base

```

  1. Share the transcript.txt file with the user

Example 3: Create Web-Optimized Video with Subtitles

User request:

I need to put this video on my website with subtitles. Can you help?

You would:

  1. Convert to WebM for web optimization:

```bash

uv run .claude/skills/video-processor/scripts/video_processor.py to-webm presentation.mp4 presentation.webm

```

  1. Generate SRT subtitle file:

```bash

uv run .claude/skills/video-processor/scripts/video_processor.py transcribe presentation.mp4 subtitles.srt --format srt --model small

```

  1. Inform user they now have:

Example 4: High-Quality Transcription with Language Specification

User request:

I have a Spanish interview video that needs an accurate transcript for publication.

You would:

  1. Use a larger model with language specified for best accuracy:

```bash

uv run .claude/skills/video-processor/scripts/video_processor.py transcribe interview.mp4 transcript.txt --model medium --language es

```

  1. Optionally create SRT for review:

```bash

uv run .claude/skills/video-processor/scripts/video_processor.py transcribe interview.mp4 transcript.srt --format srt --model medium --language es

```

  1. Review the transcript with the user and make any necessary corrections

Example 5: Batch Processing Multiple Videos

User request:

I have a folder of training videos that all need to be converted to WebM and transcribed.

You would:

  1. List all video files in the directory:

```bash

ls training_videos/*.mp4

```

  1. For each video file, run the conversion and transcription:

```bash

# For each video: video1.mp4, video2.mp4, etc.

uv run .claude/skills/video-processor/scripts/video_processor.py to-webm training_videos/video1.mp4 output/video1.webm

uv run .claude/skills/video-processor/scripts/video_processor.py transcribe training_videos/video1.mp4 output/video1.txt --model base

# Repeat for each file

```

  1. Confirm all conversions and transcriptions completed
  2. Provide summary of output files

Summary

The video-processor skill provides a unified interface for common video processing tasks:

All operations are handled through a single, well-documented script with sensible defaults and comprehensive error handling.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.