vid2text is a powerful CLI tool designed for extracting searchable transcriptions from diverse sources like YouTube, local videos, and M3U8 streams. It utilizes local Whisper models for transcription, supports batch processing through a simple configuration file, and offers a searchable SQLite database with a web interface for easy access.
vid2text is a powerful command-line interface (CLI) tool designed for extracting searchable transcriptions from a variety of video sources, including YouTube videos, local files (.mp4, .avi, .mov, .mkv, .m4v), and M3U8 streams. Utilizing innovative local Whisper models, this tool allows for efficient and effective transcription.
Process a video with the following commands:
vid2text youtube "https://youtu.be/VIDEO_ID"
vid2text local "/path/to/video.mp4"
vid2text m3u8 "https://example.com/stream.m3u8"
# Use options for more control
vid2text --model small.en --verbose youtube "https://youtu.be/..."
vid2text --dry-run local video.mp4 # Preview the operation
Create a config.yaml file with video settings:
videos:
youtube:
- url: "https://youtu.be/dQw4w9WgXcQ"
- url: "https://youtu.be/jNQXAC9IVRw"
title: "Custom Title" # Optional
local:
- path: "/path/to/video.mp4"
- path: "/path/to/folder/" # Processes all videos in the folder
title: "Folder Videos"
m3u8:
- url: "https://example.com/video.m3u8"
title: "Live Stream"
order: 1
settings: # Optional
whisper_model: "small.en" # Overrides the default model
log_level: "DEBUG"
Process all videos listed in the configuration:
vid2text process config.yaml
vid2text --dry-run process config.yaml # Preview before processing
Access various database functionalities:
vid2text stats # Display video count
vid2text --db-path custom.db stats # Use a custom database
vid2text view # Launch the web interface (requires Datasette)
vid2text view --port 8080 # Specify a custom port
Configure the environment variables for enhanced control over the tool's operations:
| Variable | Default | Description |
|---|---|---|
VIDEO_DB_PATH | ~/.vid2text/knowledge.db | Location of the database file |
LOG_LEVEL | INFO | Adjust logging verbosity |
TRANSCRIPTION_ENGINE | Auto-detected | Choose between mlx-whisper or openai-whisper |
WHISPER_MODEL | Auto-selected | Specify the Whisper model to use |
For macOS (Apple Silicon) - MLX Whisper Models:
mlx-community/whisper-medium.en-mlx (default)mlx-community/whisper-large-v3-mlxmlx-community/whisper-small.en-mlxCross-Platform Models - OpenAI Whisper:
base.en (default)tiny.ensmall.enmedium.enlargevid2text youtube <url> - Transcribe a YouTube video.vid2text local <path> - Process a local video or folder.vid2text m3u8 <url> - Handle M3U8 stream transcriptions.vid2text process <config.yaml> - Execute batch processing based on your YAML configuration.vid2text stats - Check statistics on transcriptions stored in the database.vid2text view [--port PORT] - Open the Datasette web interface.For issues such as FFmpeg installation or memory-related problems during transcription, solutions and guidance are available in the README documentation.
No comments yet.
Sign in to be the first to comment.