30 lines
628 B
Markdown
30 lines
628 B
Markdown
## youtube-dl
|
|
### List format
|
|
```shell
|
|
youtube-dl -F <YOUTUBE_URL>
|
|
```
|
|
|
|
e.g.
|
|
```shell
|
|
youtube-dl -F https://www.youtube.com/watch?v=Pbzn79TSRO0
|
|
```
|
|
|
|
### Download
|
|
```shell
|
|
youtube-dl -f <FORMAT_ID> <YOUTUBE_URL>
|
|
```
|
|
|
|
### Download video-only & audio-only & merge to MKV
|
|
```shell
|
|
youtube-dl -f <VIDEO_ONLY_ID>+<AUDIO_ONLY_ID> --merge-output-format mkv <YOUTUBE_URL>
|
|
```
|
|
|
|
e.g.
|
|
```shell
|
|
youtube-dl -f 313+251 --merge-output-format mkv https://www.youtube.com/watch?v=Pbzn79TSRO0
|
|
```
|
|
|
|
### Download video to MP3
|
|
```shell
|
|
youtube-dl -i --extract-audio --audio-format mp3 --audio-quality 0 https://www.youtube.com/watch?v=IruVsWrfPqs
|
|
``` |