{"id":24286038,"url":"https://github.com/infinityloop1308/youtubedl-android","last_synced_at":"2026-04-24T05:36:38.338Z","repository":{"id":271336647,"uuid":"913121697","full_name":"InfinityLoop1308/youtubedl-android","owner":"InfinityLoop1308","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-06T00:18:12.000Z","size":46610,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T20:52:38.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InfinityLoop1308.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-07T04:33:24.000Z","updated_at":"2025-02-17T00:45:29.000Z","dependencies_parsed_at":"2025-03-05T20:58:53.845Z","dependency_job_id":null,"html_url":"https://github.com/InfinityLoop1308/youtubedl-android","commit_stats":null,"previous_names":["infinityloop1308/youtubedl-android"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/InfinityLoop1308/youtubedl-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfinityLoop1308%2Fyoutubedl-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfinityLoop1308%2Fyoutubedl-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfinityLoop1308%2Fyoutubedl-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfinityLoop1308%2Fyoutubedl-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InfinityLoop1308","download_url":"https://codeload.github.com/InfinityLoop1308/youtubedl-android/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfinityLoop1308%2Fyoutubedl-android/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32211381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T03:15:14.334Z","status":"ssl_error","status_checked_at":"2026-04-24T03:15:11.608Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-16T07:28:31.303Z","updated_at":"2026-04-24T05:36:38.323Z","avatar_url":"https://github.com/InfinityLoop1308.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# youtubedl-android\nAndroid library wrapper for [yt-dlp](https://github.com/yt-dlp/yt-dlp) (formerly [youtube-dl](https://github.com/rg3/youtube-dl)) executable\n\n![Maven Central Version](https://img.shields.io/maven-central/v/io.github.junkfood02.youtubedl-android/library)\n\n\n## Credits\n*  [youtubedl-java](https://github.com/sapher/youtubedl-java) by [sapher](https://github.com/sapher), youtubedl-android adds android compatibility to youtubedl-java.\n\n\u003cbr/\u003e\n\n## Sample app\nDebug apk for testing can be downloaded from the [releases page](https://github.com/yausername/youtubedl-android/releases)\n\u003cbr/\u003e\n\u003cbr/\u003e\n![Download Example](https://media.giphy.com/media/fvI9yytF4rxmH7pGHu/giphy.gif)\n![Streaming Example](https://media.giphy.com/media/UoqecxgY9IWbUs5tSR/giphy.gif)\n\n\n\nIf 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.\n\n```\n--no-mtime\n\n-o /sdcard/Download/youtubedl-android/%(title)s.%(ext)s\n\n-f \"bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best\"\n```\n\n\n\u003cbr/\u003e\n\nCheckout [dvd](https://github.com/yausername/dvd), a video downloader app based on this library.\n\nAlso take a look at [Seal](https://github.com/JunkFood02/Seal), another video/audio downloader app which demonstrates a more advanced and customized use of this library.\n\n## Installation\n\n### Gradle\n\n```kotlin\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation(\"io.github.junkfood02.youtubedl-android:library:0.16.0\")\n    implementation(\"io.github.junkfood02.youtubedl-android:ffmpeg:0.16.0\")\n    implementation(\"io.github.junkfood02.youtubedl-android:aria2c:0.16.0\") // optional\n}\n```\n\n* Set `android:extractNativeLibs=\"true\"` in your app's manifest.\n* Use `abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'` in app/build.gradle, see [sample app](https://github.com/yausername/youtubedl-android/blob/master/app/build.gradle).\n* Use abi splits to reduce apk size, see [sample app](https://github.com/yausername/youtubedl-android/blob/master/app/build.gradle).\n* On Android 10 (API 29), set `android:requestLegacyExternalStorage=\"true\"`.\n* On Android 10+ (API 30 or higher), due to Android's Scoped Storage changes, apps only have the direct access to  `Download/` and `Documents/` . And you can only download the videos into these two directories, see [related issue](https://github.com/yausername/youtubedl-android/issues/174).\n\n## Usage\n\n* yt-dlp executable and python 3.8 are bundled in the library.\n* Initialize library, preferably in `onCreate`.\n\n```java\ntry {\n    YoutubeDL.getInstance().init(this);\n} catch (YoutubeDLException e) {\n    Log.e(TAG, \"failed to initialize youtubedl-android\", e);\n}\n```\n\n\n* Downloading / custom command (A detailed example can be found in the [sample app](app/src/main/java/com/yausername/youtubedl_android_example/DownloadingExampleActivity.java))\n```java\n    File youtubeDLDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), \"youtubedl-android\");\n    YoutubeDLRequest request = new YoutubeDLRequest(\"https://vimeo.com/22439234\");\n    request.addOption(\"-o\", youtubeDLDir.getAbsolutePath() + \"/%(title)s.%(ext)s\");\n    YoutubeDL.getInstance().execute(request, (progress, etaInSeconds) -\u003e {\n    System.out.println(String.valueOf(progress) + \"% (ETA \" + String.valueOf(etaInSeconds) + \" seconds)\");\n    });\n```\n\n* Stopping a previously started download process\n```java\n    YoutubeDLRequest request = new YoutubeDLRequest(\"https://vimeo.com/22439234\");\n    final String processId = \"MyProcessDownloadId\";\n    YoutubeDL.getInstance().execute(request, (progress, etaInSeconds) -\u003e {\n    System.out.println(String.valueOf(progress) + \"% (ETA \" + String.valueOf(etaInSeconds) + \" seconds)\");\n    }, processId);\n    ...\n    YoutubeDL.getInstance().destroyProcessById(processId);\n```\n\n\n* Get stream info (equivalent to `--dump-json` of yt-dlp)\n```java\n    VideoInfo streamInfo = YoutubeDL.getInstance().getInfo(\"https://vimeo.com/22439234\");\n    System.out.println(streamInfo.getTitle());\n```\n\n\n* Get a single playable link containing video+audio\n```java\n    YoutubeDLRequest request = new YoutubeDLRequest(\"https://youtu.be/Pv61yEcOqpw\");\n    request.addOption(\"-f\", \"best\");\n    VideoInfo streamInfo = YoutubeDL.getInstance().getInfo(request);\n    System.out.println(streamInfo.getUrl());\n```\n\n* yt-dlp supports myriad different options which be seen [here](https://github.com/yt-dlp/yt-dlp)\n\n* yt-dlp binary can be updated from within the library (A example can be found in the [sample app](app/src/main/java/com/yausername/youtubedl_android_example/MainActivity.java))\n```java\n    YoutubeDL.getInstance().updateYoutubeDL(this, updateChannel); // UpdateChannel.NIGHTLY or UpdateChannel.STABLE\n```\n\n## FFmpeg\nIf you wish to use ffmpeg features of yt-dlp (e.g. --extract-audio), include and initialize the ffmpeg library.\n```java\ntry {\n    YoutubeDL.getInstance().init(this);\n    FFmpeg.getInstance().init(this);\n} catch (YoutubeDLException e) {\n    Log.e(TAG, \"failed to initialize youtubedl-android\", e);\n}\n```\n\n## Aria2c\n\nThis library can make use of aria2c as the external downloader. include and initialize the `aria2c` library.\n```java\ntry {\n    YoutubeDL.getInstance().init(this);\n    FFmpeg.getInstance().init(this);\n    Aria2c.getInstance().init(this);\n} catch (YoutubeDLException e) {\n    Log.e(TAG, \"failed to initialize youtubedl-android\", e);\n}\n```\nand options for the request as below:\n```kotlin\nrequest.addOption(\"--downloader\", \"libaria2c.so\");\n```\n\n## Docs\n\n*  Though not required for just using this library, documentation on building python for android can be seen [here](BUILD_PYTHON.md). Same for ffmpeg [here](BUILD_FFMPEG.md). Alternatively, you can use pre-built packages from [here (android5+)](https://packages.termux.dev/apt/termux-main-21/pool/main/) or [here (android7+)](https://packages.termux.dev/apt/termux-main/pool/main/).\n* youtubedl-android uses lazy extractors based build of yt-dlp - [ytdlp-lazy](https://github.com/xibr/ytdlp-lazy) (formerly [youtubedl-lazy](https://github.com/yausername/youtubedl-lazy/))\n* To build `aria2` you need `libc++, c-ares, openssl, libxml2, zlib, ibiconv` it can be found in [here (android5+)](https://packages.termux.dev/apt/termux-main-21/pool/main/) or [here (android7+)](https://packages.termux.dev/apt/termux-main/pool/main/). then follow the method used to build [python](BUILD_PYTHON.md) or [ffmpeg](BUILD_FFMPEG.md).\n\n## Donate\nYou can support the project by donating to below addresses.\n| Type  | Address |\n| ------------- | ------------- |\n| \u003cimg src=\"https://en.bitcoin.it/w/images/en/2/29/BC_Logo_.png\" alt=\"Bitcoin\" width=\"50\"/\u003e  | bc1qw3g7grh6dxk69mzwjmewanj9gj2ycc5mju5dc4  |\n| \u003cimg src=\"https://www.getmonero.org/press-kit/symbols/monero-symbol-480.png\" alt=\"Monero\" width=\"50\"/\u003e  | 49SQgJTxoifhRB1vZGzKwUXUUNPMsrsxEacZ8bRs5tqeFgxFUHyDFBiUYh3UBRLAq355tc2694gbX9LNT7Ho7Vch2XEP4n4  |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinityloop1308%2Fyoutubedl-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinityloop1308%2Fyoutubedl-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinityloop1308%2Fyoutubedl-android/lists"}