Skip to content

Fx64b/video-archiver

Repository files navigation

Video Archiver

A self-hosted YouTube video archiver with a modern web interface. Download, manage, and organize your YouTube videos, playlists, and channels locally.

Caution

This project is in early development (alpha stage). It may contain bugs, break unexpectedly, or have incomplete features. Use at your own risk.

Features

Current Features

  • Download videos from YouTube URLs
  • Real-time download progress tracking
  • Basic queue management
  • Modern web interface built with Next.js and shadcn/ui
  • Dark/Light mode support

Planned Features

  • Advanced download options (quality selection, format selection)
  • Media conversion tools (video to audio, format conversion)
  • Metadata extraction and management
  • Search and categorization
  • Mobile-friendly streaming interface

Prerequisites

  • Docker and Docker Compose
  • Git
  • Bash shell (for running the management script)

Quick Start

  1. Clone the repository:
git clone https://github.com/Fx64b/video-archiver.git
cd video-archiver
  1. Set .env variables:
cp web/.env.local.example web/.env.local
  1. Start the application:
./run.sh

The web interface will be available at http://localhost:3001

Run Script Options

The run.sh script provides several options to manage the application:

./run.sh [options]

Options:
  --clear    Clear the database and downloads
  --build    Rebuild the containers and regenerate TypeScript types
  --debug    Enable debug logging in backend
  --help|-h  Show help message

Common use cases:

  • Fresh start: ./run.sh --clear --build
  • Development: ./run.sh --build --debug
  • Production: ./run.sh

Project Structure

  • /services/backend: Go backend service
    • Handles video downloads
    • Manages download queue
    • Provides WebSocket updates
  • /web: Next.js frontend application
    • Modern UI built with shadcn/ui
    • Real-time progress tracking
    • Download management interface

Know Issues

403 Error when Downloading

After a certain number of downloads, YouTube may block requests that are not made through the official site or app. This is a known issue: yt-dlp/yt-dlp#11868 Temporary solutions:

  • Use a VPN and switch servers when the limit is reached
  • Wait a few hours before attempting downloads again
  • Use a different IP address if possible

Development

The project uses:

  • Backend: Go 1.23 with Chi router
  • Frontend: Next.js 15 with TypeScript
  • UI: shadcn/ui components
  • State Management: Zustand
  • Real-time Updates: WebSocket
  • Database: SQLite

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'feat(scope): Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Acknowledgments

  • yt-dlp for video downloading capabilities
  • shadcn/ui for the beautiful UI components