All Projects → Commit451 → Youtubeextractor

Commit451 / Youtubeextractor

Licence: apache-2.0
A helper to extract the metadata, including streaming video Urls from a YouTube video

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Youtubeextractor

Discord Player
🎧 Complete framework to simplify the implementation of music commands using discords.js v12
Stars: ✭ 161 (-5.29%)
Mutual labels:  youtube
Sponsorblock
Skip YouTube video sponsors (browser extension)
Stars: ✭ 3,627 (+2033.53%)
Mutual labels:  youtube
Jreadhub
Readhub Android 客户端——官网 : https://readhub.cn
Stars: ✭ 168 (-1.18%)
Mutual labels:  rxjava
Droidux
"Predictable state container" implementation, inspired by Redux.
Stars: ✭ 162 (-4.71%)
Mutual labels:  rxjava
Botamusique
Bot to play youtube / soundcloud / radio / local music on Mumble (using pymumble).
Stars: ✭ 163 (-4.12%)
Mutual labels:  youtube
Lovedoudou
爱逗逗——集新闻资讯,影视评论,漂亮妹子,视频播放于一身的app,用于练习MVP+Retrofit+RxJava+Glide框架,如今将其开源,仅供学习探讨,禁止商用。
Stars: ✭ 165 (-2.94%)
Mutual labels:  rxjava
Album Splitter
Split a single-file mp3 album into its tracks. Supports downloading from YouTube.
Stars: ✭ 160 (-5.88%)
Mutual labels:  youtube
Projectx
This repository might be a starting point for building Android interview tasks. There is also providing a basic sample template based on layered architecture using Dagger2 and Architecture Components.
Stars: ✭ 169 (-0.59%)
Mutual labels:  rxjava
Rxwear
⌚️ Reactive Wearable API Library for Android and RxJava
Stars: ✭ 163 (-4.12%)
Mutual labels:  rxjava
Kubernetes 101
Kubernetes 101 - by Jeff Geerling
Stars: ✭ 169 (-0.59%)
Mutual labels:  youtube
Rsocket Java
Java implementation of RSocket
Stars: ✭ 2,099 (+1134.71%)
Mutual labels:  rxjava
Dualsub Support
General purpose subtitle renderer
Stars: ✭ 163 (-4.12%)
Mutual labels:  youtube
Rxdownloader
Demo of Downloading Songs/Images through Android Download Manager using RxJava2
Stars: ✭ 166 (-2.35%)
Mutual labels:  rxjava
Musicplayer Smartisan
A special, simple and convenient music player,adapter Android Q。Artist 锤子音乐播放器
Stars: ✭ 162 (-4.71%)
Mutual labels:  rxjava
Nodetube
Open-source YouTube alternative that offers video, audio and image uploads, livestreaming and built-in monetization
Stars: ✭ 2,066 (+1115.29%)
Mutual labels:  youtube
Reactivesensors
Android library monitoring device hardware sensors with RxJava
Stars: ✭ 161 (-5.29%)
Mutual labels:  rxjava
Dual Captions
🌐 Subtitles in two languages for YouTube, Netflix & Disney+
Stars: ✭ 164 (-3.53%)
Mutual labels:  youtube
Youget
YouGet - YouTube Video/Playlist Downloader/Cutter - MP3 Converter
Stars: ✭ 169 (-0.59%)
Mutual labels:  youtube
Ablemusicplayer
🎵 A Youtube Music like app with a Spotify like design - ad free and open source. Feel free to PR. NOTE: BEING REWRITTEN, HENCE THE REPO WILL BE INACTIVE FOR A WHILE
Stars: ✭ 167 (-1.76%)
Mutual labels:  youtube
Rxjava2 Extras
Utilities for use with RxJava 2
Stars: ✭ 167 (-1.76%)
Mutual labels:  rxjava

YouTubeExtractor

A helper to extract the streaming URL from a YouTube video using RxJava, Retrofit, Moshi, and others.

Deprecated

YouTube changes their page contents too often for this to be a fesible, consistent solution for any app. Please use something like one of these libraries instead.

Build Status

Gradle Dependency

Add this in your root build.gradle file (not your module build.gradle file):

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

Then, add the library to your project build.gradle

dependencies {
    implementation 'com.github.Commit451:YouTubeExtractor:latest.version.here'
}

Usage

If you are familiar with RxJava, the extractor returns a Single:

val extractor = YouTubeExtractor.Builder()
            .build()
extractor.extract("9d8wWcJLnFI")
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe({ extraction ->
        bindVideoResult(extraction)
    }, { t ->
        onError(t)
    })

Note: the above example also requires RxAndroid for AndroidSchedulers

You can also extract the result right away:

// Don't do this on the main thread!
val extraction = extractor.extract("9d8wWcJLnFI")
    .blockingGet()

Video Playback

This library was only created to extract video stream URLs from YouTube, not provide a video player. ExoMedia is a great library for playing the video streams to the user. See the sample app for an example.

ProGuard/R8

This library uses OkHttp, Moshi and Rhino under the hood, so you may need to apply their rules.

Notes

This library is intentionally being kept pretty "lightweight", with the main priority being the stream URLs.

Known Failure Points:

  • Videos that are age restricted
  • Videos that are audio only

It is worth noting that YouTube "alternatives" such as NewPipe are often removed from the Play Store due to licensing, so be cautious of this and other rules when using this library. We are not responsible for misfortune that comes from using this library.

Alternatives

There are lots of different libraries that are dedicated to YouTube playback, each with its own pros and cons. This library is dedicated primarily to loading video stream URLs. If you need something more, check out some of these other libraries:

License

Copyright 2020 Commit 451

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].