SpotiStream is an interactive Python command-line application for finding and downloading audio or video from YouTube. It can build a download list from a Spotify playlist, a YouTube URL or search, a CSV/TXT file, or manually entered song and artist names.
Current release: SpotiStream 1.4.0 on PyPI — released September 16, 2026.
Important
Spotify is used only to read playlist metadata. Downloadable media is located through YouTube. Only download content when you have permission, and follow the terms and laws that apply to you.
- Read playlists from Spotify and save their song lists as CSV files.
- Accept a YouTube video, playlist, channel, URL, or search query.
- Download audio as MP3 or download video with its audio stream.
- Search for a video using a song and artist name.
- Select best available, 4K, 1440p, 1080p, 720p, 480p, or 360p video quality.
- Fall back to a lower available resolution when the requested quality is unavailable.
- Retry refreshed YouTube streams and alternate formats after HTTP 403 failures.
- Accept bulk song lists from CSV and TXT files.
- Preserve useful YouTube titles and sanitize filenames for the operating system.
- Skip files and duplicate playlist entries that have already been handled.
- Show live audio/video size, speed, ETA, merge status, playlist progress, and a final result summary.
- Diagnose the local installation with
spotistream doctor. - Stop cleanly when
Ctrl+Cis pressed.
- Python 3.11 or newer
- FFmpeg for audio conversion and video/audio merging
- Deno for yt-dlp's YouTube JavaScript challenge solver
- A Spotify Developer application only when using Spotify playlists
The Python dependencies include Spotipy, yt-dlp with its EJS support, imageio-ffmpeg, Requests, and Rich.
python -m pip install --upgrade spoti-streamVersion 1.4.0 includes the spotistream command, system doctor, Rich download progress, playlist summaries, expanded video quality selection, and updated YouTube challenge support.
git clone https://github.com/mehmoodulhaq570/SpotiStream.git
cd SpotiStream
python -m venv .venvActivate the virtual environment on Windows PowerShell:
.\.venv\Scripts\Activate.ps1Activate it on macOS or Linux:
source .venv/bin/activateInstall SpotiStream and create the spotistream command:
python -m pip install -e .For a non-editable installation, use python -m pip install . instead.
On Windows:
winget install --id DenoLand.Deno --exactRestart the terminal after installation. For other platforms, follow the official Deno installation guide.
SpotiStream uses the FFmpeg executable supplied by imageio-ffmpeg when a system installation is unavailable. Run the doctor command after setup to confirm that FFmpeg and Deno can be detected.
Open the interactive menu:
spotistreamThe module form remains supported:
python -m spoti_streamCheck the installation:
spotistream doctorShow command help:
spotistream --helpspotistream doctor checks:
- Python and its version
- yt-dlp
- the yt-dlp EJS challenge solver
- FFmpeg
- Deno
- the optional Spotify credentials file
Example:
SpotiStream System Check
✓ Python 3.14.0
✓ yt-dlp 2026.8.19
✓ yt-dlp-ejs 0.8.0
✓ FFmpeg 7.1
✓ Deno 2.9.6
! Spotify Not configured (optional)
✓ SpotiStream is ready to download.
Missing required components produce a recommendation and a non-zero exit status. Missing Spotify credentials do not make the system unhealthy because Spotify support is optional.
Running SpotiStream without a command presents seven choices:
- Use a Spotify playlist — authenticate, select one of your playlists, export its track list to CSV, and download its songs.
- Provide a CSV or TXT file — download every valid song and artist entry in the file.
- Manually type song names — download individual songs until
qis entered. - Download audio from YouTube input — accept a video, playlist, channel, URL, or search query and save MP3 audio.
- Download a video by song name — search using a song and artist, then select the desired quality.
- Download videos from YouTube input — accept a video, playlist, channel, URL, or search query and select the desired quality.
- Exit from SpotiStream.
A video download can contain separate video and audio streams. SpotiStream tracks both streams and their merge operation:
Video ━━━━━━━━━━━━━━━━━╺━━━━━━ 74% 31.2/42.1 MiB 2.8 MiB/s 00:04
Audio ━━━━━━━━━━━━━━━━━━━━━━━━ 100% 3.5/3.5 MiB
Merging ━━━━━━━━━━━━━━━━━━━━━━━━ 100% Complete
Playlist downloads show the overall count and current item, followed by a summary:
Playlist: Favourite Songs
Overall ━━━━━━━━━━━━━━━╺━━━━━━━━ 60% 6/10 items
Current ━━━━━━━━━━━━━━━━━╺━━━━━━ 68% 4.1 MiB/s 00:12
✓ Downloaded 5
⊘ Skipped 1
✗ Failed 0
The exact appearance depends on the terminal width and Unicode support.
CSV files must contain the exact headers Song Name and Artist Name:
Song Name,Artist Name
Agar Tum Saath Ho,Alka Yagnik
Kun Faya Kun,A. R. RahmanTXT files use one Song Name - Artist Name entry per line:
Agar Tum Saath Ho - Alka Yagnik
Kun Faya Kun - A. R. Rahman
Spotify credentials are needed only for menu option 1.
- Open the Spotify Developer Dashboard.
- Create an application and copy its Client ID and Client Secret.
- Configure
http://localhost:8888/callbackas the application's redirect URI. - Start SpotiStream and select the Spotify playlist option.
- Enter the credentials when prompted and finish authorization in the browser.
The credentials are saved as two lines in spotify_credentials.txt in the current working directory:
YOUR_CLIENT_ID
YOUR_CLIENT_SECRET
Caution
This file contains a secret in plain text. Do not commit it, publish it, or share it. Add it to your local Git exclusions if you create the file inside a repository.
Spotify authentication includes timeout safeguards for API requests. The credentials file is optional; if it is absent, SpotiStream prompts for the values.
- Audio files are written to
songs/as MP3 files. - Video files are written to
videos/, normally as merged MP4 files. - Spotify playlist track lists are exported as
<playlist name>.csvin the current directory. - Existing destination files are skipped rather than downloaded again.
All relative output paths are based on the directory from which SpotiStream is launched.
The quality menu offers:
| Choice | Requested quality |
|---|---|
| 1 | Best available / HD |
| 2 | 4K / 2160p |
| 3 | 1440p |
| 4 | 1080p |
| 5 | 720p |
| 6 | 480p |
| 7 | 360p |
The requested quality is a maximum preference, not a guarantee. For example, selecting 4K for a source whose highest available stream is 1080p results in a 1080p download. SpotiStream prints the selected video and audio format before downloading.
Update yt-dlp and its EJS solver together:
python -m pip install -U "yt-dlp[default]"Confirm Deno is installed, restart the terminal, and run:
spotistream doctorSpotiStream refreshes the selected stream up to three times before trying automatic selection, MP4 up to 1080p, and a best-muxed fallback. The final quality may therefore be lower than requested.
Activate the virtual environment in which SpotiStream was installed. You can always use the module form:
python -m spoti_stream
python -m spoti_stream doctorReinstall the Python dependencies first:
python -m pip install -r requirements.txtIf the doctor still reports FFmpeg as missing, install FFmpeg for your operating system and ensure its executable is available on PATH.
- Confirm the Client ID and Client Secret are correct.
- Confirm
http://localhost:8888/callbackexactly matches the configured redirect URI. - Delete or correct
spotify_credentials.txtif it contains outdated values. - Make sure the local callback port
8888is available.
spoti_stream/
├── __main__.py CLI entry point and interactive menu
├── diagnostics.py System doctor checks
├── downloader.py YouTube resolution and download logic
├── progress.py Rich progress display and playlist summaries
├── spotify_utils.py Spotify authentication and playlist access
└── converter.py FFmpeg conversion helper
- Embed track metadata and cover artwork in downloaded audio.
- Add JSON and XLSX input formats.
- Add persistent configuration for quality and output directories.
- Add a download archive for reliable cross-session duplicate detection.
- Add automated tests and continuous integration.
Bug reports and pull requests are welcome through the GitHub repository.
See the 1.4.0 release notes or the complete CHANGELOG.md for the history of notable changes.
SpotiStream is available under the MIT License.