Added comments to code, and added index to each section
This commit is contained in:
parent
3302675257
commit
fe40a8a258
|
@ -4,35 +4,52 @@ Tutorial to fast install [youtube-dl](https://github.com/ytdl-org/youtube-dl/) i
|
||||||
|
|
||||||
*Based on https://www.reddit.com/r/Piracy/comments/baufql/youtubedl_the_easy_way_on_android/*
|
*Based on https://www.reddit.com/r/Piracy/comments/baufql/youtubedl_the_easy_way_on_android/*
|
||||||
|
|
||||||
# Quick Install
|
1. [Install and configure youtube-dl](#Install-and-configure-youtube-dl)
|
||||||
|
2. [Extras](#Extras)
|
||||||
|
3. [All-In-One](#All-In-One)
|
||||||
|
|
||||||
## Install Termux
|
# Install Termux
|
||||||
https://termux.com/
|
https://termux.com/
|
||||||
|
|
||||||
## Open Termux and run this:
|
# Open Termux and run this:
|
||||||
|
|
||||||
### Install and configure youtube-dl
|
## Install and configure youtube-dl
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Ask for storage permission
|
||||||
termux-setup-storage &&
|
termux-setup-storage &&
|
||||||
|
# Install youtube-dl
|
||||||
apt update && apt upgrade && apt install python ffmpeg && pip install youtube-dl &&
|
apt update && apt upgrade && apt install python ffmpeg && pip install youtube-dl &&
|
||||||
|
# Configure to download videos in `Downloads/{URL's provider (e.g. Youtube)}/{uploader}/{filename}`
|
||||||
mkdir -p ~/.config/youtube-dl &&
|
mkdir -p ~/.config/youtube-dl &&
|
||||||
echo "# Default Output Directory and Pattern
|
echo "# Default Output Directory and Pattern
|
||||||
-o /data/data/com.termux/files/home/storage/downloads/%(extractor_key)s/%(uploader)s/%(title)s-%(id)s.%(ext)s" > ~/.config/youtube-dl/config &&
|
-o /data/data/com.termux/files/home/storage/downloads/%(extractor_key)s/%(uploader)s/%(title)s-%(id)s.%(ext)s" > ~/.config/youtube-dl/config &&
|
||||||
|
# Configure to open shared URLs with `youtube-dl {url}`
|
||||||
mkdir ~/bin &&
|
mkdir ~/bin &&
|
||||||
echo "#!/bin/bash
|
echo "#!/bin/bash
|
||||||
url=$1
|
url=$1
|
||||||
youtube-dl $url" > ~/bin/termux-url-opener &&
|
youtube-dl $url" > ~/bin/termux-url-opener &&
|
||||||
chmod +x ~/bin/termux-url-opener
|
chmod +x ~/bin/termux-url-opener
|
||||||
|
```
|
||||||
|
|
||||||
### Extras (install nano, and add special keys to keyboard)
|
## Extras
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Add special keys to keyboard
|
||||||
mkdir ~/.termux
|
mkdir ~/.termux
|
||||||
echo "extra-keys = [ \
|
echo "extra-keys = [ \
|
||||||
['ESC', '/', '|', 'HOME', 'UP', 'END', 'PGUP', '-'], \
|
['ESC', '/', '|', 'HOME', 'UP', 'END', 'PGUP', '-'], \
|
||||||
['TAB','CTRL', 'ALT', 'LEFT', 'DOWN', 'RIGHT', 'PGDN', '~'] \
|
['TAB','CTRL', 'ALT', 'LEFT', 'DOWN', 'RIGHT', 'PGDN', '~'] \
|
||||||
]" > ~/.termux/termux.properties
|
]" > ~/.termux/termux.properties
|
||||||
|
# Install nano
|
||||||
apt install nano
|
apt install nano
|
||||||
|
```
|
||||||
|
|
||||||
### All-In-One (youtube-dl + extras)
|
## All-In-One
|
||||||
|
|
||||||
|
youtube-dl + extras
|
||||||
|
|
||||||
|
```bash
|
||||||
termux-setup-storage &&
|
termux-setup-storage &&
|
||||||
apt update && apt upgrade && apt install nano python ffmpeg && pip install youtube-dl &&
|
apt update && apt upgrade && apt install nano python ffmpeg && pip install youtube-dl &&
|
||||||
mkdir -p ~/.config/youtube-dl &&
|
mkdir -p ~/.config/youtube-dl &&
|
||||||
|
@ -48,3 +65,4 @@ https://termux.com/
|
||||||
['ESC', '/', '|', 'HOME', 'UP', 'END', 'PGUP', '-'], \
|
['ESC', '/', '|', 'HOME', 'UP', 'END', 'PGUP', '-'], \
|
||||||
['TAB','CTRL', 'ALT', 'LEFT', 'DOWN', 'RIGHT', 'PGDN', '~'] \
|
['TAB','CTRL', 'ALT', 'LEFT', 'DOWN', 'RIGHT', 'PGDN', '~'] \
|
||||||
]" > ~/.termux/termux.properties
|
]" > ~/.termux/termux.properties
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user