📥 YouTube to MP3 / MP4
Download videos as MP4 or audio as MP3 — single videos and full playlists with batch download.
About YouTube Downloader
Want to save a YouTube video for offline viewing, or extract just the audio as an MP3 to listen on the go? Paste the video URL, choose whether you want the full MP4 video or audio-only MP3, and download it directly. Playlist support lets you queue up an entire playlist for batch download — handy for saving a full course, album, or video series at once.
This connects to a backend server that handles the download and sends the file back to you, so it works without any browser extensions or software installs. Great for saving educational content, lectures, music, and tutorials for offline access. Please only download content you have the right to use — respect copyright and the platform's terms of service.
🔧 Under Maintenance — YouTube downloads need a one-time cookie setup (operator: click to expand)
YouTube blocks downloads from datacenter/VPS IPs with a
"Sign in to confirm you're not a bot" check. The PO-token provider
(office-tools-pot) is running and healthy, but on a flagged server IP
that alone is not enough — YouTube requires authenticated cookies.
There is no fully autonomous way to mint these on the server: the
initial Google login must be done by a human (Google's login flow blocks datacenter
logins with CAPTCHA/2FA). Cookies then last weeks, not forever, and must be re-exported
when downloads start failing again.
① Create cookies (one time, on your local computer)
- Use a throwaway Google account — never your real one. Server-side scraping can get the account flagged or banned.
- Install the "Get cookies.txt LOCALLY" browser extension.
- Open a private / incognito window and log into
youtube.comwith the burner account. - With a normal video open, click the extension → Export → save
cookies.txt(Netscape format). - Close the incognito window WITHOUT logging out. Logging out invalidates the session server-side — this is the #1 reason server cookies "work for an hour then die."
② Install on the server & enable
# after copying cookies.txt to the VPS (scp): install -o www-data -g www-data -m 600 cookies.txt /opt/office-tools/yt-server/cookies.txt grep -q '^YTDLP_COOKIES=' /opt/office-tools/yt-server/.env \ || echo 'YTDLP_COOKIES=/opt/office-tools/yt-server/cookies.txt' >> /opt/office-tools/yt-server/.env systemctl restart office-tools-cobalt curl -s http://127.0.0.1:9000/health # "cookies" should change from "none" to "file:ok"/"file:unchecked"
③ Renew (when the bot-check returns weeks later)
Health shows "cookies":"file:expired" or downloads fail again.
Re-export with the exact same incognito method above, then replace the file:
install -o www-data -g www-data -m 600 cookies.txt /opt/office-tools/yt-server/cookies.txt systemctl restart office-tools-cobalt
Note: yt-dlp rewrites rotated cookies back into this file on each use, so it must stay
writable by www-data. Cookie upkeep is inherent to running a YouTube
downloader from a server IP — it is not a bug in the tool.
⚙️ Advanced — server URL
Default: /yt-api/ — your self-hosted cobalt instance (deployed by deploy.sh step 1, proxied via nginx).
Change only if running cobalt on a custom port or path.