Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/mr-sunset/youtube-rip/llms.txt

Use this file to discover all available pages before exploring further.

This page walks you through every step of a YouTube Rip session — from launching the script to locating the downloaded MP3 in your Downloads folder. The script is intentionally minimal: two dialogs, one shell command, and one output file.

Launching the script

There are three ways to run YouTube Rip.applescript on macOS.
1

Script Editor (Run button)

Open YouTube Rip.applescript in Script Editor (found in /Applications/Utilities/). Click the Run (▶) button in the toolbar. The script executes immediately in the Script Editor session.
2

Saved Application bundle

In Script Editor, choose File → Export, set Format to Application, and save. The resulting .app bundle can be double-clicked from Finder, added to the Dock, or launched from Spotlight — no Script Editor window required.
3

Terminal with osascript

Run the script directly from any Terminal session using osascript:
osascript "/path/to/YouTube Rip.applescript"
Replace /path/to/ with the actual folder where the file lives, for example ~/Downloads/youtube-rip/.
Save the script as an Application using Script Editor’s Export feature so you can run it from Spotlight or the Dock without opening Script Editor each time.

The URL dialog

When the script starts it immediately calls display dialog with the title YouTube Rip and a speaker icon drawn from macOS’s built-in GenericSpeaker.icns. A dialog box appears with the prompt:
Enter the video URL:
The input field is pre-filled with https://youtu.be/ as the default answer. Paste or type the full YouTube URL you want to download — any format YouTube accepts works, including:
  • https://youtu.be/dQw4w9WgXcQ
  • https://www.youtube.com/watch?v=dQw4w9WgXcQ
Click OK to confirm. The entered URL is captured and passed directly to yt-dlp.

What happens next

After you click OK, the script builds and runs the following shell command in the background via AppleScript’s do shell script:
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"; \
yt-dlp -x --audio-format mp3 -P "$HOME/Downloads" \
  --extractor-args "youtube:player_client=default,-android_sdkless" \
  "https://youtu.be/YOUR_VIDEO_ID"
A few things worth noting about what this command does:
  • PATH export — The script prepends both /opt/homebrew/bin (Apple Silicon Homebrew) and /usr/local/bin (Intel Homebrew) to $PATH so that yt-dlp can be found regardless of which Homebrew installation you have.
  • -x --audio-format mp3 — Tells yt-dlp to extract audio only and re-encode it as an MP3.
  • -P "$HOME/Downloads" — Sets the output directory to your Downloads folder.
  • --extractor-args "youtube:player_client=default,-android_sdkless" — Avoids the android_sdkless player client, which can trigger HTTP 403 errors from YouTube.
No progress bar is shown while this runs. Depending on video length and your connection speed, the command typically takes 10–60 seconds. For longer videos (30 minutes or more) it may take several minutes. The script will appear to do nothing during this time — that is expected.

The output dialog

Once yt-dlp finishes, the script displays a second display dialog showing:
Shell stdout: <yt-dlp output>
This dialog uses macOS’s BurningIcon.icns — a burning CD icon — as its icon. The body of the dialog is the raw standard output that yt-dlp printed to the shell. A successful run typically looks similar to:
[youtube] Extracting URL: https://youtu.be/dQw4w9WgXcQ
[youtube] dQw4w9WgXcQ: Downloading webpage
[youtube] dQw4w9WgXcQ: Downloading ios player API JSON
...
[ExtractAudio] Destination: /Users/yourname/Downloads/Rick Astley - Never Gonna Give You Up.mp3
If the output contains an error message (such as ERROR: or HTTP Error 403) rather than the usual download log, see the Troubleshooting page. Click OK to dismiss the dialog.

Finding your MP3

The finished file lands in your Downloads folder~/Downloads, which resolves to /Users/<your-username>/Downloads. yt-dlp names the file after the video title, so the filename will typically be something like:
Rick Astley - Never Gonna Give You Up (Official Music Video).mp3
The filename is derived from the video’s metadata, so it may be long or contain special characters. If you cannot locate the file by name, open Finder, navigate to Downloads, and sort by Date Modified descending — the new MP3 will appear at the top.

Build docs developers (and LLMs) love