No YouTube API key needed. This demo uses yt-dlp to fetch the best audio stream and FFmpeg to extract MP3.
⚠️ Legal note: Downloading YouTube content may violate YouTube’s Terms of Service and/or copyright law depending on your use and jurisdiction. This demo is for educational purposes. Ensure you have rights/permission before downloading.
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# Install FFmpeg (see below), then:
streamlit run app.pyThen paste a YouTube URL, choose an MP3 bitrate, and click Fetch & Convert. The app uses yt-dlp post-processing with FFmpeg to output MP3.
- macOS (Homebrew):
brew install ffmpeg
- Windows:
- Download a static build from https://www.gyan.dev/ffmpeg/builds/ (or via
winget install Gyan.FFmpeg). - Extract, then add the
binfolder (containingffmpeg.exe) to your PATH.
- Download a static build from https://www.gyan.dev/ffmpeg/builds/ (or via
- Linux (Debian/Ubuntu):
sudo apt update && sudo apt install -y ffmpeg
Verify:
ffmpeg -versionIf FFmpeg is not present, the app will still try to download but MP3 conversion will likely fail.
yt-dlp is actively maintained and more resilient to YouTube changes. It also supports robust post-processing via FFmpeg.
- SSL / TLS errors on macOS: ensure Python certificates are installed (
/Applications/Python*/Install Certificates.command). - Firewall / corporate network blocks: try a different network.
- Unicode filenames: the app sanitizes filenames for cross-OS safety.
Please respect creators, platforms, and laws. This demo is intended to showcase Streamlit UI, progress hooks, and simple media post-processing without any API keys.