Summary of how to use 'yt-dlp' that can download movies such as YouTube and Nico Nico video with the highest image quality and high sound quality, age-restricted movies can also be downloaded at once



' Yt-dlp ' is a program that makes it even more convenient by adding new functions to '

youtube-dl ' that allows you to download movies from many streaming services such as YouTube, Nico Nico Douga, and Twitch. With yt-dlp, you can follow the latest specifications of YouTube that are updated daily, download with thumbnail images embedded in movies, and download movies with age restrictions on YouTube. Since the function of is installed, I checked the procedure to actually install and download the movie.

GitHub --yt-dlp / yt-dlp: A youtube-dl fork with additional features and fixes
https://github.com/yt-dlp/yt-dlp

·table of contents
◆ 01: installation procedure of yt-dlp
◆ 02: How to download movies for each service
・ Download YouTube
・ Download Nico Nico Douga
・ Download Twitch
・ Download Vimeo
・ Download Twitter
・ Instagram download
◆ 03: How to update yt-dlp to the latest version
◆ 04: How to download YouTube movies that require login
◆ 05: How to download all videos on YouTube channel at once
◆ 06: How to download all videos in the playlist at once
◆ 07: How to make a list by yourself and download all at once
◆ 08: How to download subtitle files together
◆ 09: How to embed thumbnails & download only thumbnails
◆ 10: How to speed up download
◆ 11: Change file name & save destination
◆ 12: Convenient tricks
◆ 13: How to download by setting the option first and typing 'yt-dlp'
◆ 14: How to download a video without opening a command prompt

◆ 01: installation procedure of yt-dlp
yt-dlp is distributed on the following page.

Releases · yt-dlp / yt-dlp · GitHub
https://github.com/yt-dlp/yt-dlp/releases/



Once you're on the distribution page, scroll down a bit to find the downloadable files. This time I want to use it on Windows, so I clicked 'yt-dlp.exe' to download it.



Next, move the downloaded 'yt-dlp.exe' to the user folder (the folder with the same name as the user name created during the initial setup of Windows). If you set the

environment variables , you can place it in another folder, but this time we are using the user folder to simplify the procedure.



You can use yt-dlp by itself, but if you also prepare the movie format conversion application ' FFmpeg ', you can use functions such as format conversion and combining movie and audio. This time, download FFmpeg with the patch for yt-dlp distributed on the following page.

Releases · yt-dlp / FFmpeg-Builds · GitHub
https://github.com/yt-dlp/FFmpeg-Builds/releases/



When you access the distribution page, look for 'ffmpeg-master-latest-win64-gpl.zip' and download it ...



Unzip the downloaded ZIP file with a decompression software such as '

Explzh '.



Double-click the unzipped folder to create it ...



Double-click the 'bin' folder in it.



Then three executable files will appear, so move 'ffmpeg.exe' and 'ffprobe.exe' to the same user folder as 'yt-dlp.exe'.



If 'ffmpeg.exe', 'ffprobe.exe' and 'yt-dlp.exe' exist in the user folder like this, the installation is complete.




◆ 02: How to download movies for each service
yt-dlp is not an application that is executed by double-clicking 'yt-dlp.exe', but an application that is executed using a 'black screen' such as a command prompt. First, to start the command prompt, type 'cmd' in the start menu and click 'command prompt'.



If you see a black screen like this, you're ready to go. All the commands explained below are supposed to be used on this screen.



・ Download YouTube
Even though it is a command, the basic command of yt-dlp is very simple. If you want to download the video to YouTube, enter the following command at the command prompt and press the 'Enter key' to download it in the highest quality that can be downloaded. Please note that a half-width space is required between 'yt-dlp' and the URL.

[code] yt-dlp [YouTube movie URL] [/ code]

For example, if you download the following movie that experienced the screaming machine '

Do Dodonpa ' ...

I have experienced the acceleration power of 3.75G of Fuji-Q Highland 'Do Dodonpa' which reaches 180km / h in 1.56 seconds at the test drive event for the press --YouTube


