Download a single YouTube URL as either:
- an
.mp4video with audio - an
.mp3audio file
This project uses yt-dlp and ffmpeg, wrapped in simple .command launchers so it can be used from Finder or Terminal.
This repo is meant to be:
- small
- easy to install
- easy to run
- easy to understand
No GUI app, no account setup, and no complicated config. Just install it, paste a YouTube link, and download the file.
video_audio.commanddownloads one video todownloads/videos/audio.commanddownloads one video as MP3 todownloads/audio/--no-playlistis enforced so one pasted URL stays one download- after each download, the prompt stays open so you can paste another URL
- works from Finder or Terminal
- includes a one-command installer for macOS
Open Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/JonathanBeck1/YoutubeDownloader/main/install.sh)"The installer will:
- Install Homebrew if it is missing
- Install
yt-dlp,ffmpeg, andgit - Clone or update this repo into
~/Documents/YoutubeDownloader - Create the
downloads/audioanddownloads/videosfolders - Mark the scripts as executable
- Open the project folder in Finder
After install, the project will live here:
~/Documents/YoutubeDownloaderIf you want to install it manually:
git clone https://github.com/JonathanBeck1/YoutubeDownloader.git ~/Documents/YoutubeDownloader
cd ~/Documents/YoutubeDownloader
./install.sh- Open
~/Documents/YoutubeDownloader - Double-click
audio.commandfor MP3 - Double-click
video_audio.commandfor MP4 - Paste a full YouTube URL
- Press
Return - Paste another URL when the download finishes, or type
EXITto quit
Saved files go here:
- MP3 downloads:
~/Documents/YoutubeDownloader/downloads/audio - MP4 downloads:
~/Documents/YoutubeDownloader/downloads/videos
Move into the project folder:
cd ~/Documents/YoutubeDownloaderPrompted mode:
./audio.command
./video_audio.commandWhen one download finishes, the script prompts again so you can keep pasting URLs. Type EXIT to stop.
Direct URL mode:
./audio.command "https://www.youtube.com/watch?v=VIDEO_ID"
./video_audio.command "https://www.youtube.com/watch?v=VIDEO_ID"You can also run the underlying scripts directly:
./ytaudio.sh "https://www.youtube.com/watch?v=VIDEO_ID"
./ytvideo.sh "https://www.youtube.com/watch?v=VIDEO_ID"The first time you open a .command file, macOS may block it.
If that happens:
- Right-click the file
- Click
Open - Click
Openagain in the confirmation dialog
macOS may also ask Terminal for access to your Documents folder. Allow that access so the downloaded files can be saved.
To update later:
cd ~/Documents/YoutubeDownloader
git pull --ff-only
brew upgrade yt-dlp ffmpegRun:
cd ~/Documents/YoutubeDownloader
./install.shRun:
cd ~/Documents/YoutubeDownloader
chmod +x *.command *.shRun the same launcher from Terminal so you can see the full output:
cd ~/Documents/YoutubeDownloader
./audio.commandor:
cd ~/Documents/YoutubeDownloader
./video_audio.command- make sure you pasted a full
https://URL - make sure the URL is for one video, not a playlist
- make sure Terminal was allowed to access
Documents
YoutubeDownloader/
├── audio.command
├── video_audio.command
├── ytaudio.sh
├── ytvideo.sh
├── ytcommon.sh
├── install.sh
├── downloads/
│ ├── audio/
│ └── videos/
├── LICENSE
└── README.md
Basic syntax check:
bash -n install.sh ytaudio.sh ytvideo.sh ytcommon.sh audio.command video_audio.commandOptional ShellCheck:
shellcheck install.sh ytaudio.sh ytvideo.sh ytcommon.sh audio.command video_audio.commandThis project is provided as-is for personal backup and educational use only. Downloading content from YouTube may violate YouTube's Terms of Service and local copyright law. You are responsible for how you use this project.
MIT. See LICENSE.