Process YouTube Command
Theprocess-youtube command downloads a video from YouTube and processes it, extracting frames and analyzing their content. This is similar to the process-video command but works with YouTube URLs instead of local files.
Usage
Arguments
| Argument | Description |
|---|---|
URL | YouTube video URL |
Options
| Option | Description | Default |
|---|---|---|
--output-dir TEXT | Output directory for results | data/ |
--batch-size INTEGER | Number of frames to process in each batch | From config |
--max-concurrent INTEGER | Maximum number of concurrent batches | From config |
--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 |
--quality TEXT | Video quality to download (best, 1080p, 720p, etc.) | best |
--help | Show help message and exit | - |
Examples
Process a YouTube video
Process a YouTube video with custom frame interval
Process a YouTube video with specific quality
Output
The command creates a directory structure in the output directory with the following components:frames/: Directory containing extracted frames as JPEG imagesmetadata.json: Metadata about the video and extraction processanalysis.json: Analysis of the extracted framesvideo.mp4: The downloaded video file
Metadata Format
Themetadata.json file contains information about the video and the extraction process:
YouTube URL Formats
The command supports various YouTube URL formats:- Standard:
https://www.youtube.com/watch?v=VIDEO_ID - Short:
https://youtu.be/VIDEO_ID - With timestamp:
https://www.youtube.com/watch?v=VIDEO_ID&t=123s - Playlist item:
https://www.youtube.com/watch?v=VIDEO_ID&list=PLAYLIST_ID
Next Steps
After processing a YouTube video, you can:- Generate a guide from the processed data
- Transcribe the audio from the video
- Analyze the content in more detail