youtube-dl for android
1,356
stars
221
commits
Kotlin
primary language
Nov 16, 2025
updated
Android library wrapper for yt-dlp (formerly youtube-dl) executable
Debug apk for testing can be downloaded from the releases page

If you wish to use config file in the download option by using this command --config-location you must create a file named config.txt inside youtubedl-android directory and add the commands for example.
--no-mtime
-o /sdcard/Download/youtubedl-android/%(title)s.%(ext)s
-f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best"
Checkout dvd, a video downloader app based on this library.
Also take a look at Seal, another video/audio downloader app which demonstrates a more advanced and customized use of this library.
val youtubedlAndroid = "0.18.1"
repositories {
mavenCentral()
}
dependencies {
implementation("io.github.junkfood02.youtubedl-android:library:$youtubedlAndroid")
implementation("io.github.junkfood02.youtubedl-android:ffmpeg:$youtubedlAndroid")
implementation("io.github.junkfood02.youtubedl-android:aria2c:$youtubedlAndroid") // optional
}
android:extractNativeLibs="true" in your app's manifest.abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' in app/build.gradle, see sample app.android:requestLegacyExternalStorage="true".Download/ and Documents/ . And you can only download the videos into these two directories, see related issue.onCreate.try {
YoutubeDL.getInstance().init(this);
} catch (YoutubeDLException e) {
Log.e(TAG, "failed to initialize youtubedl-android", e);
}
File youtubeDLDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "youtubedl-android");
YoutubeDLRequest request = new YoutubeDLRequest("https://vimeo.com/22439234");
request.addOption("-o", youtubeDLDir.getAbsolutePath() + "/%(title)s.%(ext)s");
YoutubeDL.getInstance().execute(request, (progress, etaInSeconds) -> {
System.out.println(String.valueOf(progress) + "% (ETA " + String.valueOf(etaInSeconds) + " seconds)");
});
YoutubeDLRequest request = new YoutubeDLRequest("https://vimeo.com/22439234");
final String processId = "MyProcessDownloadId";
YoutubeDL.getInstance().execute(request, (progress, etaInSeconds) -> {
System.out.println(String.valueOf(progress) + "% (ETA " + String.valueOf(etaInSeconds) + " seconds)");
}, processId);
...
YoutubeDL.getInstance().destroyProcessById(processId);
--dump-json of yt-dlp) VideoInfo streamInfo = YoutubeDL.getInstance().getInfo("https://vimeo.com/22439234");
System.out.println(streamInfo.getTitle());
YoutubeDLRequest request = new YoutubeDLRequest("https://youtu.be/Pv61yEcOqpw");
request.addOption("-f", "best");
VideoInfo streamInfo = YoutubeDL.getInstance().getInfo(request);
System.out.println(streamInfo.getUrl());
yt-dlp supports myriad different options which be seen here
yt-dlp binary can be updated from within the library (A example can be found in the sample app)
YoutubeDL.getInstance().updateYoutubeDL(this, updateChannel); // UpdateChannel.NIGHTLY or UpdateChannel.STABLE
If you wish to use ffmpeg features of yt-dlp (e.g. --extract-audio), include and initialize the ffmpeg library.
try {
YoutubeDL.getInstance().init(this);
FFmpeg.getInstance().init(this);
} catch (YoutubeDLException e) {
Log.e(TAG, "failed to initialize youtubedl-android", e);
}
This library can make use of aria2c as the external downloader. include and initialize the aria2c library.
try {
YoutubeDL.getInstance().init(this);
FFmpeg.getInstance().init(this);
Aria2c.getInstance().init(this);
} catch (YoutubeDLException e) {
Log.e(TAG, "failed to initialize youtubedl-android", e);
}
and options for the request as below:
request.addOption("--downloader", "libaria2c.so");
aria2 you need libc++, c-ares, openssl, libxml2, zlib, ibiconv it can be found in here (android5+) or here (android7+). then follow the method used to build python or ffmpeg.You can support the project by donating to below addresses.
| Type | Address |
|---|---|
![]() | bc1qw3g7grh6dxk69mzwjmewanj9gj2ycc5mju5dc4 |
![]() | 49SQgJTxoifhRB1vZGzKwUXUUNPMsrsxEacZ8bRs5tqeFgxFUHyDFBiUYh3UBRLAq355tc2694gbX9LNT7Ho7Vch2XEP4n4 |
Kotlin
56.7%
Java
43.3%
youtube-dl for android
1,356
stars
221
commits
Kotlin
primary language
Nov 16, 2025
updated
Android library wrapper for yt-dlp (formerly youtube-dl) executable
Debug apk for testing can be downloaded from the releases page

