A local Streamlit application that provides YouTube video tools: thumbnail downloader and audio extractor.
-
πΈ Thumbnail Downloader
- Download high-quality thumbnails (up to 1920x1080)
- Multiple quality options (Max, High, Medium, Standard)
- Direct download links for each quality
-
π΅ Audio Extractor
- Extract audio from YouTube videos
- Play audio directly in the browser
- Display video metadata (title, duration, views, etc.)
- Download audio files
-
π³ Docker-based Backend
- yt-dlp API server running in Docker
- Easy setup and deployment
-
π» Simple Streamlit UI
- Clean tabbed interface
- Real-time API status check
- Frontend: Streamlit web application
- Backend: Flask API server running yt-dlp in Docker
- Audio Extraction: yt-dlp with ffmpeg
- Python 3.8+
- uv (recommended) or pip
- Docker and Docker Compose
- Git
- Clone the repository:
git clone <your-repo-url>
cd streamlit-video-snap- Install Python dependencies:
Using uv (recommended):
uv syncUsing pip:
pip install -r requirements.txt- Start the yt-dlp Docker server:
cd ytdlp-server
docker-compose up -d
cd ..- Verify the API server is running:
curl http://localhost:8080/healthYou should see: {"service":"yt-dlp-api","status":"ok"}
Using uv (recommended):
uv run streamlit run app.pyUsing pip:
streamlit run app.pyThen open your browser to: http://localhost:8501
- Switch to the "πΈ Thumbnail Downloader" tab
- Enter a YouTube video URL
- Click "Get Thumbnail"
- View thumbnails in multiple qualities
- Click download links to save thumbnails
- Switch to the "π΅ Audio Extractor" tab
- Enter a YouTube video URL
- Click "Extract Audio"
- View video information and metadata
- Play the audio directly in your browser
- Download the audio file if needed
The yt-dlp server provides the following endpoints:
GET /health- Health checkPOST /api/info- Get video metadataPOST /api/audio- Extract audio information and URL
PC λΆν μ μλμΌλ‘ μλ²λ€μ΄ μ€νλλλ‘ μ€μ ν μ μμ΅λλ€.
| μλ² | μλ μ€ν | μ€λͺ |
|---|---|---|
| Backend (Docker) | O | restart: unless-stopped μ€μ λ¨ |
| Frontend (Streamlit) | O | Windows μμ νλ‘κ·Έλ¨μ λ±λ‘λ¨ |
- Backend: Docker Desktopμ΄ λΆν
μ μλ μμλλ©΄,
unless-stoppedμ μ± μΌλ‘ 컨ν μ΄λλ μλ μμ - Frontend:
start-streamlit.batνμΌμ΄ Windows μμ νλ‘κ·Έλ¨μ λ±λ‘λμ΄ μλ μ€ν
powershell -ExecutionPolicy Bypass -File create-shortcut.ps1Windows μμ νλ‘κ·Έλ¨ ν΄λμμ λ°λ‘κ°κΈ° μμ :
Remove-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\YouTube-Tools-Streamlit.lnk"λλ Win + R β shell:startup β YouTube-Tools-Streamlit.lnk μμ
Win + R β shell:startup
| νμΌ | μ€λͺ |
|---|---|
start-streamlit.bat |
Streamlit μ€ν λ°°μΉ νμΌ |
create-shortcut.ps1 |
μμ νλ‘κ·Έλ¨ λ±λ‘ μ€ν¬λ¦½νΈ |
If the sidebar shows "API Server is not running":
cd ytdlp-server
docker-compose up -d
docker-compose logsCheck container status:
docker ps
docker logs ytdlp-serverRestart the container:
cd ytdlp-server
docker-compose restartSome audio formats may not play directly in the browser. Try downloading the audio file instead using the provided link.
streamlit-video-snap/
βββ app.py # Main Streamlit application
βββ pyproject.toml # Project configuration and dependencies (uv)
βββ requirements.txt # Python dependencies (pip)
βββ .python-version # Python version specification
βββ README.md # This file
βββ ytdlp-server/ # Docker-based yt-dlp API
βββ app.py # Flask API server
βββ Dockerfile # Docker image definition
βββ docker-compose.yml # Docker compose configuration
-
Stop Streamlit: Press
Ctrl+Cin the terminal -
Stop Docker container:
cd ytdlp-server
docker-compose downMIT
- This is a local-only application (not deployed to cloud)
- Audio extraction may take a few seconds depending on the video
- Some videos may be blocked due to geographic restrictions or copyright
- The extracted audio URL is temporary and expires after some time