-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
The extractor is attempting impersonation, but no impersonate target is available.
See https://github.com/yt-dlp/yt-dlp#impersonation for information on installing the required dependencies
What it means: yt-dlp needs to impersonate a browser's TLS fingerprint to access this site, but curl-cffi (the Python package that enables this) is not bundled in the free version.
Solutions:
-
Free version — Use the cookie-based workaround: log the user into the site in a WebView, export the session cookies, and pass them via
--cookies. -
Pro version — The Pro version bundles
curl-cfficompiled for Android (arm64-v8a), solving this permanently without cookies.
Possible causes and fixes:
| Cause | Fix |
|---|---|
| Session cookies expired | Re-export cookies after logging in again |
| Missing Referer header | request.addOption("--add-header", "Referer:https://example.com/") |
| Site requires impersonation | Use the Pro version |
| IP blocked | Use a proxy: request.addOption("--proxy", "socks5://...")
|
You called YtDlp.execute() or YtDlp.executeAsync() before YtDlp.init().
// Always initialize first, once, before any download
YtDlp.init(context);The progress callback is only called when yt-dlp outputs progress lines. Some format combinations (e.g., audio-only with --extract-audio) may produce fewer progress updates.
Add --newline to force progress on new lines:
request.addOption("--newline");The %(title)s template uses the video title, which may contain characters forbidden in file paths on Android. Use a safer template:
request.setOutputTemplate(outputDir + "/%(id)s.%(ext)s");Or sanitize the title:
request.addOption("--restrict-filenames"); // replaces special chars with underscoresyt-dlp writes a temporary file during download. Ensure your output directory has enough free space, especially for high-quality formats that merge video+audio streams.
Explicitly request audio format:
request.addOption("-f", "bestaudio")
.addOption("--extract-audio")
.addOption("--audio-format", "mp3");Use -f to specify a format explicitly. To see available formats first (dry run):
request.addOption("-F"); // Lists formats, does not download
YtDlpResponse response = YtDlp.execute(request, null);
Log.d("YtDlp", response.getOutput()); // Prints format tableThen select the format code:
request.addOption("-f", "137+140"); // 1080p video (137) + audio (140)Sites update their APIs and yt-dlp must keep pace. Because yt-dlp is bundled as Python bytecode inside the AAR at build time, in-app updates are not supported — YtDlp.updateYtDlp() always returns an error.
Fix: bump the library version in your build.gradle to pick up a newer bundled yt-dlp:
implementation 'dev.ffmpegkit-maintained:yt-dlp-android:NEW_VERSION'Open an issue on the GitHub repository with:
- The URL you're trying to download (or the error message if the URL is private)
- The full exception stack trace
- Your Android API level and device ABI (
arm64-v8a,armeabi-v7a,x86_64)