To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 27d73155 authored by Christof Gerber's avatar Christof Gerber
Browse files

Document the relevant commands to download youtube videos and their subtitles...

Document the relevant commands to download youtube videos and their subtitles and how to download a specific part of a youtube video.
parents
# youtube-dl
Download video
```bash
youtube-dl https://youtu.be/1yRFJcCg6xo
```
Download video info
```bash
youtube-dl --skip-download --write-info-json https://youtu.be/1yRFJcCg6xo
```
Download video & thumnail
```bash
youtube-dl --skip-download --write-thumbnail https://youtu.be/1yRFJcCg6xo
```
Download auto generated english subs of type vtt
```bash
youtube-dl --skip-download --write-auto-sub --sub-format vtt --sub-lang en https://youtu.be/1yRFJcCg6xo
```
Dump Playlist info as list of json (stdout)
```bash
youtube-dl -j --flat-playlist https://www.youtube.com/playlist\?list\=PLuXXbBFpPc0lb4_FdI1NOPTCAYroXOywl
```
Download Playlist
```bash
youtube-dl https://www.youtube.com/playlist\?list\=PLuXXbBFpPc0lb4_FdI1NOPTCAYroXOywl
# Leads to error: youtube_dl.utils.RegexNotFoundError: Unable to extract Initial JS player signature function name
```
Get URL of video and audio
````bahs
youtube-dl -g https://youtu.be/1yRFJcCg6xo
````
Download a fragment of a youtube video
```bash
ffmpeg $(youtube-dl -g https://www.youtube.com/watch\?v\=HXGwJevjOfs | sed "s/.*/-ss 10 -i &/") -t 60 -c copy test.mkv
```
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment