WebUI for "yt-dlp" to quickly download videos from YouTube
When you want to download YouTube videos, "yt-dlp" is a tool that is often used, but this time I used its WebUI.
I have already read about [yt-dlp] in various places, so I won't go into details here.
The environment we tried this time is Ubuntu with "yt-dlp" installed.
Here is the WebUI we tried.
How to Install
As stated on the official page, docker is the easiest way to install.
There are other installation methods, but I use docker.
I also use docker-compose because I didn't want to have to type commands every time.
docker-compose.yml is here.
1version: "3" 2services: 3 web: 4 image: "marcobaobao/yt-dlp-webui:latest" 5 restart: unless-stopped 6 ports: 7 - "3033:3033" 8 volumes: 9 - "/hogehoge/LocalPath:/downloads" 10networks: 11 default: 12 name: yt_net
After preparing the above file, start it with the following command.
The "/hogehoge/LocalPath" part of volumes should be the download folder of your environment.
1docker-compose up -d
Once up and running, access "127.0.0.1:3033" to display the WebUI.
There is no particular part to explain, but let's try to change the settings.
Click the gear icon on the left menu to go to the settings screen.
We have made the following changes here.
|yt-dlp のオプションの有効化||チェック ON||yt-dlp のオプション指定可能に|
Download from YouTube
Enter the URL of the YouTube video you wish to download and press the "Select Format" button.
At this point, you can also enter the yt-dlp options, save location, and file name.
Incidentally, if you have not checked the "Selectable videos/sources" checkbox in the settings screen, the download will begin as is.
Click the "Format Selection" button to select the desired format from the list of available DL formats.
You can also select only the sound source.
After selecting a format, press the "DOWNLOAD" button to start downloading.
When the download starts, thumbnails are displayed and a progress bar appears.
When it reaches 100%, the message "Completed" appears and the download is complete.
By the way, it seems that multiple downloads by playlist or channel are not possible.
It seemed to be working, but the system stopped responding, and when it came back, nothing was registered.
Maybe there were too many items on the list.
It is possible to register multiple downloads by registering them one by one.
When I click on a thumbnail in this state, nothing happens.
I wondered if it was possible to playback the file on the spot, but it seems that I can only delete this history by pressing the "CLEAR" button.
Please check the downloaded files in the local folder you have set.
Whether there is any advantage to using WebUI
I think this part alone has merit because you can select the format in the middle of the process.
However, if you only want to talk about this part, it might be better to use the GUI for Windows.
The possibility of WebUI is that it can be downloaded from anywhere on the go as long as it is on the Web.
This is a bit weak to be mentioned as an advantage.
However, I think it is easy and convenient to set up locally and throw in URL when you feel like it.
There are many ways to download Youtube, so you can use the one that suits you best, but I think "yt-dlp" is the easiest to use among them by far.
The reason for this is that you can combine a huge number of options to create a download that suits your preferences.
If you are interested in this area as well, you should look into it.
Commonly used option combinations when using yt-dlp
This is the combination of options I usually use.
Where it says "hogehoge", replace it with your environment or the target URL as appropriate.
DL from channels covering the period from 2 weeks ago to today
1yt-dlp --date today-2weeks -o "/hogehoge/%(channel)s/%(upload_date)s - %(title)s.%(ext)s" 'https://www.youtube.com/c/hogehoge'
Download videos uploaded from 2 weeks ago to today from the target channel.
Create a directory with the channel name, and the date and time of the upload and the title of the video will be the file name.
DL from playlist
1yt-dlp -o "/hogehoge/%(playlist)s/%(playlist_index)s.%(ext)s" 'https://www.youtube.com/hogehoge'
As with channels, downloads are made from playlists.
A directory is created with the playlist name, and the index number of the playlist is used as the file name.
1yt-dlp -x --audio-format mp3 -o "/hogehoge/%(title)s.%(ext)s" 'https://www.youtube.com/hogehoge'
The audio is extracted from the video and output as mp3.
If the file name is too long and an error occurs
1yt-dlp --trim-filenames 155 -o "/hogehoge/%(channel)s/%(upload_date)s - %(title)s.%(ext)s" 'https://www.youtube.com/c/hogehoge'
The error may occur if the channel or playlist name is long & the video title is also long. If it doesn't matter, use the index number of the playlist, etc. as the name, but if you have trouble later, shave the file name down to the very last minute and download it.
I was talking about yt-dlp's WebUI, but I think the UI may be beneficial for some people.
For example, if you use kodi's movie folder as a download folder, you can use kodi for playback.
However, I think such people are in the minority, so I recommend WindowsGUI for normal people.