youtube-dl-android Android CI

Android library wrapper for youtube-dl executable. Based on yausername’s youtubedl-android but with ability to download binary files at runtime to decrease apk size.

GitHub license Twitter

GitHub stars GitHub forks

Credits


Installation

Gradle

Step 1 : Add jitpack repository to your project build file

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

Step 2: Add the dependency

dependencies {
    implementation 'com.github.bawaviki.youtube-dl-android:library:0.7.+'
}

Optional FFmpeg dependency can also be added

dependencies {
    implementation 'com.github.bawaviki.youtube-dl-android:library:0.7.+'
    implementation 'com.github.bawaviki.youtube-dl-android:ffmpeg:0.7.+'
}


Usage

try {
    YoutubeDL.getInstance().init(getApplication(),this);
} catch (YoutubeDLException e) {
    Log.e(TAG, "failed to initialize youtubedl-android", e);
}

FFmpeg

If you wish to use ffmpeg features of youtube-dl (e.g. –extract-audio), include and initialize the ffmpeg library(you only need to Initialize FFmpeg library youtube-dl already initialize in this).

try {
    FFmpeg.getInstance().init(getApplication(),this);
} catch (YoutubeDLException e) {
    Log.e(TAG, "failed to initialize ffmpeg", e);
}


Sample app

Download Example Streaming Example


Docs