blob: 5d42706b6bb3d9d23d54dfc776ab37200c364fcf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
Document: WR-005 P. Webb
2024.11.08
youtube-dl tips & tricks
Body
Everyone knows `youtube-dl` doesn't really work these days. What
**does** work is the successor, `yt-dlp`[1]. I install it
via brew[2]:
```sh
brew install yt-dlp
```
Here's the contents of my `~/.config/yt-dlp/config` (it automatically
titles videos I download):
```plain
--format-sort "ext"
-o ~/Movies/%(title)s.%(ext)s
```
Finally, here's what's in my `~/.zshrc` (I use zsh[3]):
```sh
alias yt="yt-dlp"
ig() {
yt $1 -f mp4
}
```
Downloading YouTube videos is as easy as:
```sh
yt https://www.youtube.com/watch?v=_5zwYVh8i5w
```
And Instagram videos:
```sh
# this is an hour-long video and Instagram pauses playback if you dare multitask
ig https://www.instagram.com/p/DCDRaRoxJYW/
```
References
[1] <https://github.com/yt-dlp/yt-dlp>
[2] <https://brew.sh>
[3] <https://ohmyz.sh>
|