If you wish to use config file in the download option by using this command --config-location you must create a file named config.txt inside youtubedl-android directory and add the commands for example.
--no-mtime
-o /sdcard/Download/youtubedl-android/%(title)s.%(ext)s
-f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best"
Checkout dvd, a video downloader app based on this library.
Also take a look at Seal, another video/audio downloader app which demonstrates a more advanced and customized use of this library.
val youtubedlAndroid = "0.18.1"
repositories {
mavenCentral()
}
dependencies {
implementation("io.github.junkfood02.youtubedl-android:library:$youtubedlAndroid")
implementation("io.github.junkfood02.youtubedl-android:ffmpeg:$youtubedlAndroid")
implementation("io.github.junkfood02.youtubedl-android:aria2c:$youtubedlAndroid") // optional
}
android:extractNativeLibs="true" in your app's manifest.abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' in app/build.gradle, see sample app.android:requestLegacyExternalStorage="true".Download/ and Documents/ . And you can only download the videos into these two directories, see related issue.onCreate.try {
YoutubeDL.getInstance().init(this);
} catch (YoutubeDLException e) {
Log.e(TAG, "failed to initialize youtubedl-android", e);
}
File youtubeDLDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "youtubedl-android");
YoutubeDLRequest request = new YoutubeDLRequest("https://vimeo.com/22439234");
request.addOption("-o", youtubeDLDir.getAbsolutePath() + "/%(title)s.%(ext)s");
YoutubeDL.getInstance().execute(request, (progress, etaInSeconds) -> {
System.out.println(String.valueOf(progress) + "% (ETA " + String.valueOf(etaInSeconds) + " seconds)");
});
YoutubeDLRequest request = new YoutubeDLRequest("https://vimeo.com/22439234");
final String processId = "MyProcessDownloadId";
YoutubeDL.getInstance().execute(request, (progress, etaInSeconds) -> {
System.out.println(String.valueOf(progress) + "% (ETA " + String.valueOf(etaInSeconds) + " seconds)");
}, processId);
...
YoutubeDL.getInstance().destroyProcessById(processId);
--dump-json of yt-dlp) VideoInfo streamInfo = YoutubeDL.getInstance().getInfo("https://vimeo.com/22439234");
System.out.println(streamInfo.getTitle());
YoutubeDLRequest request = new YoutubeDLRequest("https://youtu.be/Pv61yEcOqpw");
request.addOption("-f", "best");
VideoInfo streamInfo = YoutubeDL.getInstance().getInfo(request);
System.out.println(streamInfo.getUrl());
yt-dlp supports myriad different options which be seen here
yt-dlp binary can be updated from within the library (A example can be found in the sample app)
YoutubeDL.getInstance().updateYoutubeDL(this, updateChannel); // UpdateChannel.NIGHTLY or UpdateChannel.STABLE
If you wish to use ffmpeg features of yt-dlp (e.g. --extract-audio), include and initialize the ffmpeg library.
try {
YoutubeDL.getInstance().init(this);
FFmpeg.getInstance().init(this);
} catch (YoutubeDLException e) {
Log.e(TAG, "failed to initialize youtubedl-android", e);
}
This library can make use of aria2c as the external downloader. include and initialize the aria2c library.
try {
YoutubeDL.getInstance().init(this);
FFmpeg.getInstance().init(this);
Aria2c.getInstance().init(this);
} catch (YoutubeDLException e) {
Log.e(TAG, "failed to initialize youtubedl-android", e);
}
and options for the request as below:
request.addOption("--downloader", "libaria2c.so");
aria2 you need libc++, c-ares, openssl, libxml2, zlib, ibiconv it can be found in here (android5+) or here (android7+). then follow the method used to build python or ffmpeg.You can support the project by donating to below addresses.
| Type | Address |
|---|---|
![]() | bc1qw3g7grh6dxk69mzwjmewanj9gj2ycc5mju5dc4 |
![]() | 49SQgJTxoifhRB1vZGzKwUXUUNPMsrsxEacZ8bRs5tqeFgxFUHyDFBiUYh3UBRLAq355tc2694gbX9LNT7Ho7Vch2XEP4n4 |
Kotlin
56.7%
Java
43.3%