You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-16Lines changed: 25 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,13 @@ A small android based YouTube url extractor.
4
4
These are the literal urls to the YouTube video or audio files, so you can stream or download them.
5
5
It features an age verification circumvention and a signature deciphering method (mainly for vevo videos).
6
6
7
-
I've made a little jar lib which should make integration super easy: [youtubeExtractor.jar](https://github.com/HaarigerHarald/android-youtubeExtractor/raw/master/bin/youtubeExtractor.jar)
7
+
## Get it
8
8
9
-
#### How to Use:
9
+
1. Just import the jar library [youtubeExtractor.jar](https://github.com/HaarigerHarald/android-youtubeExtractor/raw/master/bin/youtubeExtractor.jar)
10
+
11
+
1. Or build it yourself from the sources, don't forget you will also need this great library if you do so: [js-evaluator-for-android](https://github.com/evgenyneu/js-evaluator-for-android)
12
+
13
+
## How to Use:
10
14
11
15
It's basically build around an AsyncTask. Called from an Activity you can write something like that:
12
16
@@ -16,11 +20,8 @@ It's basically build around an AsyncTask. Called from an Activity you can write
16
20
@Override
17
21
public void onUrisAvailable(String videoId, String videoTitle, SparseArray<YtFile> ytFiles) {
18
22
if(ytFiles!=null){
19
-
int itag = 22;
20
-
// itag is a YouTube format identifier, 22 for example is "mp4 h264 1280x720"
21
-
23
+
int itag = 22; // a YouTube format identifier
22
24
String downloadUrl = ytFiles.get(itag).getUrl();
23
-
// TODO: Do something cool with the "downloadUrl"...
24
25
}
25
26
}
26
27
};
@@ -30,19 +31,27 @@ It's basically build around an AsyncTask. Called from an Activity you can write
30
31
The important thing is the ytFiles SparseArray. Because YouTube videos are available in multiple formats we can choose one by
31
32
calling ytFiles.get(itag). One ytFile contains the url and its appropriate meta data like: "mp4 1280x720" or "m4a dash aac"
32
33
33
-
For further infos have a look at the supplied sample YoutubeDownloader app. It uses the "Share" function in the official YouTube
34
-
app to download YouTube videos. It doesn't have a launcher entry though so don't be irritated.
34
+
For further infos have a look at the supplied sample YouTube Downloader app. It uses the "Share" function in the official YouTube
35
+
app to download the files provided by YouTube. It doesn't have a launcher entry though so don't be irritated.[youtubeSampleDL.apk](https://github.com/HaarigerHarald/android-youtubeExtractor/raw/master/bin/youtubeSampleDL.apk)
35
36
36
-
To try the app have a look at: [youtubeDownloader.apk](https://github.com/HaarigerHarald/android-youtubeExtractor/raw/master/bin/youtubeSampleDL.apk)
Not enciphered Videos may work on lower Android versions (untested).
41
42
42
-
I'm using a useful lib for JavaScript execution, if you want to build your own lib from the sources head
43
-
over to: https://github.com/evgenyneu/js-evaluator-for-android
43
+
## Advanced YouTube Downloader App
44
44
45
-
Just to make it clear I'm not in any way related to YouTube!
45
+
There is also now an advanced App that addresses the following issues:
46
+
47
+
1. Some resolutions are only available separated in two files, one for audio and one for video. We need to merge them after the download is completed.
48
+
There is a great Java library for doing this with mp4 files: [mp4parser](https://github.com/sannies/mp4parser)
49
+
50
+
1. Some media players aren't able to read the dash container of the m4a Audio files. This is also fixable via the library mentioned above.
51
+
52
+
To try the app have a look at: [youtubeDownloader.apk](https://github.com/HaarigerHarald/android-youtubeExtractor/raw/master/bin/youtubeDownloader.apk)
0 commit comments