Posted: . At: 11:57 AM. This was 1 year ago. Post ID: 17545
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Download videos from websites easily using yt-dlp.


It is very easy to download a video from a website, The yt-dlp script can easily handle this task. Easily download Reddit videos with one command.

Here I am downloading a video from Reddit.

(base) ┌─jason-Lenovo-H50-55@jason⬎
└─◉ 5.1-~/Videos-11:32-⚫ ◉--[$]  ☕ yt-dlp https://www.reddit.com/r/darwin/comments/10oveqp/another_day_at_darwin_woolworths/?utm_term=2218558561&utm_medium=post_embed&utm_source=embed&utm_name=&utm_content=header
[1] 5005
[2] 5006
[3] 5007
[4] 5008
[2]   Done                    utm_medium=post_embed
[3]-  Done                    utm_source=embed
(base) ┌─jason-Lenovo-H50-55@jason⬎
└─◉ 5.1-~/Videos-11:32-⚫ ◉--[$][Reddit] 10oveqp: Downloading JSON metadata
[Reddit] 10oveqp: Downloading m3u8 information
[Reddit] 10oveqp: Downloading MPD manifest
[SponsorBlock] SponsorBlock is not supported for Reddit
[info] ycsh0z0376fa1: Downloading 1 format(s): hls-2036+dash-audio_0_131665
[info] Downloading video thumbnail 6 ...
[info] Writing video thumbnail 6 to: /home/jason/Downloads/YouTube/AccidentalFoe/Another day at Darwin Woolworths.png
[SubtitlesConvertor] There aren't any subtitles to convert
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 8
[download] Destination: /home/jason/Downloads/YouTube/AccidentalFoe/Another day at Darwin Woolworths.fhls-2036.mp4
[download] 100% of 6.98MiB in 00:02
[download] Destination: /home/jason/Downloads/YouTube/AccidentalFoe/Another day at Darwin Woolworths.fdash-audio_0_131665.m4a
[download] 100% of 503.41KiB in 00:00
[Merger] Merging formats into "/home/jason/Downloads/YouTube/AccidentalFoe/Another day at Darwin Woolworths.mp4"
Deleting original file /home/jason/Downloads/YouTube/AccidentalFoe/Another day at Darwin Woolworths.fdash-audio_0_131665.m4a (pass -k to keep)
Deleting original file /home/jason/Downloads/YouTube/AccidentalFoe/Another day at Darwin Woolworths.fhls-2036.mp4 (pass -k to keep)
[ModifyChapters] SponsorBlock information is unavailable
[Metadata] Adding metadata to "/home/jason/Downloads/YouTube/AccidentalFoe/Another day at Darwin Woolworths.mp4"
[EmbedThumbnail] mutagen: Adding thumbnail to "/home/jason/Downloads/YouTube/AccidentalFoe/Another day at Darwin Woolworths.mp4"
WARNING: unable to embed using mutagen; None
[EmbedThumbnail] Neither mutagen nor AtomicParsley was found. Falling back to ffmpeg
[EmbedThumbnail] ffmpeg: Adding thumbnail to "/home/jason/Downloads/YouTube/AccidentalFoe/Another day at Darwin Woolworths.mp4"
Deleting original file /home/jason/Downloads/YouTube/AccidentalFoe/Another day at Darwin Woolworths.png (pass -k to keep)
 
[1]-  Done                    yt-dlp https://www.reddit.com/r/darwin/comments/10oveqp/another_day_at_darwin_woolworths/?utm_term=2218558561
[4]+  Done                    utm_name=

This worked very well.

Use this ~/.config/yt-dlp.conf file to set up the video download script and save all videos to the same location.

~/.config/yt-dlp.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#Separates videos by channel
-o ~/Downloads/YouTube/%(uploader)s/%(title)s.%(ext)s
 
# Grab Best Audio/Video Format
--format 'bv+ba/b'
 
#Removes usury
#--sponsorblock-remove sponsor,selfpromo,interaction
--sponsorblock-remove sponsor,selfpromo
 
#Coloca thumbnail no video
--embed-thumbnail
 
# Include Media Metadata
--add-metadata
 
# Make Subtitle Format SRT
--convert-subtitles=srt

This will enable yt-dlp to save all videos in the ~/Downloads/YouTube directory.

This may also be used to download blob videos from a news website.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.