TheFrenchGhosty / TheFrenchGhostys-Ultimate-YouTube-DL-Scripts-Collection

The ultimate collection of scripts for YouTube-DL.
GNU General Public License v3.0
2.29k stars 124 forks source link

Some videos randomly throwing errors and not downloading #95

Closed gotr3k closed 2 years ago

gotr3k commented 2 years ago

Any idea what might be causing this? Thanks

[download] 100% of 1.33MiB
[Merger] Merging formats into "From Nand to Tetris Part 1 - (MakkuZjAileron)\20180116 - [Part 1] Unit 0.0 - Introduction\20180116 - [Part 1] Unit 0.0 - Introduction [LqirVc5SlW0].mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:From Nand to Tetris Part 1 - (MakkuZjAileron)\20180116 - [Part 1] Unit 0.0 - Introduction\20180116 - [Part 1] Unit 0.0 - Introduction [LqirVc5SlW0].f247.webm" -i "file:From Nand to Tetris Part 1 - (MakkuZjAileron)\20180116 - [Part 1] Unit 0.0 - Introduction\20180116 - [Part 1] Unit 0.0 - Introduction [LqirVc5SlW0].f251.webm" -c copy -map "0:v:0" -map "1:a:0" -movflags "+faststart" "file:From Nand to Tetris Part 1 - (MakkuZjAileron)\20180116 - [Part 1] Unit 0.0 - Introduction\20180116 - [Part 1] Unit 0.0 - Introduction [LqirVc5SlW0].temp.mkv"
[debug] ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
file:From Nand to Tetris Part 1 - (MakkuZjAileron)\20180116 - [Part 1] Unit 0.0 - Introduction\20180116 - [Part 1] Unit 0.0 - Introduction [LqirVc5SlW0].f247.webm: No such file or directory

ERROR: file:From Nand to Tetris Part 1 - (MakkuZjAileron)\20180116 - [Part 1] Unit 0.0 - Introduction\20180116 - [Part 1] Unit 0.0 - Introduction [LqirVc5SlW0].f247.webm: No such file or directory
Traceback (most recent call last):
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 3385, in run_pp
    files_to_delete, infodict = pp.run(infodict)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\common.py", line 24, in run
    ret = func(self, info, *args, **kwargs)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\common.py", line 129, in wrapper
    return func(self, info)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\ffmpeg.py", line 828, in run
    self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\ffmpeg.py", line 323, in run_ffmpeg_multiple_files
    return self.real_run_ffmpeg(
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\ffmpeg.py", line 361, in real_run_ffmpeg
    raise FFmpegPostProcessorError(stderr.strip().splitlines()[-1])
yt_dlp.postprocessor.ffmpeg.FFmpegPostProcessorError: file:From Nand to Tetris Part 1 - (MakkuZjAileron)\20180116 - [Part 1] Unit 0.0 - Introduction\20180116 - [Part 1] Unit 0.0 - Introduction [LqirVc5SlW0].f247.webm: No such file or directory

[EmbedSubtitle] Embedding subtitles in "From Nand to Tetris Part 1 - (MakkuZjAileron)\20180116 - [Part 1] Unit 0.0 - Introduction\20180116 - [Part 1] Unit 0.0 - Introduction [LqirVc5SlW0].mkv"
ERROR: [WinError 2] The system cannot find the file specified: 'From Nand to Tetris Part 1 - (MakkuZjAileron)\\20180116 - [Part 1] Unit 0.0 - Introduction\\20180116 - [Part 1] Unit 0.0 - Introduction [LqirVc5SlW0].mkv'
Traceback (most recent call last):
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 1459, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 1556, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 1614, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 2712, in process_video_result
    self.process_info(new_info)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 3247, in process_info
    replace_info_dict(self.post_process(dl_filename, info_dict, files_to_move))
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 3424, in post_process
    info = self.run_all_pps('post_process', info, additional_pps=info.get('__postprocessors'))
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 3406, in run_all_pps
    info = self.run_pp(pp, info)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 3385, in run_pp
    files_to_delete, infodict = pp.run(infodict)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\common.py", line 24, in run
    ret = func(self, info, *args, **kwargs)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\common.py", line 129, in wrapper
    return func(self, info)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\ffmpeg.py", line 654, in run
    self.run_ffmpeg_multiple_files(input_files, temp_filename, opts)
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\ffmpeg.py", line 323, in run_ffmpeg_multiple_files
    return self.real_run_ffmpeg(
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\ffmpeg.py", line 330, in real_run_ffmpeg
    oldest_mtime = min(
  File "C:\Users\Gotrek\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\postprocessor\ffmpeg.py", line 331, in <genexpr>
    os.stat(encodeFilename(path)).st_mtime for path, _ in input_path_opts if path)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'From Nand to Tetris Part 1 - (MakkuZjAileron)\\20180116 - [Part 1] Unit 0.0 - Introduction\\20180116 - [Part 1] Unit 0.0 - Introduction [LqirVc5SlW0].mkv'
BromTeque commented 2 years ago

Duplicate of #89?

gotr3k commented 2 years ago

Duplicate of #89?

Just tested. It's not a problem with the filename /path length if that's what you meant. Full filename isn't even 200 characters long. No idea what might be the issue

BromTeque commented 2 years ago

Could you please edit the issue to include the entire log history? If the entire log history is too long, please include everything from the part where it debug prints the URL to the error. The debug print should look like something along the lines of [debug] [youtube] Extracting URL: <URL>

Also, how are you running the script?

gotr3k commented 2 years ago

I'm gonna be away for a couple of days so will post the log as soon as possible (i've deleted the previous folder when testing and for some reason it seems to be throttling download speed so i can't quickly redo the test now).

Also, how are you running the script?

Windows 10 git bash console The script was placed inside a root directory of a non-boot drive to prevent any possible path length issues.

BromTeque commented 2 years ago

Shot in the dark from my side, but could you try to run the script with YT-DLP's patched ffmpeg build n5.1, as well as the latest version of YT-DLP when you get back?

I believe Mutagen is baked into YT-DLP now, but if you have it installed separately please make sure that is also up to date.

gotr3k commented 2 years ago

Shot in the dark from my side, but could you try to run the script with YT-DLP's patched ffmpeg build n5.1, as well as the latest version of YT-DLP when you get back?

I believe Mutagen is baked into YT-DLP now, but if you have it installed separately please make sure that is also up to date.

Just got back, big sorry for the wait, will do what you suggested. Went over log files and downloaded files also just in case i missed something. Found nothing new but noticed that even some files that downloaded successfully were corrupt when trying to open, both video and audio only files. Checked and all dependencies are up to date. Will try out what you said and also rerun as is one more time to see if something changed. But can't tell for sure how long will it take as i need a bigger sample size to catch the errors and download speed is weirdly low even though i have gigabit connection. Any idea why it might be slow?

edit: i've installed yt-dlp via pip if that makes any difference

TheFrenchGhosty commented 2 years ago

That's a Windows problem It's definitely a path length issue.

Windows is unsupported.

BromTeque commented 2 years ago

Windows is unsupported.

Could you update the readme, cygwin readme (, and maybe WSL readme) to explicitly reflect this policy?

TheFrenchGhosty commented 2 years ago

@BromTeque I should yes. I'll look into it for the next update.

gotr3k commented 2 years ago

That's a Windows problem It's definitely a path length issue.

Windows is unsupported.

Just ran the exact same script an sources on linux with no issue. You are absolutely correct, something is broken on winows, though i still do no think its just a path length issue.