Enter a space after 'yt-dlp https://www.youtube.com/watch?v=u-ue0Ez8i7s' and 'yt-dlp', and enter the URL of the video 'https://www.youtube.com/ Enter 'watch? v = u-ue0Ez8i7s' and then press the 'Enter key'.



Then the movie will be downloaded.



The downloaded movie is saved in the user folder.



・ Download Nico Nico Douga
When downloading a Nico Nico Douga movie, insert a space after 'yt-dlp' and then enter the URL of the movie page of Nico Nico Douga.

[code] yt-dlp [URL of Nico Nico Douga] [/ code]

For example, to download ' Taberungo no Uta ', which was very popular in 2020, just enter 'yt-dlp https://www.nicovideo.jp/watch/sm36210300' and press the 'Enter key'. ..

・ Download Twitch
Similarly on Twitch, you can download it by entering the URL after 'yt-dlp' and pressing the 'Enter key'.

[code] yt-dlp [Twitch URL]
Example: https://www.twitch.tv/videos/558818717 [/ code]

・ Download Vimeo
You can also download Vimeo with the following command.

[code] yt-dlp [URL of Vimeo]
Example: yt-dlp https://vimeo.com/288344114 [/ code]

・ Download Twitter
You can also download movies posted on Twitter with yt-dlp. The download method is the same as other streaming services, just enter a space after 'yt-dlp' and enter the URL of the tweet containing the movie.

[code] yt-dlp [URL of the tweet containing the movie]
Example: yt-dlp https://twitter.com/SpaceX/status/1473233806349926403 [/ code]

・ Instagram download
Instagram can also be downloaded in one shot with the following command.

[code] yt-dlp [URL of the post containing the movie]
Example: yt-dlp https://www.instagram.com/reel/CX7MQOat2q8/ [/ code]

yt-dlp also

supports many other streaming services such as '17LIVE', 'TVer' and 'FC2 Video', and you can basically download movies with the same commands as above.

◆ 03: How to update yt-dlp to the latest version
Specification changes are frequently made in streaming services such as YouTube, and the download application may become unusable. yt-dlp releases several updates a month, including support for changes in the specifications of each service and addition of functions, and can be updated by executing the following command.

[code] yt-dlp -U [/ code]

In this environment, I was using the latest version of yt-dlp, so 'yt-dlp is up to date (yt-dlp is the latest version)' was displayed. If the movie download fails, it is recommended to execute the above command to update.



◆ 04: How to download YouTube movies that require login
On YouTube, movies containing radical expressions such as violence and bloodshed can only be played by logging in to your account and verifying your age. For example, if you try to play the trailer for ' The Suicide Squad' Extreme 'Rogues, Rally' without logging in to YouTube, you will see 'Please log in to verify your age.'



Although general download apps may not support age-restricted movies, yt-dlp has a function to download age-restricted movies by pretending to be logged in by reading the cookie of the browser. To read and download cookies from your browser, use a command like the one below that includes the option '--cookies-from-browser'.

[code] yt-dlp --cookies-from-browser [browser name] [URL] [/ code]

This time, with Firefox logged in to YouTube and the age-restricted movie playable ...



When I executed the command 'yt-dlp --cookies-from-browser firefox https://www.youtube.com/watch?v=Z1EbSXxrZ34', the movie was successfully downloaded. This function is compatible with browsers such as 'Google Chrome', 'Microsoft Edge', 'Safari', 'Vivaldi', 'Opera', 'Brave', and 'Chromium' in addition to Firefox.



◆ 05: How to download all videos on YouTube channel at once
With yt-dlp, you can download all movies of each YouTube channel at once with the following command.

[code] yt-dlp [YouTube channel URL] [/ code]

For example, if you want to download all videos of

GIGAZINE's YouTube channel , check the channel URL 'https://www.youtube.com/c/gigazine' and check 'yt-dlp https://www.youtube.com'. If you execute the command '/ c / gigazine' ...



A total of 8410 movies will be downloaded. If you want to stop the download in the middle, you can interrupt the command execution by pressing the 'Ctrl key' and 'C key' at the same time.



