StreamHarvester is a single-file C++17 CLI tool for managing, downloading, and optionally converting media (video/audio) using yt-dlp and ffmpeg.
It organizes downloads into named URL lists, automatically bootstraps required tools into the internals/ directory (best-effort), displays live download progress, and removes entries from lists after successful downloads.
- Simple list-based workflows
- Repeatable, resumable downloads
- Minimal setup with optional media conversion (MP4 / MP3)
-
Named URL lists Lists are stored as plain text files in
internals/lists/<listname>.txt. -
Automatic cleanup URLs are removed from the list once the download completes successfully.
-
Automatic tool bootstrap (best-effort) Attempts to download
yt-dlpand installffmpeginto theinternals/directory. -
Persistent configuration User preferences are stored in
internals/config.cfg. -
Progress UI Parses yt-dlp output to display percentage, ETA, and an animated spinner.
-
Cross-platform support Works on Linux and Windows with ANSI-aware terminal output.
-
Media conversion support
- Video recoding:
--recode-video mp4 - Audio extraction:
-x --audio-format mp3
- Video recoding:
./StreamHarvester # compiled binary
./StreamHarvester.cpp # source file
downloads/ # final downloaded & converted media
internals/
yt-dlp # yt-dlp executable
ffmpeg # ffmpeg executable
config.cfg # persistent configuration
lists/
movies.txt
podcasts.txt
- C++17-compatible compiler (
g++,clang++, or MinGW) curlandtar(recommended on Linux)- PowerShell available on Windows (for ffmpeg installation)
g++ -std=c++17 -O2 -Wall StreamHarvester.cpp -o StreamHarvesterg++ -std=c++17 -O2 -Wall StreamHarvester.cpp -o StreamHarvester.exeOn first execution, StreamHarvester will:
-
Enable ANSI terminal output (when supported)
-
Create required directories:
internals/internals/lists/downloads/
-
Attempt to download
yt-dlp -
Attempt a best-effort installation of
ffmpeg -
Display an ASCII banner and launch the interactive menu
If automatic installation fails, use Menu → Ensure tools or install the binaries manually.
Run:
./StreamHarvester-
Manage lists Create, inspect, or delete named URL lists.
-
Add URL to a list Select a list and append one or more URLs.
-
Show lists and counts View all lists and the number of queued URLs.
-
Settings Configure:
- Mode:
video|audio - Quality:
best,720,1080, or custom - Target format:
original|mp4|mp3
Settings are stored in
internals/config.cfg. - Mode:
-
Ensure tools Retry installation of
yt-dlpandffmpeg. -
Start downloads for a list Download items sequentially with automatic list cleanup.
Main menu → 1 → n → my_series
Main menu → 2 → select my_series → add URLs
Main menu → 4 → configure mode / quality / format
Main menu → 5 → ensure tools (optional)
Main menu → 6 → start downloads
After a successful download, entries are removed from:
internals/lists/my_series.txt
Location: internals/config.cfg
mode=video
quality=best
format=original- Merging separate audio/video streams requires
ffmpeg - MP4 conversion uses
--recode-video mp4 - MP3 extraction uses
-x --audio-format mp3 - Progress display depends on yt-dlp output format and is best-effort
sudo apt install ffmpegOr place ffmpeg / ffmpeg.exe manually inside internals/.
curl -L -o internals/yt-dlp \
https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
chmod +x internals/yt-dlpUse StreamHarvester only for media you are legally allowed to download. Always respect copyright laws and platform Terms of Service.
StreamHarvester does not bypass DRM or platform protections.
- Parallel downloads
- Non-interactive batch mode
- Cookies and authenticated sessions
- Logging and verbose/debug mode
- Improved TUI (ncurses-style interface)
