How to Download Porn Videos with yt-dlp

yt-dlp is the free, open-source command-line tool NSFWDL itself runs on. These are the commands that work on the big adult sites right now – each fix below is one NSFWDL needed to keep its 20 site downloaders working.

No terminal? Use the NSFWDL downloader

  1. Install yt-dlp with curl_cffi. One pip command installs yt-dlp together with curl_cffi, the library PornHub and xHamster need.
  2. Install FFmpeg. yt-dlp uses it to join video that arrives in pieces, or as separate picture and sound.
  3. Run yt-dlp with the video page link. Paste the address of the video page, not a link copied from inside the player.

Install yt-dlp the way adult sites need it

Install yt-dlp with Python's pip and include the curl_cffi extra. It lets yt-dlp look like a real Chrome browser to the site; PornHub and xHamster refuse plain requests without it. With curl_cffi installed, yt-dlp uses it for those sites on its own.

You also need FFmpeg on the same computer. Many adult sites stream video as short pieces, and Reddit sends picture and sound separately; FFmpeg is what joins them into one MP4.

pip install -U "yt-dlp[default,curl-cffi]"
yt-dlp --list-impersonate-targets

The basic commands

Give yt-dlp the page link and it saves the best version it finds. To see every version first, list the formats with -F. To cap the quality – 720p is a good size for a phone – sort by resolution with -S. A clean file name with the video's ID saves you renaming later.

yt-dlp "https://www.pornhub.com/view_video.php?viewkey=..."
yt-dlp -F "https://www.pornhub.com/view_video.php?viewkey=..."
yt-dlp -S "res:720" -o "%(title)s [%(id)s].%(ext)s" "https://www.pornhub.com/view_video.php?viewkey=..."

Faster PornHub downloads with -N

PornHub's servers cap each connection to its ready-made MP4 files below 1080p at roughly 500 KB/s, so a 200 MB video in 720p would take about seven minutes in one piece. For most PornHub videos yt-dlp picks the streamed (HLS) version instead, which is split into many small pieces – but it fetches them one at a time unless you tell it otherwise. Let it download eight pieces at once with -N:

yt-dlp -S "res:720" -N 8 "https://www.pornhub.com/view_video.php?viewkey=..."

RedTube and YouPorn need a Referer

The video servers of RedTube and YouPorn refuse a file request that doesn't say which page it came from – both answer 410 Gone. yt-dlp doesn't send that information by default, so add it yourself. Even with it, RedTube's servers sometimes refuse for a few minutes at a time; try again later if a download still fails.

yt-dlp --add-headers "Referer:https://www.redtube.com/" "https://www.redtube.com/123456789"
yt-dlp --add-headers "Referer:https://www.youporn.com/" "https://www.youporn.com/watch/123456789/..."

Reddit now needs your login cookies

Since October 2026 Reddit answers requests from many servers with a bot check, and yt-dlp then stops with "Account authentication is required". Passing the cookies of a browser where you are logged in to Reddit fixes it. Use a separate Reddit account if you download a lot – Reddit can lock accounts it sees as automated.

yt-dlp --cookies-from-browser firefox "https://www.reddit.com/r/.../comments/..."

Whole playlists, model pages and albums

yt-dlp can save every video from a PornHub playlist or model page and every clip of a RedGifs user in one go; give it the list's address instead of a single video. Add a pause between videos so the site doesn't block you halfway. For Erome albums, gallery-dl – yt-dlp's sister tool for galleries – saves every photo and video of the album.

yt-dlp --sleep-interval 5 -o "%(uploader)s/%(title)s [%(id)s].%(ext)s" "https://www.pornhub.com/model/NAME/videos"
pip install -U gallery-dl
gallery-dl "https://www.erome.com/a/ALBUMID"

When yt-dlp fails on an adult site

  • HTTP Error 403 or a Cloudflare page: update yt-dlp and curl_cffi with the pip command above; adult sites change their protection often.
  • "Account authentication is required": the video – or, on Reddit, the site – needs a logged-in session; pass --cookies-from-browser.
  • "No video formats found" or "Unable to extract": the site changed its pages. Update yt-dlp; fixes usually ship within days.
  • You get a video without sound, or separate video and audio files: FFmpeg is missing, so yt-dlp couldn't join them.
  • "Video unavailable" or 404: the video was removed, and no tool can bring it back.

When a web downloader is the easier choice

yt-dlp is the most flexible option on a computer, but it needs Python, FFmpeg, regular updates and the fixes above. On a phone, or for one video now and then, a web downloader does the same work in a browser tab: NSFWDL runs yt-dlp on its server with all of these settings already applied, joins the pieces and hands you one MP4 – with no install on iPhone, Android or PC.

Questions about this guide

Is yt-dlp safe to use for porn sites?

yt-dlp itself is open source and shows no ads. Download it only from PyPI (pip) or its official GitHub page; copies bundled in random installers are where the risk is.

Why does yt-dlp fail on PornHub?

Usually because curl_cffi is missing or yt-dlp is out of date. Install it with the curl-cffi extra and update it regularly.

Can I use yt-dlp on my phone?

On Android, through the Termux app; on an iPhone not in any practical way. In both cases a web downloader in the browser is simpler.

How do I download a whole PornHub playlist?

Give yt-dlp the playlist or model page address instead of a single video, and add --sleep-interval so PornHub doesn't block you.