TUBEDJ

Downloading & converting YouTube tracks

Tube DJ runs in your browser. It plays YouTube through YouTube's own player, and this site never downloads or converts anything. Browsers can't save YouTube audio, and YouTube doesn't allow it.

A YouTube track as a local audio file gets exact BPM and key, a waveform and beat-synced mixing. If you want that, you do the download yourself, on your own computer, with one of the options below. Then drop the files into Tube DJ.

Downloading may break YouTube's Terms of Service. Only download music you have the right to, such as your own uploads, Creative Commons tracks, or anything the artist lets you download.

Option 1: the Tube DJ convert script

A small script you run in a terminal. Give it a YouTube link and it saves an mp3.

  1. Install Node.js 20 or newer, plus ffmpeg for mp3 output. Without ffmpeg the script saves the original .m4a/.webm audio, and Tube DJ plays that too.
    macOS
    brew install node ffmpeg
    Windows
    winget install OpenJS.NodeJS.LTS Gyan.FFmpeg
    Linux
    sudo apt install nodejs ffmpeg
    Or get Node from nodejs.org. Check your version with node --version.
  2. Download the script: ⇩ tubedj-convert.mjs
  3. Open a terminal in the folder you saved it to (usually Downloads):
    cd ~/Downloads
  4. Run it with a YouTube link. The mp3 is saved next to the script:
    node tubedj-convert.mjs "https://www.youtube.com/watch?v=VIDEO_ID"
    Several links at once, saved into a folder:
    node tubedj-convert.mjs "LINK_1" "LINK_2" -o my-set
    --raw skips ffmpeg and keeps YouTube's original audio. --help lists all options. Playlist links aren't supported, so pass the individual video links.
  5. Drop the files onto this page, or use browse under “Local audio files”.

Option 2: convert from inside the app (local companion server)

Run the Tube DJ server on your computer. Convert buttons then appear here, and converted tracks swap in automatically. You need git and Node.js 20+. ffmpeg comes bundled.

git clone https://github.com/ahhh/youtube_dj.git cd youtube_dj/server npm install npm start

Leave that running. Then open http://127.0.0.1:8000, or connect this page to it:

Not connected.
If Chrome asks whether this site may access devices on your local network, allow it. The server only accepts this page if its address is on the server's allow-list.

Option 3: already use yt-dlp?

yt-dlp works too, and it handles playlists. See its install instructions.

yt-dlp -x --audio-format mp3 "https://www.youtube.com/watch?v=VIDEO_ID"
Collapsed. Click to add more music or analyze.

1Add music

Local audio files Drop files anywhere on the page, or Decoded and analyzed in full: more accurate BPM/key, plus beat-synced mixing. Want YouTube tracks as files?

2Analyze BPM & key

For YouTube tracks, Chrome or Edge will ask to share this tab. Keep “Also share tab audio” checked. Each video plays briefly in the small player and gets sampled; nothing leaves your browser. Results are cached, so a track is only analyzed once.

3Preview & log

DecksA · crossfader · B
AB

Flow & ordering

How the set is ordered. Next picks re-score live; Re-order upcoming applies it to the set.

Transitions

Applies to every mix, YouTube and local.

Tempo & key match

Local files and converted mp3s only. YouTube's player can't be stretched.