◆ 06: How to download all videos in the playlist at once
You can download all the movies included in the YouTube playlist with the following command.

[code] yt-dlp [playlist URL] [/ code]

For example, in the case of the following

Blender tutorial , you can download all at once with the command 'yt-dlp https://www.youtube.com/playlist?list=PLjEaoINr3zgFX8ZsChQVQsuDSjEqdWMAD'.



◆ 07: How to make a list by yourself and download all at once
When downloading multiple movies at once, in addition to downloading all the videos in the channel or playlist at once as described above, there is also a function to download all the movies in the list you made at once. The command to download using the list created by myself is as follows.

[code] yt-dlp -a [list file name] [/ code]

First, create a file in which URLs are arranged line by line with Notepad, etc., and save it in the user folder. This time I saved it as 'list.txt'. This list can include URLs for different streaming services such as YouTube and Nico Nico Douga.



Place the file created like this and yt-dlp in the same folder, and you're ready to go.



After that, if you execute the command 'yt-dlp -a list.txt', the videos listed in the list will be downloaded all at once.



◆ 08: How to download subtitle files together
With yt-dlp, you can also download subtitle files set for movies. To download Japanese subtitles, execute the following command.

[code] yt-dlp --write-subs --sub-langs ja [URL] [/ code]

For example, if you want to download the following

movie with Japanese subtitles, use the command 'yt-dlp --write-subs --sub-langs ja https://www.youtube.com/watch?v=Mlk888FiI8A'. I will do it.



Then, the subtitle file will be downloaded to the user folder along with the movie.



After that, you can enjoy movies with subtitles just by specifying the subtitle file with a playback application that supports subtitle display.



◆ 09: How to embed thumbnails & download only thumbnails
If you have installed a codec pack such as '

K-Lite Codec Pack ', you can check the thumbnail of the movie on Explorer. However, if you download the following movie with yt-dlp according to the above procedure ...



A thumbnail that is different from what is displayed on YouTube is displayed.



To embed the same thumbnails as each streaming service in the movie, you need to download it with the following command.

[code] yt-dlp --embed-thumbnail [URL] [/ code]

For example, in the case of the above movie, you can display the same thumbnail as YouTube by executing the command 'yt-dlp --embed-thumbnail https://www.youtube.com/watch?v=DJ6APur94FI'.



There is also a function to download only thumbnails and a function to convert the thumbnail file format.

[code] Download only thumbnails
yt-dlp --write-thumbnail --skip-download [URL]
----
Download only thumbnails and convert to JPG or PNG format
yt-dlp --write-thumbnail --skip-download --convert-thumbnails [jpg or png] [URL] [/ code]

◆ 10: How to speed up download
Streaming services that use

HLS , such as Twitch, can speed up downloads by using the parallel download function. The command to execute parallel download is as follows.

[code] yt-dlp -N [number of threads] [URL] [/ code]

For example, you can download the target movie in parallel with 2 threads by typing 'yt-dlp -N 2 https://www.twitch.tv/videos/558818717'. As a result of actually downloading the same movie while changing the number of threads and measuring the download time with a stopwatch, 'number of threads 1: 2 minutes 29 seconds' 'number of threads 2: 2 minutes 13 seconds' 'number of threads 3: 2 minutes' The download time was shortened as the number of threads increased, such as '6 seconds' and 'number of threads 4: 2 minutes 5 seconds'.

◆ 11: Change file name & save destination
By default, yt-dlp uses the movie title and movie ID as the file name of the downloaded movie.



The movie file name can be set according to the

template . Set the file name with the '-o' option as shown below.

[code] yt-dlp -o [template] [URL]
----
When the file name is 'Title.Extension'
yt-dlp -o% (title) s.% (ext) s [URL] [/ code]

For example, if you enter '% (title) s.% (Ext) s' in the input part of the template, the title of the movie will be the file name as it is. When you actually download the movie with the command 'yt-dlp -o'% (title) s.% (Ext) s 'https://www.youtube.com/watch?v=fJo7BFf8CEI', the file name is 'Kimoi'. It became a face savings box 'FACE BANK' operation movie .webm '.



