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

Thumbnail Downloaded from YouTube - Filename is truncated after period in filename #26010

Closed
5 of 6 tasks
holygamer opened this issue Jul 15, 2020 · 1 comment
Closed
5 of 6 tasks

Comments

@holygamer
Copy link

holygamer commented Jul 15, 2020

Checklist

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

PASTE VERBOSE LOG HERE

X:\Portable Installations\YouTube-DL>cd /D "X:\Portable Installations\YouTube-DL
"

X:\Portable Installations\YouTube-DL># The Stig
'#' is not recognized as an internal or external command,
operable program or batch file.

X:\Portable Installations\YouTube-DL>youtube-dl https://www.youtube.com/channel/
UCfwE_ODI1YTbdjkzuSi1Nag -o "L:/YouTube/Politics/%(uploader)s/%(upload_date)s
%(title)s %(id)s New Zealand %(height)sp (%(vcodec)s %(acodec)s) FPS %(fp
s)s, Views %(view_count)s" --merge-output-format mkv --format ("bestvideo[width>
=1920]"/bestvideo)+bestaudio/best --embed-subs --sub-lang en --ignore-errors --r
estrict-filenames --write-description --write-thumbnail --download-archive archi
ve.txt --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/channel/UCfwE_ODI1YTbdjkzuS
i1Nag', '-o', 'L:/YouTube/Politics/%(uploader)s/%(upload_date)s %(title)s
%(id)s New Zealand %(height)sp (%(vcodec)s %(acodec)s) FPS %(fps)s, Views %(v
iew_count)s', '--merge-output-format', 'mkv', '--format', '(bestvideo[width>=192
0]/bestvideo)+bestaudio/best', '--embed-subs', '--sub-lang', 'en', '--ignore-err
ors', '--restrict-filenames', '--write-description', '--write-thumbnail', '--dow
nload-archive', 'archive.txt', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-65018-gad91bf8, ffprobe N-65018-gad91bf8
[debug] Proxy map: {}
[youtube:channel] UCfwE_ODI1YTbdjkzuSi1Nag: Downloading channel page
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading webpage
[download] Downloading playlist: Uploads from TheQuartering
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #1
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #2
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #3
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #4
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #5
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #6
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #7
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #8
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #9
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #10
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #11
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #12
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #13
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #14
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #15
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #16
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #17
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #18
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #19
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #20
[youtube:playlist] UUfwE_ODI1YTbdjkzuSi1Nag: Downloading page #21
[youtube:playlist] playlist Uploads from TheQuartering: Downloading 2113 videos
[download] Downloading video 2 of 2113
[youtube] qmcN6zdlJls: Downloading webpage
[info] Writing video description to: L:\YouTube\Politics\TheQuartering\20200714
Dr._Disrespect_Ban_For_Serious_Criminal_Issues_Youtube_OFF_The_Table qmcN6
zdlJls New Zealand 1080p (vp9 opus) FPS 60, Views 44253.description
[youtube] qmcN6zdlJls: Downloading thumbnail ...
[youtube] qmcN6zdlJls: Writing thumbnail to: L:\YouTube\Politics\TheQuartering\2
0200714 Dr.webp
[debug] Invoking downloader on 'https://r4---sn-cu-ba5l.googlevideo.com/videopla
yback?expire=1594809218&ei=IocOX8-GCaCTmLAPgsajyAc&ip=2a00%3A23c5%3A2c53%3A5301%
3Adcc8%3Aa47a%3A8a7e%3A645&id=o-AGqjBuC6ziOA_eOF2calGzHzVjxSBvvG2s4O7t0B2u4B&ita
g=303&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C2
78%2C298%2C299%2C302%2C303&source=youtube&requiressl=yes&mh=lL&mm=31%2C29&mn=sn-
cu-ba5l%2Csn-cu-ajtez&ms=au%2Crdu&mv=m&mvi=4&pl=41&initcwndbps=1890000&vprv=1&mi
me=video%2Fwebm&gir=yes&clen=185478304&dur=819.299&lmt=1594786051766759&mt=15947
87491&fvip=9&keepalive=yes&c=WEB&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Cait
ags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQI
gTVM10GkrS9tiNM27KjsAGVZaa6itWz50HL0FFzrwwDICIQDq52NkrDanQ_NLiZ85qmlm59JiWlTd4kR
IxSQITsFYag%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=
AG3C_xAwRgIhAIcv05V1vmP9dqZvzdkChKnlrnb_FaGrvlfyMbRooa_CAiEA8UMZLBZVDqgIhMm4WUHq
2bGU2h3-iHQfEU2zt0C_6M0%3D&ratebypass=yes'
[download] Destination: L:\YouTube\Politics\TheQuartering\20200714 Dr._Disres
pect_Ban_For_Serious_Criminal_Issues_Youtube_OFF_The_Table qmcN6zdlJls New
Zealand 1080p (vp9 none) FPS 60, Views 44253.f303
[download] 100% of 176.89MiB in 01:22
[debug] Invoking downloader on 'https://r4---sn-cu-ba5l.googlevideo.com/videopla
yback?expire=1594809218&ei=IocOX8-GCaCTmLAPgsajyAc&ip=2a00%3A23c5%3A2c53%3A5301%
3Adcc8%3Aa47a%3A8a7e%3A645&id=o-AGqjBuC6ziOA_eOF2calGzHzVjxSBvvG2s4O7t0B2u4B&ita
g=251&source=youtube&requiressl=yes&mh=lL&mm=31%2C29&mn=sn-cu-ba5l%2Csn-cu-ajtez
&ms=au%2Crdu&mv=m&mvi=4&pl=41&initcwndbps=1890000&vprv=1&mime=audio%2Fwebm&gir=y
es&clen=11897356&dur=819.321&lmt=1594762265205396&mt=1594787491&fvip=9&keepalive
=yes&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiress
l%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgVAT-fZ4LWFKCKvT84MmepsH
LD4duMhbaXJq-G-oNATkCIGcFZ6Y0JCi3DVokfnY4lYGfV30ndcon66Hj4XmNTz4d&lsparams=mh%2C
mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAIcv05V1vmP9dqZvzdkC
hKnlrnb_FaGrvlfyMbRooa_CAiEA8UMZLBZVDqgIhMm4WUHq2bGU2h3-iHQfEU2zt0C_6M0%3D&rateb
ypass=yes'
[download] Destination: L:\YouTube\Politics\TheQuartering\20200714 Dr._Disres
pect_Ban_For_Serious_Criminal_Issues_Youtube_OFF_The_Table qmcN6zdlJls New
Zealand NAp (none opus) FPS NA, Views 44253.f251
[download] 100% of 11.35MiB in 00:06
[ffmpeg] Merging formats into "L:\YouTube\Politics\TheQuartering\20200714 Dr.
_Disrespect_Ban_For_Serious_Criminal_Issues_Youtube_OFF_The_Table qmcN6zdlJls
New Zealand 1080p (vp9 opus) FPS 60, Views 44253.mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:L:\YouTu
be\Politics\TheQuartering\20200714 Dr._Disrespect_Ban_For_Serious_Criminal_Is
sues_Youtube_OFF_The_Table qmcN6zdlJls New Zealand 1080p (vp9 none) FPS 60
, Views 44253.f303" -i "file:L:\YouTube\Politics\TheQuartering\20200714 Dr._D
isrespect_Ban_For_Serious_Criminal_Issues_Youtube_OFF_The_Table qmcN6zdlJls
New Zealand NAp (none opus) FPS NA, Views 44253.f251" -c copy -map "0:v:0" -ma
p "1:a:0" "file:L:\YouTube\Politics\TheQuartering\20200714 Dr._Disrespect_Ban
_For_Serious_Criminal_Issues_Youtube_OFF_The_Table qmcN6zdlJls New Zealand
1080p (vp9 opus) FPS 60, Views 44253.temp.mkv"
Deleting original file L:\YouTube\Politics\TheQuartering\20200714 Dr._Disresp
ect_Ban_For_Serious_Criminal_Issues_Youtube_OFF_The_Table qmcN6zdlJls New
Zealand 1080p (vp9 none) FPS 60, Views 44253.f303 (pass -k to keep)
Deleting original file L:\YouTube\Politics\TheQuartering\20200714 Dr._Disresp
ect_Ban_For_Serious_Criminal_Issues_Youtube_OFF_The_Table qmcN6zdlJls New
Zealand NAp (none opus) FPS NA, Views 44253.f251 (pass -k to keep)
[ffmpeg] There aren't any subtitles to embed

