A youtube-dl command to archive a Youtube channel in HD as an mp4, write the downloaded id to a file, save the thumbnail plus embed metadata to the video.
This is the command:
youtube-dl -f "bestvideo[height>=720]+bestaudio/best" -ciw -o "%(id)s.mp4" --add-metadata --embed-thumbnail --download-archive downloaded.txt --merge-output-format mp4 -v [CHANNEL URL]
All the options are from the documentation.
"bestvideo[height>=720]+bestaudio/best"
This gets the best video (stream) where the resolution height is equal to or greater than 720p. So if the video is available in 4k (2160p) that will be downloaded.
-ciw
Force resume of partially downloaded files, ignore erros and don’t overwrite files.
-o "%(id)s.mp4"
Save the file as id.mp4 where id is the video id.
--add-metadata --embed-thumbnail
Add metadata about the video into the file and save the thumbnail (id.jpg).
--download-archive downloaded.txt
Creates a text file (downloaded.txt) and writes in each video id that gets downloaded. This helps track and download newly uploaded videos.
-merge-output-format mp4
Merge the video into an MP4. This option is to avoid webm files. If you want webm video files remove this option and change .mp4 to .webm in the -o option.
-v [CHANNEL URL]
The channel URL.
A drained and empty Kennington reservoir images from a drone in early July 2024. The…
Merrimu Reservoir from drone. Click images to view larger.
Using FTP and PHP to get an array of file details such as size and…
Creating and using Laravel form requests to create cleaner code, separation and reusability for your…
Improving the default Laravel login and register views in such a simple manner but making…
Laravel validation for checking if a field value exists in the database. The validation rule…