Analyze Command
Theanalyze command performs a comprehensive analysis of a video file or YouTube video, combining frame extraction, content analysis, and audio transcription. This provides a complete understanding of the video content.
Usage
Arguments
| Argument | Description |
|---|---|
PATH | Path to video file or YouTube URL |
Options
| Option | Description | Default |
|---|---|---|
--output-dir TEXT | Output directory for analysis results | analysis/ |
--batch-size INTEGER | Number of frames to process in each batch | From config |
--max-concurrent INTEGER | Maximum number of concurrent batches | From config |
--model TEXT | Whisper model to use for transcription | base |
--device TEXT | Device to use for transcription (cpu, cuda) | cpu |
--frame-interval INTEGER | Interval between frame extractions in seconds | 30 |
--skip-existing | Skip processing if output already exists | False |
--force | Force processing even if output already exists | False |
--help | Show help message and exit | - |
Examples
Analyze a local video file
Analyze a YouTube video
Analyze with custom frame interval
Analyze with specific transcription model
Output
The command creates a comprehensive directory structure with analysis results:frames/: Directory containing extracted framesmetadata.json: Metadata about the videoanalysis.json: Frame-by-frame analysistranscript.txt: Audio transcriptsummary.json: Overall summary of the video contentvideo.mp4: The downloaded video (if from YouTube)
Analysis Process
Theanalyze command performs the following steps:
- If a YouTube URL is provided, downloads the video
- Extracts frames at the specified interval
- Analyzes each frame using AI vision models
- Extracts and transcribes the audio
- Combines the frame analysis and transcript to create a comprehensive summary
- Saves all results in the output directory
Summary Format
Thesummary.json file contains a comprehensive summary of the video:
Use Cases
Theanalyze command is useful for:
- Content creators analyzing their videos
- Researchers studying video content
- Educators creating accessible materials
- Marketers understanding video engagement
- Archivists cataloging video collections