If you figure out what the command line options are, I could modify the plugin.
Hello @ryecoaaron, thank you for your response. I did some research about the command line options of the youtube-dl. Most of the information I found here: https://wiki.ubuntuusers.de/youtube-dl/
Unfortunately this site is in German language.
youtube-dl -F YOUTUBE_URL returns a list of available video- and audio-formats, each with a certain format code.
Example:
# youtube-dl -F https://www.youtube.com/watch?v=JGwWNGJdvx8
[youtube] JGwWNGJdvx8: Downloading webpage
[youtube] JGwWNGJdvx8: Downloading video info webpage
[youtube] JGwWNGJdvx8: Extracting video information
[info] Available formats for JGwWNGJdvx8:
format code extension resolution note
249 webm audio only DASH audio 56k , opus @ 50k, 1.55MiB
250 webm audio only DASH audio 79k , opus @ 70k, 2.07MiB
140 m4a audio only DASH audio 128k , m4a_dash container, mp4a.40.2@128k, 3.99MiB
171 webm audio only DASH audio 130k , vorbis@128k, 3.72MiB
251 webm audio only DASH audio 153k , opus @160k, 4.06MiB
278 webm 256x144 144p 126k , webm container, vp9, 24fps, video only, 2.98MiB
160 mp4 256x144 144p 127k , avc1.4d400c, 24fps, video only, 3.47MiB
242 webm 426x240 240p 270k , vp9, 24fps, video only, 5.29MiB
243 webm 640x360 360p 479k , vp9, 24fps, video only, 9.58MiB
134 mp4 640x360 360p 512k , avc1.4d401e, 24fps, video only, 8.93MiB
133 mp4 426x240 240p 600k , avc1.4d4015, 24fps, video only, 7.86MiB
244 webm 854x480 480p 839k , vp9, 24fps, video only, 15.75MiB
135 mp4 854x480 480p 1154k , avc1.4d401e, 24fps, video only, 17.77MiB
247 webm 1280x720 720p 1605k , vp9, 24fps, video only, 29.90MiB
136 mp4 1280x720 720p 2412k , avc1.4d401f, 24fps, video only, 33.08MiB
248 webm 1920x1080 1080p 2922k , vp9, 24fps, video only, 52.31MiB
137 mp4 1920x1080 1080p 4260k , avc1.640028, 24fps, video only, 60.52MiB
271 webm 2560x1440 1440p 8370k , vp9, 24fps, video only, 122.91MiB
264 mp4 2560x1440 1440p 8447k , avc1.640032, 24fps, video only, 167.64MiB
313 webm 3840x2160 2160p 19500k , vp9, 24fps, video only, 418.52MiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2
43 webm 640x360 medium , vp8.0, vorbis@128k
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)
Alles anzeigen
A certain video/audio format can be downloaded by
youtube-dl -f FORMAT_CODE YOUTUBE_URL, eg.
youtube-dl -f 22 https://www.youtube.com/watch?v=JGwWNGJdvx8, which in this case is mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k.
The problem is that the format codes are different for any of the videos.
There is an option in youtube-dl to always download the best audio and best video format:
youtube-dl -f bestvideo+bestaudio YOUTUBE_URL
I think this is the default setting in the Downloader plugin. Maybe therefore the .webm format is loaded although a .mp4 file extension is added to the file name.
There is another option to be independant of any format code and load the best audio and video format for a certain file format nevertheless:
youtube-dl -f bestvideo[ext=mp4]+bestaudio[ext=m4a] YOUTUBE_URL
That means: Load the best mp4-video format with the best m4a-audio format. Then a separate video and audio file are downloaded and afterwards merged with ffmpeg at the end. The original files then are deleted.
I discovered one drawback: It is necessary to define a video AND an audio format together. I tried it with [ext=mp4] only. In this case an .mkv file was created with video only and no audio.
I hope this information is helpful for you. Maybe an option could be added to select the desired video and audio format.
If you think about enhancing the downloader plugin may I express a second request?
Is there any possibility to download more than one file at a time without using a playlist? Maybe there could be another plugin enhancement to be able to define a list of URLs in the plugin instead of the playlist and in this case using the default name which is provided by the youtube-dl, instead of defining a name in the Filename field. Just an idea.