oleksis / youtube-dl-gui

A cross platform front-end GUI of the popular youtube-dl written in wxPython.
https://oleksis.github.io/youtube-dl-gui/
The Unlicense
1.76k stars 117 forks source link

60fps video is likely corrupted when using the yt-dlp client #37

Open Maris495 opened 3 years ago

Maris495 commented 3 years ago


What is the purpose of your issue?


Bug report

2021-07-02 12:01:47,683-DEBUG-Worker_1-[debug] Command-line config: ['--newline', '-i', '-o', 'D:\\Downloads\\Video\\%(title)s.%(ext)s', '-f', 'mp4', '-v', '--ignore-config', 'https://www.youtube.com/watch?v=1__G0NzTCCw']
2021-07-02 12:01:47,683-DEBUG-Worker_1-[debug] Encodings: locale cp1252, fs utf-8, out cp1252, pref cp1252
2021-07-02 12:01:47,683-DEBUG-Worker_1-[debug] yt-dlp version 2021.05.20 (exe)
2021-07-02 12:01:47,683-DEBUG-Worker_1-[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19041
2021-07-02 12:01:47,684-DEBUG-Worker_1-[debug] exe versions: ffmpeg 3.4
2021-07-02 12:01:47,684-DEBUG-Worker_1-[debug] Proxy map: {}
2021-07-02 12:01:47,684-DEBUG-Worker_1-[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=1__G0NzTCCw
2021-07-02 12:01:47,684-DEBUG-Worker_1-[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
2021-07-02 12:01:47,684-DEBUG-Worker_1-[debug] Invoking downloader on 'https://r4---sn-hp57yn7y.googlevideo.com/videoplayback?expire=1625263305&ei=aTjfYLTGGb3Mj-8P7v656AI&ip=2601%3A58a%3A8100%3Aabf0%3Ab8d7%3A3754%3Af24d%3Aa0df&id=o-AINus3mCG4d6E0a50F8p946fnVtf-HgM-DZycMJW20YR&itag=299&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303%2C308%2C315&source=youtube&requiressl=yes&mh=VX&mm=31%2C26&mn=sn-hp57yn7y%2Csn-5ualdn7r&ms=au%2Conr&mv=m&mvi=4&pl=32&initcwndbps=1507500&vprv=1&mime=video%2Fmp4&ns=4902X4B6KMNk8GGtQdqFvoAG&gir=yes&clen=2874611&dur=6.139&lmt=1571178818708113&mt=1625241172&fvip=4&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=2206222&n=t-xkt6HHd05s07&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAJq42mjdwR6qtDILMK_OfXOPUNulOPMLeVpUyMKTHCx2AiBqH3kVwaQpsJwb4WDesYhCmsrvYUEM084d3iov3mmPrg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgAhWnkio1xe6h_FMN1EB7eZdbHvC0mXVTsvcY8R8-x3wCIGqLrN6Cq4HNcTFgEZ5DldDyx2DPSmE-sIPW19hw2Y8u'

What operating system do you use ?

Windows 10

List of actions to perform to reproduce the problem:

  1. Switch CLI Backend to yt-dlp.exe
  2. Obtain a url of a 1080p 60fps YouTube video
  3. Start downloading the video

What is the expected behaviour ?

The video would be easily imported to Vegas Pro.

What happens instead ?

The video successfully downloaded in a high quality along with a high framerate. However, Vegas Pro instead shows up only one frame of the downloaded video then crashes. It plays fine on both VLC and Windows Media Player, but not on QuickTime player.


I believe this would be a main issue when wanting to use videos in the highest quality. It's more frustrating since using the youtube-dl client on youtube-dl GUI can mainly download videos in lesser quality under approximately 30 fps.

oleksis commented 3 years ago

@Maris495 I try figure out. With the info and logs you share my first through is the issue is a workaround with yt-dlp. If you find more info or ideas share with us.

Maris495 commented 3 years ago

My idea would be to convert the videos downloaded from the yt-dlp client into more compatible ones. However, it can be tedious gradually when doing this many times.

oleksis commented 3 years ago

My idea would be to convert the videos downloaded from the yt-dlp client into more compatible ones. However, it can be tedious gradually when doing this many times.

Thinking more about the Logs you share first time, you need the formats available for the video you want download. You can open the console and run yt-dlp with the option -F for the list all formats available, with more info about the quality bitrate . If you can try run:

yt-dlp -F 'https://www.youtube.com/watch?v=1__G0NzTCCw'

See the formats available and check the format you want is there. Remember by default is selected the best format

Maris495 commented 3 years ago

Here's some info I got. As a result, I'm unable to pick default because it's not there, but I did pick 'best*' instead. It worked for VLC and Windows Media Player, but QuickTime doesn't play it because the downloaded video is in a .webm format. image

oleksis commented 3 years ago

Here's some info I got. As a result, I'm unable to pick default because it's not there, but I did pick 'best*' instead. It worked for VLC and Windows Media Player, but QuickTime doesn't play it because the downloaded video is in a .webm format.

Try select convert the webm to MP4 or use Post-Processing (FFmpeg) and try convert to one format compatible with QuickTime like MOV

Let us know how work for you?

Maris495 commented 3 years ago

I converted the video to mp4 and it all worked on the three video players I have. However, the original .webm file I downloaded before doesn't have audio.

oleksis commented 3 years ago

I converted the video to mp4 and it all worked on the three video players I have. However, the original .webm file I downloaded before doesn't have audio.

Which format (-f) or argument you use for selection of the Formats?

You can share Logs and steps you follow?

Maris495 commented 3 years ago

I converted the video to mp4 and it all worked on the three video players I have. However, the original .webm file I downloaded before doesn't have audio.

Which format (-f) or argument you use for selection of the Formats?

You can share Logs and steps you follow?

Here are the steps I did. First, I open cmd and changed the directory to where the yt-dlp.exe file is Then, I failed a few times trying to make a code to download using the best format until I used my custom template I used for YouTube-DL.

The result is that both the video and the audio is here in the downloaded video, and that it works on VLC, Windows Media Player, and QuickTime Player.

(c) Microsoft Corporation. All rights reserved.

C:\Users\username>cd C:\Users\username\Desktop

C:\Users\username\Desktop>yt-dlp -F best* https://www.youtube.com/watch?v=1__G0NzTCCw
ERROR: 'best*' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:best*" ) to search YouTube
[youtube] 1__G0NzTCCw: Downloading webpage
[info] Available formats for 1__G0NzTCCw:
ID  EXT  RESOLUTION FPS |  FILESIZE    TBR PROTO | VCODEC        VBR ACODEC     ABR  ASR    NOTE
--- ---- ---------- --- - ---------- ----- ----- - ----------- ----- --------- ---- ------- ----------------------------------------
249 webm audio only     |  43.83KiB    58k https |                   opus       58k 48000Hz audio_quality_low, webm_dash, 48000Hz
250 webm audio only     |  55.89KiB    74k https |                   opus       74k 48000Hz audio_quality_low, webm_dash, 48000Hz
140 m4a  audio only     |  98.67KiB   130k https |                   mp4a.40.2 130k 44100Hz audio_quality_medium, m4a_dash, 44100Hz
251 webm audio only     |  103.60KiB  137k https |                   opus      137k 48000Hz audio_quality_medium, webm_dash, 48000Hz
160 mp4  192x144    30  |  54.75KiB    73k https | avc1.4d400c   73k                        144p, mp4_dash
278 webm 192x144    30  |  47.32KiB    63k https | vp9           63k                        144p, webm_dash
133 mp4  320x240    30  |  118.24KiB  157k https | avc1.4d400d  157k                        240p, mp4_dash
242 webm 320x240    30  |  80.55KiB   107k https | vp9          107k                        240p, webm_dash
134 mp4  480x360    30  |  262.24KiB  349k https | avc1.4d401e  349k                        360p, mp4_dash
18  mp4  480x360    30  |  348.66KiB  460k https | avc1.42001E  460k mp4a.40.2   0k 44100Hz 360p, 44100Hz
243 webm 480x360    30  |  117.46KiB  156k https | vp9          156k                        360p, webm_dash
135 mp4  640x480    30  |  528.12KiB  704k https | avc1.4d401e  704k                        480p, mp4_dash
244 webm 640x480    30  |  175.10KiB  233k https | vp9          233k                        480p, webm_dash
136 mp4  960x720    30  |  997.66KiB 1331k https | avc1.4d401f 1331k                        720p, mp4_dash
22  mp4  960x720    30  |            1460k https | avc1.64001F 1460k mp4a.40.2   0k 44100Hz 720p, 44100Hz
247 webm 960x720    30  |  273.52KiB  364k https | vp9          364k                        720p, webm_dash
298 mp4  960x720    60  |  1.49MiB   2032k https | avc1.4d4020 2032k                        720p60, mp4_dash
302 webm 960x720    60  |  437.17KiB  583k https | vp9          583k                        720p60, webm_dash
299 mp4  1440x1080  60  |  2.74MiB   3746k https | avc1.64002a 3746k                        1080p60, mp4_dash
303 webm 1440x1080  60  |  780.86KiB 1041k https | vp9         1041k                        1080p60, webm_dash
308 webm 1920x1440  60  |  1.77MiB   2416k https | vp9         2416k                        1440p60, webm_dash
315 webm 2880x2160  60  |  6.31MiB   8625k https | vp9         8625k                        2160p60, webm_dash

C:\Users\username\Desktop>yt-dlp -F best https://www.youtube.com/watch?v=1__G0NzTCCw
ERROR: 'best' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:best" ) to search YouTube
[youtube] 1__G0NzTCCw: Downloading webpage
[info] Available formats for 1__G0NzTCCw:
ID  EXT  RESOLUTION FPS |  FILESIZE    TBR PROTO | VCODEC        VBR ACODEC     ABR  ASR    NOTE
--- ---- ---------- --- - ---------- ----- ----- - ----------- ----- --------- ---- ------- ----------------------------------------
249 webm audio only     |  43.83KiB    58k https |                   opus       58k 48000Hz audio_quality_low, webm_dash, 48000Hz
250 webm audio only     |  55.89KiB    74k https |                   opus       74k 48000Hz audio_quality_low, webm_dash, 48000Hz
140 m4a  audio only     |  98.67KiB   130k https |                   mp4a.40.2 130k 44100Hz audio_quality_medium, m4a_dash, 44100Hz
251 webm audio only     |  103.60KiB  137k https |                   opus      137k 48000Hz audio_quality_medium, webm_dash, 48000Hz
160 mp4  192x144    30  |  54.75KiB    73k https | avc1.4d400c   73k                        144p, mp4_dash
278 webm 192x144    30  |  47.32KiB    63k https | vp9           63k                        144p, webm_dash
133 mp4  320x240    30  |  118.24KiB  157k https | avc1.4d400d  157k                        240p, mp4_dash
242 webm 320x240    30  |  80.55KiB   107k https | vp9          107k                        240p, webm_dash
134 mp4  480x360    30  |  262.24KiB  349k https | avc1.4d401e  349k                        360p, mp4_dash
18  mp4  480x360    30  |  348.66KiB  460k https | avc1.42001E  460k mp4a.40.2   0k 44100Hz 360p, 44100Hz
243 webm 480x360    30  |  117.46KiB  156k https | vp9          156k                        360p, webm_dash
135 mp4  640x480    30  |  528.12KiB  704k https | avc1.4d401e  704k                        480p, mp4_dash
244 webm 640x480    30  |  175.10KiB  233k https | vp9          233k                        480p, webm_dash
136 mp4  960x720    30  |  997.66KiB 1331k https | avc1.4d401f 1331k                        720p, mp4_dash
22  mp4  960x720    30  |            1460k https | avc1.64001F 1460k mp4a.40.2   0k 44100Hz 720p, 44100Hz
247 webm 960x720    30  |  273.52KiB  364k https | vp9          364k                        720p, webm_dash
298 mp4  960x720    60  |  1.49MiB   2032k https | avc1.4d4020 2032k                        720p60, mp4_dash
302 webm 960x720    60  |  437.17KiB  583k https | vp9          583k                        720p60, webm_dash
299 mp4  1440x1080  60  |  2.74MiB   3746k https | avc1.64002a 3746k                        1080p60, mp4_dash
303 webm 1440x1080  60  |  780.86KiB 1041k https | vp9         1041k                        1080p60, webm_dash
308 webm 1920x1440  60  |  1.77MiB   2416k https | vp9         2416k                        1440p60, webm_dash
315 webm 2880x2160  60  |  6.31MiB   8625k https | vp9         8625k                        2160p60, webm_dash

C:\Users\username\Desktop>
C:\Users\username\Desktop>
C:\Users\username\Desktop>yt-dlp -F mp4 best https://www.youtube.com/watch?v=1__G0NzTCCw
ERROR: 'mp4' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:mp4" ) to search YouTube
ERROR: 'best' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:best" ) to search YouTube
[youtube] 1__G0NzTCCw: Downloading webpage
[info] Available formats for 1__G0NzTCCw:
ID  EXT  RESOLUTION FPS |  FILESIZE    TBR PROTO | VCODEC        VBR ACODEC     ABR  ASR    NOTE
--- ---- ---------- --- - ---------- ----- ----- - ----------- ----- --------- ---- ------- ----------------------------------------
249 webm audio only     |  43.83KiB    58k https |                   opus       58k 48000Hz audio_quality_low, webm_dash, 48000Hz
250 webm audio only     |  55.89KiB    74k https |                   opus       74k 48000Hz audio_quality_low, webm_dash, 48000Hz
140 m4a  audio only     |  98.67KiB   130k https |                   mp4a.40.2 130k 44100Hz audio_quality_medium, m4a_dash, 44100Hz
251 webm audio only     |  103.60KiB  137k https |                   opus      137k 48000Hz audio_quality_medium, webm_dash, 48000Hz
160 mp4  192x144    30  |  54.75KiB    73k https | avc1.4d400c   73k                        144p, mp4_dash
278 webm 192x144    30  |  47.32KiB    63k https | vp9           63k                        144p, webm_dash
133 mp4  320x240    30  |  118.24KiB  157k https | avc1.4d400d  157k                        240p, mp4_dash
242 webm 320x240    30  |  80.55KiB   107k https | vp9          107k                        240p, webm_dash
134 mp4  480x360    30  |  262.24KiB  349k https | avc1.4d401e  349k                        360p, mp4_dash
18  mp4  480x360    30  |  348.66KiB  460k https | avc1.42001E  460k mp4a.40.2   0k 44100Hz 360p, 44100Hz
243 webm 480x360    30  |  117.46KiB  156k https | vp9          156k                        360p, webm_dash
135 mp4  640x480    30  |  528.12KiB  704k https | avc1.4d401e  704k                        480p, mp4_dash
244 webm 640x480    30  |  175.10KiB  233k https | vp9          233k                        480p, webm_dash
136 mp4  960x720    30  |  997.66KiB 1331k https | avc1.4d401f 1331k                        720p, mp4_dash
22  mp4  960x720    30  |            1460k https | avc1.64001F 1460k mp4a.40.2   0k 44100Hz 720p, 44100Hz
247 webm 960x720    30  |  273.52KiB  364k https | vp9          364k                        720p, webm_dash
298 mp4  960x720    60  |  1.49MiB   2032k https | avc1.4d4020 2032k                        720p60, mp4_dash
302 webm 960x720    60  |  437.17KiB  583k https | vp9          583k                        720p60, webm_dash
299 mp4  1440x1080  60  |  2.74MiB   3746k https | avc1.64002a 3746k                        1080p60, mp4_dash
303 webm 1440x1080  60  |  780.86KiB 1041k https | vp9         1041k                        1080p60, webm_dash
308 webm 1920x1440  60  |  1.77MiB   2416k https | vp9         2416k                        1440p60, webm_dash
315 webm 2880x2160  60  |  6.31MiB   8625k https | vp9         8625k                        2160p60, webm_dash

C:\Users\username\Desktop>yt-dlp -F -mp4 -best https://www.youtube.com/watch?v=1__G0NzTCCw
Usage: yt-dlp [OPTIONS] URL [URL...]

yt-dlp: error: no such option: -m

C:\Users\username\Desktop>
C:\Users\username\Desktop>
C:\Users\username\Desktop>yt-dlp --output D:\%(upload_date)s_-_%(title)s_-_%(id)s.%(ext)s --ffmpeg-location "C:\Program Files (x86)\ffmpeg-20200826-8f2c1f2-win64-static\bin" -f bestvideo[ext=mp4]+bestaudio[ext=m4a]  https://www.youtube.com/watch?v=1__G0NzTCCw
[youtube] 1__G0NzTCCw: Downloading webpage
[info] 1__G0NzTCCw: Downloading 1 format(s): 299+140
[download] Destination: D:\20191015_-_PBS (1989)_-_1__G0NzTCCw.f299.mp4
[download] 100% of 2.74MiB in 00:01
[download] Destination: D:\20191015_-_PBS (1989)_-_1__G0NzTCCw.f140.m4a
[download] 100% of 98.67KiB in 00:00
[Merger] Merging formats into "D:\20191015_-_PBS (1989)_-_1__G0NzTCCw.mp4"
Deleting original file D:\20191015_-_PBS (1989)_-_1__G0NzTCCw.f299.mp4 (pass -k to keep)
Deleting original file D:\20191015_-_PBS (1989)_-_1__G0NzTCCw.f140.m4a (pass -k to keep)

C:\Users\username\Desktop> 
oleksis commented 3 years ago

C:\Users\username\Desktop>yt-dlp -F best* https://www.youtube.com/watch?v=1__G0NzTCCw

When you use -F option the you past the URL don’t use best or any other format selection

C:\Users\username\Desktop>yt-dlp --output D:\%(upload_date)s_-_%(title)s_-_%(id)s.%(ext)s --ffmpeg-location "C:\Program Files (x86)\ffmpeg-20200826-8f2c1f2-win64-static\bin" -f bestvideo[ext=mp4]+bestaudio[ext=m4a]  https://www.youtube.com/watch?v=1__G0NzTCCw
[youtube] 1__G0NzTCCw: Downloading webpage
[info] 1__G0NzTCCw: Downloading 1 format(s): 299+140
[download] Destination: D:\20191015_-_PBS (1989)_-_1__G0NzTCCw.f299.mp4
[download] 100% of 2.74MiB in 00:01
[download] Destination: D:\20191015_-_PBS (1989)_-_1__G0NzTCCw.f140.m4a
[download] 100% of 98.67KiB in 00:00
[Merger] Merging formats into "D:\20191015_-_PBS (1989)_-_1__G0NzTCCw.mp4"
Deleting original file D:\20191015_-_PBS (1989)_-_1__G0NzTCCw.f299.mp4 (pass -k to keep)
Deleting original file D:\20191015_-_PBS (1989)_-_1__G0NzTCCw.f140.m4a (pass -k to keep)

You can see the final file is 20191015_-_PBS (1989)_-_1__G0NzTCCw.mp4 and was merged with the video(mp4)/audio(m4a)

If you get the .webm before mean was no possible merging the video/audio with the Formats you request

Maris495 commented 3 years ago

Thanks for the info. Anyways, do you know a solution to fix the 60fps in YT-DL GUI issue?