A full-stack application for building a personal, local library of YouTube content. Fetch and store metadata, transcripts, and video information from any YouTube channel, playlist, or video using a Python/FastAPI backend and React frontend.
- URL-based intake: Paste any YouTube URL (channel/video/playlist) to fetch and store metadata
- Local storage: SQLite database with cached thumbnails and complete metadata
- Video transcripts: Auto-fetched with chapter breakdown when available
- AI Q&A: Ask questions about video transcripts using Google GenAI (optional)
- Media tracking: Track downloads and manage local file paths
- Refresh on demand: Update video metadata and transcripts as needed
Backend: Python, FastAPI, Uvicorn, yt-dlp, SQLite
Frontend: React, Vite, React-Bootstrap
- Python 3.8+
- Node.js 16+
- Clone the repository:
git clone <repository-url>
cd retrieve_video_info_YouTube_channel- Set up Python environment and dependencies:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Install frontend dependencies:
cd frontend
npm install
cd ..
4. Build the frontend for production:
```bash
cd frontend
npm run build
cd ..Create a .env file in the project root (optional):
DOWNLOAD_DIR=/path/to/download/folder
GOOGLE_API_KEY=your_google_genai_api_keyConfiguration details:
DOWNLOAD_DIR: Where video files are downloaded. Defaults to systemDownloadsfolder if not set.GOOGLE_API_KEY: Required only for AI transcript Q&A feature. Can be omitted if not needed.- Database location:
youtube.dbis auto-created in the download directory.
- Activate your virtual environment:
source .venv/bin/activate- Start the application:
python run.pyThis starts the unified server, serving both the API and frontend UI at:
http://localhost:8000
-
Open
http://localhost:8000in your browser to use the application. -
Stop the server with
Ctrl+C.
Port conflicts: If port 8000 is already in use:
# Find and kill process on port 8000
kill $(lsof -ti:8000)