@jakende/media-info-cli
v0.1.5
Published
Terminal app for downloading media from YouTube or RSS feeds, converting to MP3, and generating Whisper transcripts.
Readme
Media Information Download
Terminal application for downloading media from YouTube URLs or RSS feeds, converting audio to MP3, and generating Whisper Markdown transcripts.
Requirements
- Python 3.10+
- ffmpeg on PATH
- A terminal with ANSI escape support for the framed TUI. macOS Terminal, iTerm2, Windows Terminal, and current PowerShell terminals are supported.
macOS:
brew install ffmpeg
ffmpeg -versionWindows:
winget install Gyan.FFmpeg
ffmpeg -versionPython dependencies are installed into the project-local .venv folder. Run commands from this folder so the local environment is used.
macOS Setup
Option 1, installer script:
zsh scripts/install_macos.sh
./run.shOption 2, manual setup:
brew install ffmpeg
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-transcribe.txtOptional editable install:
source .venv/bin/activate
pip install -e ".[transcribe]"Windows Setup
Use Windows Terminal or PowerShell. Install Python 3.10+ and ffmpeg first, then use the local project environment.
Option 1, installer script:
winget install Python.Python.3.12
winget install Gyan.FFmpeg
powershell -ExecutionPolicy Bypass -File .\scripts\install_windows.ps1
.\run.ps1Option 2, manual setup:
py -3 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements-transcribe.txt
.\.venv\Scripts\python.exe -m pip install -e ".[transcribe]"
.\.venv\Scripts\python.exe media_tui.pyAfter editable install, these console commands are available inside the active environment on both platforms:
media-information-download
media-info-download
media-info-clinpm Install
The package is also published as an npm CLI wrapper. It still requires Python 3.10+ and ffmpeg on PATH.
npm install -g @jakende/media-info-cli
media-info-cliOn first run, the npm wrapper creates a Python virtual environment in ~/.media-information-download/venv and installs the Python dependencies there. Npm installs write generated media and transcripts to ~/.media-information-download/output by default.
To create a Desktop alias/shortcut to the output folder:
media-info-cli --desktop-output-aliasTo use a different venv or output location:
MEDIA_INFORMATION_DOWNLOAD_VENV=/path/to/venv media-information-download
MEDIA_OUTPUT_DIR=/path/to/output media-information-downloadTUI
./run.shor:
source .venv/bin/activate
python3 media_tui.pyOn Windows:
.\run.ps1If the project is installed into the active environment, you can also run:
media-information-download
media-info-cliThe TUI lets you choose YouTube or RSS input, start downloads, watch progress messages, trigger transcription, and list or open generated files.
Long-running download, MP3 conversion, and transcription steps show a visible WORKING activity bar while active.
Interactive screens render inside a left-aligned framed viewport that resizes with the current terminal window.
Keyboard controls:
- Navigation controls are shown at the bottom of the active menu or submenu
- Up/Down: move through selectable menu items
- Enter: select
- Backspace: go back from a submenu or choice screen
- Escape: cancel/back from submenus; quit from the main menu
- URL entry screens show their own controls: type or paste text, Enter continues, Backspace/Escape goes back
- Paste is supported in URL entry screens, including terminal bracketed paste, macOS clipboard paste, and Windows clipboard paste with Ctrl+V in PowerShell/Windows Terminal
For multiple YouTube URLs, separate entries with commas, spaces, or line breaks:
https://youtu.be/VIDEO_ONE
https://www.youtube.com/watch?v=VIDEO_TWO, https://youtu.be/VIDEO_THREENon-Interactive Usage
Download and transcribe a YouTube URL:
python3 media_tui.py --source youtube --url "https://www.youtube.com/watch?v=VIDEO_ID"Download and convert a YouTube URL to MP3 without transcription:
python3 media_tui.py --source youtube --url "https://www.youtube.com/watch?v=VIDEO_ID" --no-transcribeDownload supported media from an RSS feed and transcribe it:
python3 media_tui.py --source rss --url "https://example.com/feed.xml"Compatibility commands still work:
python3 youtube_download.py --url "https://www.youtube.com/watch?v=VIDEO_ID"
python3 youtube_download_transcribe.py --url "https://www.youtube.com/watch?v=VIDEO_ID"Configuration
MEDIA_OUTPUT_DIR: output folder. Defaults to./outputYTDL_OUTPUT_DIR: legacy output folder fallbackWHISPER_MODEL: Whisper model. Defaults tolargeWHISPER_LANGUAGE: optional language code. If unset, Whisper auto-detects languageYTDL_COOKIES_FROM_BROWSER: optional browser cookies for YouTube, for examplesafariorchrome
All generated audio is saved as .mp3. Non-MP3 RSS downloads are converted and removed as intermediates, so new RSS audio output does not remain as .wav. Transcripts are saved as .md next to the MP3 files.
Architecture
media_tui.py: direct script entry pointyoutube_download.py: compatibility entry point for YouTube download and MP3 conversionyoutube_download_transcribe.py: compatibility entry point for YouTube download, MP3 conversion, and transcriptionmedia_information_download/sources/: input source handling for YouTube and RSSmedia_information_download/downloaders/: YouTube and HTTP media downloadersmedia_information_download/audio.py: audio extraction and MP3 conversionmedia_information_download/transcription.py: Whisper model loading and transcription, adapted from the macOS transcription workflowmedia_information_download/output.py: Markdown transcript and output file handlingmedia_information_download/pipeline.py: orchestration across source, download, conversion, transcription, and outputmedia_information_download/tui.py: terminal UI and non-interactive CLI entry point
This structure keeps new media sources or formats isolated to source handlers, downloaders, and supported format lists.
License
MIT. See LICENSE.