In addition, the '-o' option allows you to specify where to save the file. The result of executing the command 'yt -dlp -o' C: \% HOMEPATH% \ Downloads \% (title) s.% (Ext) s 'https://www.youtube.com/watch?v=fJo7BFf8CEI' , I was able to download the movie to the download folder.



◆ 12: Convenient tricks
-Display download progress
If you download the movie with the '--console-title' option, you can see the progress of the download in the command prompt window frame or taskbar. This is a recommended function when downloading a long movie that takes a long time to download.



-Set the update date and time of the file to the download date and time.
The update date and time of the movie downloaded by yt-dlp is adjusted to the update date and time of the original file of the movie in the standard state, but ...



By downloading with the '--no-mtime' option, the modification date and time of the file can be adjusted to the download date and time. This function is useful when you want to manage files in order of modification date.



◆ 13: How to download by setting the option first and typing 'yt-dlp'
As mentioned above, yt-dlp has many functions such as renaming files and getting thumbnails, but in the standard state, you need to enter long commands to use each function. Therefore, by creating a configuration file called 'yt-dlp.conf' and specifying options, you can use various functions just by entering 'yt-dlp'.

First, try applying the setting 'Save file name to download folder according to title'. First, create a file with '-o' C: \% HOMEPATH% \ Downloads \% (title) s.% (Ext) s '' in Notepad etc., and create 'yt-dlp.conf' in the user folder. Save it as.



It is OK if 'yt-dlp.exe' and 'yt-dlp.conf' exist in the user folder like this.



When I downloaded the movie with yt-dlp without entering any options in this state, the movie was saved in the download folder as set.



You can enable multiple options in 'yt-dlp.conf' by entering the options line by line as shown below.

[code]-o 'C: \% HOMEPATH% \ Downloads \% (title) s.% (Ext) s'
-N 3
--embed-thumbnail
--no-mtime
--console-title [/ code]

By entering the above in 'yt-dlp.conf', just execute the command 'yt-dlp https://www.youtube.com/watch?v=fJo7BFf8CEI' and 'match the file name to the title, I was able to download the

movie with the settings of 'Save to download folder', 'Parallel download in 3 threads', 'Embedding thumbnail', 'Adjust the update date and time to the download date and time', and 'Display download progress'.



◆ 14: How to download a video without opening a command prompt
By writing the settings in 'yt-dlp.conf', you can now download the movie with a fairly simple command. Let's make it even simpler so that you can download the movie with just the 6 characters 'yt-dlp'.

First, edit the contents of 'yt-dlp.conf' as follows ...

[code]-o 'C: \% HOMEPATH% \ Downloads \% (title) s.% (Ext) s'
-N 3
--embed-thumbnail
--no-mtime
--console-title
-a dlurl.txt [/ code]

Create a file named 'dlurl.txt' and place 'yt-dlp.exe', 'yt-dlp.conf' and 'dlurl.txt' in the user folder.



Now you can download the movie just by listing the URLs of the movies you want to download in 'dlurl.txt' and typing 'yt-dlp' at the command prompt.



However, even with this, the actions of 'starting the command prompt' and 'quitting the command prompt when the download is completed' are required. Therefore, I will omit the start & end operation of the command prompt. First, create a file with 'yt-dlp' in Notepad and save it in the user folder with the name 'yt-dlp.bat'.



If four files 'yt-dlp.exe', 'yt-dlp.conf', 'dlurl.txt' and 'yt-dlp.bat' exist in the user folder like this, you are ready to go.



After that, press the 'Windows key' and 'R key' at the same time to open the 'Run' dialog, type 'yt-dlp.bat' and press the 'Enter key'.


This will launch the command prompt, start downloading the movies listed in 'dlurl.txt', and automatically exit the command prompt after the download is complete. From now on, you can download the movie just by adding the URL to the movie you want to download to 'dlurl.txt' and executing 'yt-dlp.bat' in the 'Run' dialog.



in Review,   Software,   Video, Posted by log1o_hf