yt2mp3

A CLI tool to download YouTube videos as MP3 files.
Installation
macOS (Apple Silicon)
-
Download yt2mp3-darwin-arm64 from Releases
-
Make the binary executable
chmod +x yt2mp3-darwin-arm64
- Handle security warning (first run only)
# Remove quarantine attribute to allow execution
xattr -d com.apple.quarantine yt2mp3-darwin-arm64
Linux (x86_64/ARM64)
-
Download the appropriate binary from Releases
- For x86_64:
yt2mp3-linux-amd64
- For ARM64:
yt2mp3-linux-arm64
-
Make the binary executable
chmod +x yt2mp3-linux-*
- (Optional) Move to a directory in your PATH
sudo mv yt2mp3-linux-* /usr/local/bin/yt2mp3
Windows
-
Download yt2mp3-windows-amd64.exe from Releases
-
Handle security warning
- When you first run the executable, Windows SmartScreen might show a warning
- Click "More info" and then "Run anyway" to proceed
- This warning appears because the executable is not signed with a certificate
-
(Optional) Add to PATH
- Move the executable to a permanent location (e.g.,
C:\Program Files\yt2mp3\)
- Add that location to your PATH environment variable
- This allows you to run the tool from any directory
Usage
macOS
# Check version
./yt2mp3-darwin-arm64 --version
# Download video as MP3
./yt2mp3-darwin-arm64 "https://www.youtube.com/watch?v=..."
# Download video as MP3 to specific directory
./yt2mp3-darwin-arm64 -o /path/to/output "https://www.youtube.com/watch?v=..."
Windows
# Check version
yt2mp3-windows-amd64.exe --version
# Download video as MP3
yt2mp3-windows-amd64.exe "https://www.youtube.com/watch?v=..."
# Download video as MP3 to specific directory
yt2mp3-windows-amd64.exe --output-dir C:\Music "https://www.youtube.com/watch?v=..."
Options
-o, --output-dir: 出力ディレクトリを指定(デフォルト: カレントディレクトリ)
-h, --help: ヘルプメッセージを表示
--version: バージョン情報を表示
Features
- Extract MP3 from YouTube videos
- Automatic ID3 tag setting (title, album, URL)
- QuickTime compatible tag format
- Automatic filename sanitization
- No external dependencies (yt-dlp included)
License
MIT License