Video Processing
Theprocess-video command handles local video files, extracting frames and preparing them for analysis. It includes intelligent file size management and compression features.
Prerequisites
- FFmpeg installed on your system (required for video processing)
- Sufficient disk space for temporary files
- Supported video format (mp4, avi, mov, etc.)
Usage
File Size Management
The tool automatically handles large video files:- Size Check: Verifies if the video size exceeds configured limits
- Compression: If needed, compresses the video while preserving quality
- Uses FFmpeg with H.264 codec
- Intelligent bitrate calculation
- Progress tracking during compression
- Quality preservation algorithms
- Temporary Files: Manages compressed versions in system temp directory
- Cleanup: Automatically removes temporary files after processing
Options
| Option | Description | Default |
|---|---|---|
--output-dir | Directory to save processed files | ./output |
--batch-size | Number of frames to process at once | 30 |
--max-size | Maximum video size in MB | 500 |
--frame-interval | Frames to skip between extractions | 30 |
Examples
Basic usage:Output Format
The command creates the following directory structure:Metadata Format
Error Handling
The command includes robust error handling:- Validates video format before processing
- Checks FFmpeg availability
- Monitors compression progress
- Provides detailed error messages
- Implements fallback options for compression
Best Practices
- Ensure sufficient disk space (2-3x video size)
- Use recommended video formats (MP4 with H.264)
- Monitor the processing log for details
- Keep FFmpeg updated for best performance
Next Steps
After processing a video, you can:- Generate a guide from the processed data
- Transcribe the audio from the video
- Analyze the content in more detail