youtube-dl: Embedding thumbnail to mp3 causes a error of file not found.
Checklist
- I’m reporting a broken site support issue
- I’ve verified that I’m running youtube-dl version 2021.12.17
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar bug reports including closed ones
- I’ve read bugs section in FAQ
Verbose log
Enter youtube link here
: https://youtu.be/EmuBOfurv3o
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.9.7 (CPython) - Windows-10-10.0.19045-SP0
[debug] exe versions: ffmpeg N-55702-g920046a, ffprobe N-55702-g920046a
[debug] Proxy map: {}
[youtube] EmuBOfurv3o: Downloading webpage
[youtube] EmuBOfurv3o: Downloading thumbnail ...
[youtube] EmuBOfurv3o: Writing thumbnail to: C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webp
[debug] Invoking downloader on 'https://rr3---sn-8pgbpohxqp5-auoz.googlevideo.com/videoplayback?expire=1673060111&ei=r4q4Y7XKFpL6WZHhiogJ&ip=82.20.109.132&id=o-ABJG1zZD9xhRDoI0mygZaA-sn8GKrAXQCfedDAIETFW1&itag=251&source=youtube&requiressl=yes&mh=Hl&mm=31%2C29&mn=sn-8pgbpohxqp5-auoz%2Csn-aigzrnld&ms=au%2Crdu&mv=m&mvi=3&pl=24&gcr=gb&initcwndbps=1452500&vprv=1&mime=audio%2Fwebm&ns=d2TFtsH5f29GfvewFyI1bsYK&gir=yes&clen=3652610&dur=218.881&lmt=1591477016463657&mt=1673038191&fvip=2&keepalive=yes&fexp=24007246&c=WEB&txp=5531432&n=TzRconJyS9f2typNK&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAJVxiFfSM06d1_ZYmKMk6jhglWpU9-0YH_kltRReOQYcAiEA0VDOLjdBtxCK37s53cgcwHcP8-6U7UOmKJLWNIezNuc%3D&sig=AOq0QJ8wRAIgRJWXXrTtel1uWPH1zK0jIr5-zvgmAlgVaQVIj2VH7loCIEOVpuTSB_t2UQabcAHc3HT7uUPTs557ZZxfrgwh-MPk'
[download] Destination: C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webm
[download] 0.0% of 3.48MiB at 5.98KiB/s ETA 09:56
[download] 0.1% of 3.48MiB at 16.76KiB/s ETA 03:32
[download] 0.2% of 3.48MiB at 38.90KiB/s ETA 01:31
[download] 0.4% of 3.48MiB at 82.44KiB/s ETA 00:43
[download] 0.9% of 3.48MiB at 65.26KiB/s ETA 00:54
[download] 1.8% of 3.48MiB at 57.15KiB/s ETA 01:01
[download] 3.2% of 3.48MiB at 48.38KiB/s ETA 01:11
[download] 4.3% of 3.48MiB at 52.48KiB/s ETA 01:05
[download] 6.3% of 3.48MiB at 53.38KiB/s ETA 01:02
[download] 7.8% of 3.48MiB at 51.38KiB/s ETA 01:03
[download] 9.1% of 3.48MiB at 50.83KiB/s ETA 01:03
[download] 10.4% of 3.48MiB at 50.84KiB/s ETA 01:02
[download] 11.8% of 3.48MiB at 51.41KiB/s ETA 01:01
[download] 13.4% of 3.48MiB at 52.27KiB/s ETA 00:59
[download] 15.1% of 3.48MiB at 51.78KiB/s ETA 00:58
[download] 16.4% of 3.48MiB at 51.70KiB/s ETA 00:57
[download] 17.9% of 3.48MiB at 52.03KiB/s ETA 00:56
[download] 19.4% of 3.48MiB at 51.44KiB/s ETA 00:55
[download] 20.7% of 3.48MiB at 51.24KiB/s ETA 00:55
[download] 22.1% of 3.48MiB at 51.28KiB/s ETA 00:54
[download] 23.5% of 3.48MiB at 51.60KiB/s ETA 00:52
[download] 25.1% of 3.48MiB at 52.10KiB/s ETA 00:51
[download] 26.8% of 3.48MiB at 51.89KiB/s ETA 00:50
[download] 28.2% of 3.48MiB at 51.92KiB/s ETA 00:49
[download] 29.7% of 3.48MiB at 51.34KiB/s ETA 00:48
[download] 30.9% of 3.48MiB at 51.87KiB/s ETA 00:47
[download] 32.8% of 3.48MiB at 51.42KiB/s ETA 00:46
[download] 34.1% of 3.48MiB at 51.95KiB/s ETA 00:45
[download] 36.1% of 3.48MiB at 51.58KiB/s ETA 00:44
[download] 37.4% of 3.48MiB at 51.49KiB/s ETA 00:43
[download] 38.7% of 3.48MiB at 51.52KiB/s ETA 00:42
[download] 40.2% of 3.48MiB at 51.71KiB/s ETA 00:41
[download] 41.8% of 3.48MiB at 51.49KiB/s ETA 00:40
[download] 43.1% of 3.48MiB at 51.42KiB/s ETA 00:39
[download] 44.5% of 3.48MiB at 51.46KiB/s ETA 00:38
[download] 46.0% of 3.48MiB at 51.65KiB/s ETA 00:37
[download] 47.6% of 3.48MiB at 51.47KiB/s ETA 00:36
[download] 48.9% of 3.48MiB at 51.36KiB/s ETA 00:35
[download] 50.3% of 3.48MiB at 51.36KiB/s ETA 00:34
[download] 51.7% of 3.48MiB at 51.49KiB/s ETA 00:33
[download] 53.3% of 3.48MiB at 51.71KiB/s ETA 00:32
[download] 55.0% of 3.48MiB at 51.60KiB/s ETA 00:31
[download] 56.3% of 3.48MiB at 51.60KiB/s ETA 00:30
[download] 57.8% of 3.48MiB at 51.72KiB/s ETA 00:29
[download] 59.4% of 3.48MiB at 51.54KiB/s ETA 00:28
[download] 60.6% of 3.48MiB at 51.49KiB/s ETA 00:27
[download] 62.0% of 3.48MiB at 51.50KiB/s ETA 00:26
[download] 63.5% of 3.48MiB at 51.59KiB/s ETA 00:25
[download] 65.0% of 3.48MiB at 51.79KiB/s ETA 00:24
[download] 66.8% of 3.48MiB at 51.72KiB/s ETA 00:22
[download] 68.1% of 3.48MiB at 51.74KiB/s ETA 00:21
[download] 69.6% of 3.48MiB at 51.51KiB/s ETA 00:21
[download] 70.8% of 3.48MiB at 51.74KiB/s ETA 00:20
[download] 72.8% of 3.48MiB at 51.51KiB/s ETA 00:18
[download] 74.0% of 3.48MiB at 51.47KiB/s ETA 00:18
[download] 75.4% of 3.48MiB at 51.49KiB/s ETA 00:17
[download] 76.9% of 3.48MiB at 51.57KiB/s ETA 00:15
[download] 78.5% of 3.48MiB at 51.74KiB/s ETA 00:14
[download] 80.2% of 3.48MiB at 51.70KiB/s ETA 00:13
[download] 81.6% of 3.48MiB at 51.72KiB/s ETA 00:12
[download] 83.1% of 3.48MiB at 51.52KiB/s ETA 00:11
[download] 84.3% of 3.48MiB at 51.70KiB/s ETA 00:10
[download] 86.2% of 3.48MiB at 51.49KiB/s ETA 00:09
[download] 87.4% of 3.48MiB at 51.70KiB/s ETA 00:08
[download] 89.4% of 3.48MiB at 51.57KiB/s ETA 00:07
[download] 90.7% of 3.48MiB at 51.54KiB/s ETA 00:06
[download] 92.1% of 3.48MiB at 51.57KiB/s ETA 00:05
[download] 93.6% of 3.48MiB at 51.66KiB/s ETA 00:04
[download] 95.2% of 3.48MiB at 51.56KiB/s ETA 00:03
[download] 96.5% of 3.48MiB at 51.53KiB/s ETA 00:02
[download] 97.9% of 3.48MiB at 51.55KiB/s ETA 00:01
[download] 99.4% of 3.48MiB at 51.61KiB/s ETA 00:00
[download] 100.0% of 3.48MiB at 51.71KiB/s ETA 00:00
[download] 100% of 3.48MiB in 01:09
[debug] ffmpeg command line: ffprobe -show_streams "file:C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webm"
[ffmpeg] Destination: C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).mp3
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webm" -vn -acodec libmp3lame "-b:a" 192k "file:C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).mp3"
Deleting original file C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webm (pass -k to keep)
[ffmpeg] Converting thumbnail "C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webp" to JPEG
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webp" "-bsf:v" mjpeg2jpeg "file:C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).jpg"
[debug] ffmpeg version N-55702-g920046a Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 21 2013 18:10:00 with gcc 4.7.3 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 42.100 / 52. 42.100
libavcodec 55. 29.100 / 55. 29.100
libavformat 55. 14.101 / 55. 14.101
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 5.100 / 2. 5.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
[image2 @ 00000000006ecc80] Could find no file with path 'file:C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webp' and index in the range 0-4
ERROR: file:C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webp: No such file or directory
Traceback (most recent call last):
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 2115, in post_process
files_to_delete, info = pp.run(info)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\postprocessor\embedthumbnail.py", line 70, in run
self.run_ffmpeg(escaped_thumbnail_filename, escaped_thumbnail_jpg_filename, ['-bsf:v', 'mjpeg2jpeg'])
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\postprocessor\ffmpeg.py", line 242, in run_ffmpeg
self.run_ffmpeg_multiple_files([path], out_path, opts)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\postprocessor\ffmpeg.py", line 238, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: file:C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webp: No such file or directory
Traceback (most recent call last):
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 2115, in post_process
files_to_delete, info = pp.run(info)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\postprocessor\embedthumbnail.py", line 70, in run
self.run_ffmpeg(escaped_thumbnail_filename, escaped_thumbnail_jpg_filename, ['-bsf:v', 'mjpeg2jpeg'])
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\postprocessor\ffmpeg.py", line 242, in run_ffmpeg
self.run_ffmpeg_multiple_files([path], out_path, opts)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\postprocessor\ffmpeg.py", line 238, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: file:C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webp: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Tayga\Desktop\videos\download videos.py", line 26, in <module>
ydl.download([video])
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 2068, in download
res = self.extract_info(
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 808, in extract_info
return self.__extract_info(url, ie, download, extra_info, process)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in wrapper
return func(self, *args, **kwargs)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 847, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 881, in process_ie_result
return self.process_video_result(ie_result, download=download)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 1692, in process_video_result
self.process_info(new_info)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 2050, in process_info
self.post_process(filename, info_dict)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 2117, in post_process
self.report_error(e.msg)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 628, in report_error
self.trouble(error_message, tb)
File "C:\Users\Tayga\AppData\Local\Programs\Python\Python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 598, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: file:C:\Users\Tayga\Desktop\videos\Tusk (2018 Remaster).webp: No such file or directory
Description
A exception is raised when embedding the video thumbnail to the mp3 file, The program is unable to find the file despite the fact the file exists in the correct directory, The problem hasn’t occurred when working on another computer with Windows 11 but occurs here on Windows 10 both computers have the same dependencies and running the same version of python
I am not sure what has caused this bug and I am unable to propose a solution due to this
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 19 (11 by maintainers)
This is indeed the case.
For the embedding, there are these two yt-dlp commits that make up the diff above:
At some point this comment applied and probably still does:
For the conversion:
-update 1has to be added according to this issue for new ffmpeg builds.-movflags +faststartis only relevant for MP4/MOV destination containers, so not for MP3 (fun fact: the+means just setfaststartand don’t reset any othermovflags, which was “so obvious that it went without saying” in the _ffmpeg_docs).synopsis=is forcing an empty description but from the yt-dlp code I have no idea how it came to be there (would becomment=in yt-dl or, I guess, with yt-dlp compat set).So I think
-update 1and the ID3 options have to be added.Thanks for this research.
What, after copying to the Windows test machine? That’s the acid test.
The postprocessor code has evolved somewhat in yt-dlp. It’s possible that there’s some subtle difference in the ffmpeg command lines used for the embedding, and/or for the MP3 extraction, such that the yt-dlp result matches Win10 Explorer’s understanding of MP3 cover art better. Use
--verboseto show the ffmpeg command lines.Windows versions may differ. In the olden days there was a separate shell extension that could be inspected separately but who knows what’s going on in the too-bad-for-open-source Windows code.
for the first line I receive this:
the second command did create a file called aaa_2.jpg which contains the nordic landscape the output was this