Procedure to cut out and download the specified time of the movie with the strongest YouTube downloader 'yt-dlp'



'A function to cut out a part of a movie by specifying a time' has been added to the downloader ' yt-dlp ' that supports many movie sharing sites such as YouTube and Nico Nico Douga. In addition, it is possible to download each chapter in a movie with chapters set. I tried to summarize the procedure to actually cut out and download a part of the movie with yt-dlp.

Release yt-dlp 2022.06.22.1 · yt-dlp / yt-dlp · GitHub
https://github.com/yt-dlp/yt-dlp/releases/tag/2022.06.22.1

yt-dlp is a movie downloader that can be used on Windows, macOS, and UNIX-based OS, and it is possible to download movies at explosive speed from many movie sharing sites such as YouTube, Nico Nico Douga, and Twitter. The installation procedure and usage of yt-dlp are explained in detail in the following articles. Since 'ffmpeg' is also required for the function used this time, it is necessary to proceed to the installation of 'ffmpeg' according to ' ◆ 01: installation procedure of yt-dlp ' on the following page. Also, in the following article, we explain how to use the 'command prompt' necessary for using yt-dlp and the settings for comfortable use of yt-dlp, so it is recommended to read through it. increase.

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 limit movies can also be downloaded at once --GIGAZINE



◆ Cut out and download the specified time of the movie
When you are ready to use yt-dlp, first run the following command at the command prompt to update yt-dlp to the latest version. In addition, this time, the command when using it on Windows is shown. In macOS and Linux, there are differences such as 'When entering URL etc., it is necessary to enclose it in' ''.

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

If you execute the above command and the version is 2022.06.22.1 or later, you are ready to go. After that, you can download the specified range of the movie by adding '--download-sections' and '* start time-end time' to the command at the time of normal movie download as shown below.

[code] yt-dlp Movie URL --download-sections * Start time-End time [/ code]

Enter the playback time of the movie in the '* Start time-End time' part. For example, if you want to download the range from 21 seconds to 1 minute 27 seconds, enter '* 0: 21-1: 27'. Please be careful not to forget the half-width space and '*' before entering the playback time. To download the movie actually posted on YouTube (https://www.youtube.com/watch?v=DfDr1nTnyEI) in the range of 21 seconds to 1 minute 27 seconds, execute the following command.

[code] yt-dlp https://www.youtube.com/watch?v=DfDr1nTnyEI --download-sections * 0: 21-1: 27 [/ code]

You can also specify a range in seconds, such as '* 21-87'.

[code] yt-dlp https://www.youtube.com/watch?v=DfDr1nTnyEI --download-sections * 21-87 [/ code]

When I checked the properties of the downloaded movie, a movie with a playback time of 1 minute and 6 seconds was saved, with the specified part cut out from the original movie.



◆ Download only designated chapters
With yt-dlp, it is possible to download not only the specified time but also the specified chapter. To download the specified chapter, just write the chapter name after '--download-sections'.

[code] yt-dp Movie URL --download-sections Chapter name [/ code]

For example, if you want to download the chapter 'Bicycle: Dark Road with Street Lights' in the movie with chapters (https://www.youtube.com/watch?v=oPpGQvB-Hb8) , execute the following command. .. Even if the chapter name is in Japanese, it works fine.

[code] yt-dlp https://www.youtube.com/watch?v=oPpGQvB-Hb8 --download-sections Bicycle: Dark road with street lights [/ code]

in Review,   Software, Posted by log1o_hf