TagStream is a macOS command line tool that generates stock-style keyword tags from MP4 videos by sampling frames, captioning, extracting keywords, and ranking them.
Prerequisites:
- Python 3.10+
- ffmpeg (
brew install ffmpeg) - Optional: Apple Silicon PyTorch with MPS support or CUDA GPU
Create and activate a venv:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtUsage:
python cli.py --input examples/sample_video.mp4 --sample-rate 0.5 --top 50 --out examples/tags.csvRequirements:
- Python 3.10+
ffmpeginstalled and available onPATH(brew install ffmpeg)torch,transformers,sentence-transformers, and other packages fromrequirements.txt
Notes:
- The default sampling rate is
0.5fps, which means one frame every 2 seconds. - For a 30 fps video, this is appropriate for 10–60 second clips and avoids scanning every frame.
- Output is written as a comma-separated list of tags to
tags.csvby default.