-
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 the required native dependency (curl-cffi) is not available in the standard Android runtime.
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. Update the bundled binary:
YtDlp.updateYtDlp(context, new YtDlp.UpdateCallback() {
public void onComplete(String s) { Log.d("YtDlp", "Updated: " + s); }
public void onError(String e) { Log.e("YtDlp", "Update failed: " + e); }
});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)