X:\Portable Installations\YouTube-DL>cd /D "X:\Portable Installations\YouTube-DL
"

X:\Portable Installations\YouTube-DL># The Stig
'#' is not recognized as an internal or external command,
operable program or batch file.

X:\Portable Installations\YouTube-DL>youtube-dl https://www.youtube.com/channel/
UCC_lWLPSW0H2uswbOZa0gng -o "L:/YouTube/Politics/%(uploader)s/%(upload_date)s
%(title)s %(id)s New Zealand %(height)sp (%(vcodec)s %(acodec)s) FPS %(fps)
s, Views %(view_count)s" --merge-output-format mkv --write-thumbnail --format ("
bestvideo[width>=1920]"/bestvideo)+bestaudio/best --embed-subs --sub-lang en --i
gnore-errors --restrict-filenames --write-description --download-archive archive
.txt --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/channel/UCC_lWLPSW0H2uswbOZ
a0gng', '-o', 'L:/YouTube/Politics/%(uploader)s/%(upload_date)s %(title)s
%(id)s New Zealand %(height)sp (%(vcodec)s %(acodec)s) FPS %(fps)s, Views %(vie
w_count)s', '--merge-output-format', 'mkv', '--write-thumbnail', '--format', '(b
estvideo[width>=1920]/bestvideo)+bestaudio/best', '--embed-subs', '--sub-lang',
'en', '--ignore-errors', '--restrict-filenames', '--write-description', '--downl
oad-archive', 'archive.txt', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-65018-gad91bf8, ffprobe N-65018-gad91bf8
[debug] Proxy map: {}
[youtube:channel] UCC_lWLPSW0H2uswbOZa0gng: Downloading channel page
[youtube:playlist] UUC_lWLPSW0H2uswbOZa0gng: Downloading webpage
[download] Downloading playlist: Uploads from Sim Racing with The Stig
[youtube:playlist] playlist Uploads from Sim Racing with The Stig: Downloading 1
videos
[download] Downloading video 1 of 1
[youtube] T19XEqOJMCA: Downloading webpage
[youtube] T19XEqOJMCA: Downloading MPD manifest
[info] Writing video description to: L:\YouTube\Politics\Sim_Racing_with_The_Sti
g\20150227 Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza T19XEqOJMCA N
ew Zealand 720p (avc1.4d400c opus) FPS 30, Views 141.description
[youtube] T19XEqOJMCA: Downloading thumbnail ...
[youtube] T19XEqOJMCA: Writing thumbnail to: L:\YouTube\Politics\Sim_Racing_with
_The_Stig\20150227 Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza T19XEq
OJMCA New Zealand 720p (avc1.webp
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/da
sh/expire/1594808208/ei/MIMOX52ABoev0wWhxKXQAw/ip/2a00%3A23c5%3A2c53%3A5301%3Adc
c8%3Aa47a%3A8a7e%3A645/id/4f5f5712a3893020/source/youtube/requiressl/yes/playbac
k_host/r1---sn-cu-ba5e.googlevideo.com/mh/el/mm/31%2C29/mn/sn-cu-ba5e%2Csn-cu-aj
tez/ms/au%2Crdu/mv/m/mvi/1/pl/41/hfr/all/as/fmp4_audio_clear%2Cwebm_audio_clear%
2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/initcwndbps/1687500/v
prv/1/mt/1594786468/fvip/10/keepalive/yes/itag/0/sparams/expire%2Cei%2Cip%2Cid%2
Csource%2Crequiressl%2Chfr%2Cas%2Cvprv%2Citag/sig/AOq0QJ8wRQIgNHP_N9ZuGFIIDw32S4
SFOLSkEF0TrrGe6thoLymBqcECIQCm6SAnDlpWGb0NGcLTJdhFMWvYQ1N5M6BPvaa6E3FJOA%3D%3D/l
sparams/playback_host%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps/lsig/AG3
C_xAwRgIhAMZItCJRnZH7VDxDR9dUyuB_iANhbxbLPM_Pwwgl-PzuAiEAjT_bWEB5IXYLH8ZOfJFA6ke
RxdJwz0NDVHOC6Utjw0w%3D'
[dashsegments] Total fragments: 24
[download] Destination: L:\YouTube\Politics\Sim_Racing_with_The_Stig\20150227
Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza T19XEqOJMCA New Zealand 72
0p (avc1.4d400c none) FPS 30, Views 141.f136
[download] 100% of 26.07MiB in 00:45
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/da
sh/expire/1594808208/ei/MIMOX52ABoev0wWhxKXQAw/ip/2a00%3A23c5%3A2c53%3A5301%3Adc
c8%3Aa47a%3A8a7e%3A645/id/4f5f5712a3893020/source/youtube/requiressl/yes/playbac
k_host/r1---sn-cu-ba5e.googlevideo.com/mh/el/mm/31%2C29/mn/sn-cu-ba5e%2Csn-cu-aj
tez/ms/au%2Crdu/mv/m/mvi/1/pl/41/hfr/all/as/fmp4_audio_clear%2Cwebm_audio_clear%
2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/initcwndbps/1687500/v
prv/1/mt/1594786468/fvip/10/keepalive/yes/itag/0/sparams/expire%2Cei%2Cip%2Cid%2
Csource%2Crequiressl%2Chfr%2Cas%2Cvprv%2Citag/sig/AOq0QJ8wRQIgNHP_N9ZuGFIIDw32S4
SFOLSkEF0TrrGe6thoLymBqcECIQCm6SAnDlpWGb0NGcLTJdhFMWvYQ1N5M6BPvaa6E3FJOA%3D%3D/l
sparams/playback_host%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps/lsig/AG3
C_xAwRgIhAMZItCJRnZH7VDxDR9dUyuB_iANhbxbLPM_Pwwgl-PzuAiEAjT_bWEB5IXYLH8ZOfJFA6ke
RxdJwz0NDVHOC6Utjw0w%3D'
[dashsegments] Total fragments: 13
[download] Destination: L:\YouTube\Politics\Sim_Racing_with_The_Stig\20150227
Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza T19XEqOJMCA New Zealand NA
p (none opus) FPS NA, Views 141.f251
[download] 100% of 1.69MiB in 00:08
[ffmpeg] Merging formats into "L:\YouTube\Politics\Sim_Racing_with_The_Stig\2015
0227 Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza T19XEqOJMCA New Zea
land 720p (avc1.4d400c opus) FPS 30, Views 141.mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:L:\YouTu
be\Politics\Sim_Racing_with_The_Stig\20150227 Dr._The_Stig_gets_Top_Gear_Trac
k_Record_in_Forza T19XEqOJMCA New Zealand 720p (avc1.4d400c none) FPS 30, Vi
ews 141.f136" -i "file:L:\YouTube\Politics\Sim_Racing_with_The_Stig\20150227
Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza T19XEqOJMCA New Zealand NAp
(none opus) FPS NA, Views 141.f251" -c copy -map "0:v:0" -map "1:a:0" "file:L:
YouTube\Politics\Sim_Racing_with_The_Stig\20150227 Dr._The_Stig_gets_Top_Gear
_Track_Record_in_Forza T19XEqOJMCA New Zealand 720p (avc1.4d400c opus) FPS 3
0, Views 141.temp.mkv"
Deleting original file L:\YouTube\Politics\Sim_Racing_with_The_Stig\20150227
Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza T19XEqOJMCA New Zealand 720
p (avc1.4d400c none) FPS 30, Views 141.f136 (pass -k to keep)
Deleting original file L:\YouTube\Politics\Sim_Racing_with_The_Stig\20150227
Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza T19XEqOJMCA New Zealand NAp
(none opus) FPS NA, Views 141.f251 (pass -k to keep)
[ffmpeg] There aren't any subtitles to embed
[download] Finished downloading playlist: Uploads from Sim Racing with The Stig

X:\Portable Installations\YouTube-DL>youtube-dl -U
youtube-dl is up-to-date (2020.06.16.1)

X:\Portable Installations\YouTube-DL>PAUSE
Press any key to continue . . .

Description

WRITE DESCRIPTION HERE

Log for this video I was downloading from YouTube is the first log above: Dr._Disrespect_Ban_For_Serious_Criminal_Issues_Youtube_OFF_The_Table
Problem is that the thumbnail is titled "20200714 Dr.webp" instead of having the same name as the video.

The 2nd log above is for this file: Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza
Thumbnail is named as this: "20150227 Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza T19XEqOJMCA New Zealand 720p (avc1.webp" instead of this which is the name of the video:
20150227 "Dr._The_Stig_gets_Top_Gear_Track_Record_in_Forza T19XEqOJMCA New Zealand 720p (avc1.4d400c opus) FPS 30, Views 141"

Don't know why the first video cuts off all text after Dr. in the thumbnail filename yet it didn't do that with the 2nd video where it only cut off the text after the dot that was part of the video codec name.

@compujo
Copy link
Contributor

compujo commented Nov 28, 2020

In YoutubeDL.py:

            t['filename'] = thumb_filename = os.path.splitext(filename)[0] + suffix + '.' + thumb_ext

I believe os.path.splitext(filename)[0] is getting the supplied filename up until the first period in order to strip out the file extension.

It looks like the replace_extention() function from utils.py can be used instead, maybe like so:

            t['filename'] = thumb_filename = replace_extension(filename + suffix, thumb_ext, info_dict.get('ext')) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants