Search phrases inside YouTube videos, uploaded video and audio files using subtitles, comments, descriptions, and AI-powered semantic search.
β¨ Features β’
π§ How It Works β’
π οΈ Tech Stack β’
βοΈ Setup β’
- π Search phrases inside YouTube videos
- π¬ Search inside uploaded video files
- π§ Search inside uploaded audio files
- π Search using YouTube subtitles
- π¬ Search inside YouTube comments
- π Search inside video descriptions
- π§ AI-powered semantic search
- π Multi-language subtitle support
- ποΈ Local transcription using Faster-Whisper
- π₯ Download subtitles as text files
- β‘ Fast and lightweight Flask web interface
VidPhrase supports multiple search methods.
Search directly inside:
- YouTube subtitles
- YouTube comments
- Video descriptions
- Uploaded video transcriptions
- Uploaded audio transcriptions
Even if the phrase contains typos or slightly different wording, fuzzy matching can still return relevant results.
VidPhrase can search by meaning, not only by exact keywords.
The AI understands:
- synonyms and paraphrases
- abbreviations and acronyms
- broader and narrower concepts
- technologies, products, services, and brands related to the query
- explanations and examples that imply the same idea
- surrounding context even when the exact words never appear
Query
artificial intelligence
Possible matches:
- AI
- Machine Learning
- Deep Learning
- Neural Networks
- LLMs
- ChatGPT
- GPT
- Gemini
- Qwen
Query
cloud technologies
Possible matches:
- AWS
- Amazon Web Services
- Google Cloud
- Azure
- Kubernetes
- Docker
- Containers
- Serverless
- Cloud Infrastructure
- Virtual Machines
This allows you to discover moments that are conceptually related to your query instead of being limited to exact keyword matching.
- π Python
- π Flask
- πΊ yt-dlp
- ποΈ faster-whisper
- π thefuzz
- π€ Google GenAI
- πͺ browser-cookie3
- π§ Werkzeug
Download Python from:
https://www.python.org/downloads/
During installation, make sure to enable:
- β Add Python to PATH
- β Install pip
sudo apt update
sudo apt install python3 python3-pipWindows:
python --version
pip --versionLinux:
python3 --version
pip3 --versiongit clone https://github.com/yourusername/VidPhrase.git
cd VidPhrasepython -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtor
pip3 install -r requirements.txtVidPhrase uses Google Gemini for semantic search.
Open app.py and replace:
client = genai.Client(api_key="GEMINI_API_TOKEN")with your own API key:
api_key="YOUR_GEMINI_API_KEY"Without a valid Gemini API key, AI Semantic Search will not work.
YouTube sometimes rate-limits requests and yt-dlp may fail with:
HTTP Error 429: Too Many Requests
If this happens, generate fresh browser cookies by running:
python3 cookie_fetch_profiles.pyThe script automatically extracts YouTube cookies from available Chrome and Firefox profiles and saves them inside the cookies/ directory.
After generating the cookies, restart VidPhrase and try again.
Windows:
python app.pyLinux:
python3 app.pyOpen:
http://127.0.0.1:9005
- Open VidPhrase in your browser.
- Paste a YouTube link or upload a video/audio file.
- Enter the phrase you want to find.
- Choose the search method:
- π Subtitle Search
- π¬ Comment & Description Search
- ποΈ Whisper Transcription Search
- π§ AI Semantic Search
- Browse the results.
- Jump directly to the relevant moment and continue from the surrounding context.
VidPhrase/
βββ app.py
βββ cookie_fetch_profiles.py
βββ requirements.txt
βββ cookies/
β βββ cookies_1.txt
β βββ cookies_2.txt
β βββ cookies_3.txt
β βββ cookies_4.txt
β βββ cookies_fire.txt
βββ templates/
βββ static/
βββ README.md
reosjsonglobtempfileuuidshutilwarningsio.BytesIO
These modules are part of Python's standard library and do not need to be installed separately.
- Subtitle search uses fuzzy matching and may return closely related phrases.
- AI search is designed to find contextual and conceptual matches, not only exact words.
- Local video and audio files are automatically transcribed using Faster-Whisper.
- The application runs on port 9005 by default.
Made with β€οΈ to make searching through videos and audio effortless.
