Skip to content

Repository files navigation

YouTube Channel Library

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.

Features

  • 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

Tech Stack

Backend: Python, FastAPI, Uvicorn, yt-dlp, SQLite
Frontend: React, Vite, React-Bootstrap

Installation

Prerequisites

  • Python 3.8+
  • Node.js 16+

Setup Steps

  1. Clone the repository:
git clone <repository-url>
cd retrieve_video_info_YouTube_channel
  1. Set up Python environment and dependencies:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Install frontend dependencies:
cd frontend
npm install
cd ..
4. Build the frontend for production:
```bash
cd frontend
npm run build
cd ..

Configuration

Create a .env file in the project root (optional):

DOWNLOAD_DIR=/path/to/download/folder
GOOGLE_API_KEY=your_google_genai_api_key

Configuration details:

  • DOWNLOAD_DIR: Where video files are downloaded. Defaults to system Downloads folder if not set.
  • GOOGLE_API_KEY: Required only for AI transcript Q&A feature. Can be omitted if not needed.
  • Database location: youtube.db is auto-created in the download directory.

Running the Application

  1. Activate your virtual environment:
source .venv/bin/activate
  1. Start the application:
python run.py

This starts the unified server, serving both the API and frontend UI at:

  • http://localhost:8000
  1. Open http://localhost:8000 in your browser to use the application.

  2. Stop the server with Ctrl+C.

Troubleshooting

Port conflicts: If port 8000 is already in use:

# Find and kill process on port 8000
kill $(lsof -ti:8000)

About

A Python tool for efficiently retrieving, storing, and managing metadata for all videos from a YouTube channel. Functionalities applied via Streamlit.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages