Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embed-thumbnail option chokes on single quotes in title (Windows 10 / W10) #25282

Closed
minig0d opened this issue May 14, 2020 · 3 comments
Closed

embed-thumbnail option chokes on single quotes in title (Windows 10 / W10) #25282

minig0d opened this issue May 14, 2020 · 3 comments

Comments

@minig0d
Copy link

@minig0d minig0d commented May 14, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.05.08
  • 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

C:\Users\Username\Desktop>youtube-dl -v --embed-thumbnail -x --audio-format mp3 https://www.youtube.com/watch?v=YTvideoID
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--embed-thumbnail', '-x', '--audio-format', 'mp3', 'https://www.youtube.com/watch?v=YTvideoID']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2020.05.08
[debug] Python version 3.7.7 (CPython) - Windows-10-10.0.18362-SP0
[debug] exe versions: avconv v11.7, avprobe v11.7
[debug] Proxy map: {}
[youtube] YTvideoID: Downloading webpage
[youtube] {18} signature length 105, html5 player 70f6ca87
[youtube] {137} signature length 105, html5 player 70f6ca87
[youtube] {248} signature length 105, html5 player 70f6ca87
[youtube] {136} signature length 105, html5 player 70f6ca87
[youtube] {247} signature length 105, html5 player 70f6ca87
[youtube] {398} signature length 105, html5 player 70f6ca87
[youtube] {135} signature length 105, html5 player 70f6ca87
[youtube] {244} signature length 101, html5 player 70f6ca87
[youtube] {397} signature length 105, html5 player 70f6ca87
[youtube] {134} signature length 105, html5 player 70f6ca87
[youtube] {243} signature length 105, html5 player 70f6ca87
[youtube] {396} signature length 105, html5 player 70f6ca87
[youtube] {133} signature length 105, html5 player 70f6ca87
[youtube] {242} signature length 105, html5 player 70f6ca87
[youtube] {395} signature length 105, html5 player 70f6ca87
[youtube] {160} signature length 105, html5 player 70f6ca87
[youtube] {278} signature length 105, html5 player 70f6ca87
[youtube] {394} signature length 101, html5 player 70f6ca87
[youtube] {140} signature length 105, html5 player 70f6ca87
[youtube] {249} signature length 105, html5 player 70f6ca87
[youtube] {250} signature length 105, html5 player 70f6ca87
[youtube] {251} signature length 105, html5 player 70f6ca87
[youtube] YTvideoID: Downloading thumbnail ...
[youtube] YTvideoID: Writing thumbnail to: ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.jpg
[debug] Invoking downloader on 'https://REDACTED==&ratebypass=yes'
[download] Destination: ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.webm
[download] 100% of 3.81MiB in 00:00
[debug] avconv command line: avprobe -show_streams "file:ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.webm"
[ffmpeg] Destination: ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.mp3
[debug] ffmpeg command line: avconv -y -i "file:ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.webm" -vn -acodec libmp3lame "-q:a" 5 "file:ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.mp3"
Deleting original file ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.webm (pass -k to keep)
[ffmpeg] Adding thumbnail to "ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.mp3"
[debug] ffmpeg command line: avconv -y -i "file:ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.mp3" -i "file:ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.jpg" -c copy -map 0 -map 1 "-metadata:s:v" "title=\"Album cover\"" "-metadata:s:v" "comment=\"Cover (Front)\"" "file:ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.temp.mp3"
ERROR: file:ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.jpg: No such file or directory
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\youtube_dl\YoutubeDL.py", line 2065, in post_process
    files_to_delete, info = pp.run(info)
  File "C:\Users\Username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\youtube_dl\postprocessor\embedthumbnail.py", line 51, in run
    self.run_ffmpeg_multiple_files([filename, thumbnail_filename], temp_filename, options)
  File "C:\Users\Username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\youtube_dl\postprocessor\ffmpeg.py", line 235, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: file:ArtistName – ‘QuotedPartOfSongName’ _ RestOfSongName-YTvideoID.jpg: No such file or directory

Description

Not sure if limited to just youtube or how far it extends, but with the latest version of yt-dl and the ---embed-thumbnail option (along with -x --audio-format mp3 which I'm guessing is inconsequential), both the mp3 and jpg are downloaded with identical filenames except for extension, however it looks like when the script is trying to embed the thumbnail it's getting choked on the single quotes in the title of the thumbnail image.

For reference the quotes that it choked on are U+2018 and U+2019 (not the U+0027 that is more commonly used in the US)

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 14, 2020

Most likely avconv issue not supporting file: prefix properly.

@minig0d
Copy link
Author

@minig0d minig0d commented May 14, 2020

Is there a suggested fix/workaround then?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 14, 2020

Use ffmpeg obviously.

@dstftw dstftw reopened this May 14, 2020
@dstftw dstftw closed this May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.