StefanLobbenmeier / youtube-dl-gui

A cross-platform GUI for youtube-dl made in Electron and node.js
GNU Affero General Public License v3.0
1.53k stars 61 forks source link

The files in mp4 format is downloaded by default from Youtube, while the best one is in .webm #11

Open iG8R opened 1 year ago

iG8R commented 1 year ago

Hello,

Describe the bug Trying to download a video with the best quality from Youtube results in obtaining only mp4 videos while among available formats the best one is webm.

To Reproduce Steps to reproduce the behavior:

  1. Add https://www.youtube.com/watch?v=nqbyzU2kErQ into "Open Video Downloader" -> don't change anything, except download location, press "Download"
  2. You'll get video in mp4 format
  3. Run yt-dlp -F --skip-download https://www.youtube.com/watch?v=nqbyzU2kErQ
  4. You'll see from the table of the available formats, that the last one and respectively the best one is webm format.

Expected behavior A webm file has to be downloaded by default.

Additional info (please complete the following information):

StefanLobbenmeier commented 1 year ago

So what you are saying is that this 90p string is the best resolution?

image

(also just adding the output of your command here)

yt-dlp -F --skip-download https://www.youtube.com/watch?v=nqbyzU2kErQ
[youtube] Extracting URL: https://www.youtube.com/watch?v=nqbyzU2kErQ
[youtube] nqbyzU2kErQ: Downloading webpage
[youtube] nqbyzU2kErQ: Downloading android player API JSON
[info] Available formats for nqbyzU2kErQ:
ID  EXT   RESOLUTION FPS CH │   FILESIZE   TBR PROTO │ VCODEC        VBR ACODEC      ABR ASR MORE INFO
────────────────────────────────────────────────────────────────────────────────────────────────────────────────
sb2 mhtml 48x27        0    │                  mhtml │ images                                storyboard
sb1 mhtml 107x45       0    │                  mhtml │ images                                storyboard
sb0 mhtml 214x90       0    │                  mhtml │ images                                storyboard
599 m4a   audio only      2 │    1.16MiB   31k https │ audio only        mp4a.40.5   31k 22k ultralow, m4a_dash
600 webm  audio only      2 │    1.46MiB   39k https │ audio only        opus        39k 48k ultralow, webm_dash
139 m4a   audio only      2 │    1.83MiB   49k https │ audio only        mp4a.40.5   49k 22k low, m4a_dash
249 webm  audio only      2 │    2.06MiB   55k https │ audio only        opus        55k 48k low, webm_dash
250 webm  audio only      2 │    2.66MiB   71k https │ audio only        opus        71k 48k low, webm_dash
140 m4a   audio only      2 │    4.86MiB  129k https │ audio only        mp4a.40.2  129k 44k medium, m4a_dash
251 webm  audio only      2 │    5.04MiB  134k https │ audio only        opus       134k 48k medium, webm_dash
17  3gp   176x144      6  1 │    3.02MiB   81k https │ mp4v.20.3     81k mp4a.40.2    0k 22k 144p
597 mp4   256x108     12    │  917.17KiB   24k https │ avc1.4d400b   24k video only          144p, mp4_dash
598 webm  256x108     13    │    1.15MiB   31k https │ vp9           31k video only          144p, webm_dash
160 mp4   256x108     25    │    3.09MiB   82k https │ avc1.4d400b   82k video only          144p, mp4_dash
278 webm  256x108     25    │    2.89MiB   77k https │ vp9           77k video only          144p, webm_dash
133 mp4   426x178     25    │    6.68MiB  178k https │ avc1.4d400d  178k video only          240p, mp4_dash
242 webm  426x178     25    │    5.87MiB  156k https │ vp9          156k video only          240p, webm_dash
134 mp4   640x268     25    │   15.80MiB  421k https │ avc1.4d4015  421k video only          360p, mp4_dash
18  mp4   640x268     25  2 │ ~ 21.15MiB  550k https │ avc1.42001E  550k mp4a.40.2    0k 44k 360p
243 webm  640x268     25    │   10.06MiB  268k https │ vp9          268k video only          360p, webm_dash
135 mp4   854x358     25    │   29.21MiB  779k https │ avc1.4d401e  779k video only          480p, mp4_dash
244 webm  854x358     25    │   16.62MiB  443k https │ vp9          443k video only          480p, webm_dash
22  mp4   1280x536    25  2 │ ~ 63.00MiB 1638k https │ avc1.64001F 1638k mp4a.40.2    0k 44k 720p
136 mp4   1280x536    25    │   56.62MiB 1509k https │ avc1.4d401f 1509k video only          720p, mp4_dash
247 webm  1280x536    25    │   26.03MiB  694k https │ vp9          694k video only          720p, webm_dash
137 mp4   1920x804    25    │  106.95MiB 2851k https │ avc1.640028 2851k video only          1080p, mp4_dash
248 webm  1920x804    25    │   43.69MiB 1165k https │ vp9         1165k video only          1080p, webm_dash
StefanLobbenmeier commented 1 year ago

Hmm actually I wonder if there is something wrong in the parser of the resolution - I suspect the 108 is actually 1080p.

In another fix #12 I already changed some other property to stop using human readable output and instead make yt-dlp give us the raw data

I suspect we will have to do something similar here.

iG8R commented 1 year ago

So what you are saying is that this 90p string is the best resolution?

Sorry, I can't match the string 90p0.203174... with any of the available formats given by yt-dlp -F --skip-download. All I know, that 248 webm 1920x804 25 │ 43.69MiB 1165k https │ vp9 1165k video only 1080p, webm_dash is the best format of the video and 251 webm audio only 2 │ 5.04MiB 134k https │ audio only opus 134k 48k medium, webm_dash for the audio of the regarded Youtube video. Since the --format "bestvideo+bestaudio/best" argument of the yt-dlp corresponds to the last one (bottom most) format of the video and audio, respectively.

StefanLobbenmeier commented 6 months ago

in v3, you can select any video format - for this video the default selection is the webm file and it will be converted if you use mp4 for the recode, remux and merge options