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

Won't Download if Resulting File has Bad FileName #20363

Closed
SwimmingLink opened this issue Mar 15, 2019 · 0 comments
Closed

Won't Download if Resulting File has Bad FileName #20363

SwimmingLink opened this issue Mar 15, 2019 · 0 comments
Labels

Comments

@SwimmingLink
Copy link

@SwimmingLink SwimmingLink commented Mar 15, 2019

  • I've verified and I assure that I'm running youtube-dl 2019.03.09
  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

The purpose of my issue is:

  • Bug report (encountered problems with youtube-dl)

C:\Users\bpavlacka\Desktop\Personal\VIDEO\YTDL>youtube-dl https://twitter.com/PenPhiVA/status/1101894562849517568 -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://twitter.com/PenPhiVA/status/1101894562849517568', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.03.09
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg 4.1.1, ffprobe 4.1.1, phantomjs 2.1.1
[debug] Proxy map: {}
[twitter] 1101894562849517568: Downloading webpage
[twitter:card] 1101894562849517568: Downloading webpage
[twitter:card] 1101894562849517568: Downloading guest token
[twitter:card] 1101894562849517568: Downloading JSON metadata
[twitter:card] 1101894562849517568: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://video.twimg.com/ext_tw_video/1101894159776935937/pu/pl/1280x720/1j6Qv5WR_GS90xB0.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 3                                                                                          [download] Destination: Penni Smith - SCORBUNNY SQUAD 🐇🔥👟 - Galarish slang seems to be lost on some of the other trainers. They'll get use to it.  Hopefully. -- Gen 8 Trainer - @ElsieLovelock  Rosa & Mix - Me! Music - 'Ch...-1101894562849517568.mp4
ERROR: unable to download video data: [Errno 2] No such file or directory: "Penni Smith - SCORBUNNY SQUAD 🐇🔥👟 - Galarish slang seems to be lost on some of the other trainers. They'll get use to it.  Hopefully. -- Gen 8 Trainer - @ElsieLovelock  Rosa & Mix - Me! Music - 'Ch...-1101894562849517568.mp4.ytdl"
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\YoutubeDL.py", line 1913, in process_info                                                                                                          File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\YoutubeDL.py", line 1852, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\downloader\common.py", line 364, in download                                                                                                       File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\downloader\hls.py", line 110, in real_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\downloader\fragment.py", line 69, in _prepare_and_start_frag_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\downloader\fragment.py", line 179, in _prepare_frag_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\downloader\fragment.py", line 87, in _write_ytdl_file
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\utils.py", line 458, in sanitize_open
FileNotFoundError: [Errno 2] No such file or directory: "Penni Smith - SCORBUNNY SQUAD 🐇🔥👟 - Galarish slang seems to be lost on some of the other trainers. They'll get use to it.  Hopefully. -- Gen 8 Trainer - @ElsieLovelock  Rosa & Mix - Me! Music - 'Ch...-1101894562849517568.mp4.ytdl"

C:\Users\bpavlacka\Desktop\Personal\VIDEO\YTDL>youtube-dl https://twitter.com/PenPhiVA/status/1101894562849517568 --restrict-filenames -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://twitter.com/PenPhiVA/status/1101894562849517568', '--restrict-filenames', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.03.09
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg 4.1.1, ffprobe 4.1.1, phantomjs 2.1.1
[debug] Proxy map: {}
[twitter] 1101894562849517568: Downloading webpage
[twitter:card] 1101894562849517568: Downloading webpage
[twitter:card] 1101894562849517568: Downloading guest token
[twitter:card] 1101894562849517568: Downloading JSON metadata
[twitter:card] 1101894562849517568: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://video.twimg.com/ext_tw_video/1101894159776935937/pu/pl/1280x720/1j6Qv5WR_GS90xB0.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 3
[download] Destination: Penni_Smith_-_SCORBUNNY_SQUAD_-_Galarish_slang_seems_to_be_lost_on_some_of_the_other_trainers._They_ll_get_use_to_it._Hopefully._--_Gen_8_Trainer_-_@ElsieLovelock_Rosa_amp_Mix_-_Me_Music_-_Ch...-1101894562849517568.mp4
ERROR: unable to download video data: [Errno 2] No such file or directory: 'Penni_Smith_-_SCORBUNNY_SQUAD_-_Galarish_slang_seems_to_be_lost_on_some_of_the_other_trainers._They_ll_get_use_to_it._Hopefully._--_Gen_8_Trainer_-_@ElsieLovelock_Rosa_amp_Mix_-_Me_Music_-_Ch...-1101894562849517568.mp4.ytdl'
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\YoutubeDL.py", line 1913, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\YoutubeDL.py", line 1852, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\downloader\common.py", line 364, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\downloader\hls.py", line 110, in real_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\downloader\fragment.py", line 69, in _prepare_and_start_frag_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\downloader\fragment.py", line 179, in _prepare_frag_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\downloader\fragment.py", line 87, in _write_ytdl_file
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpy110f8qy\build\youtube_dl\utils.py", line 458, in sanitize_open
FileNotFoundError: [Errno 2] No such file or directory: 'Penni_Smith_-_SCORBUNNY_SQUAD_-_Galarish_slang_seems_to_be_lost_on_some_of_the_other_trainers._They_ll_get_use_to_it._Hopefully._--_Gen_8_Trainer_-_@ElsieLovelock_Rosa_amp_Mix_-_Me_Music_-_Ch...-1101894562849517568.mp4.ytdl'

C:\Users\bpavlacka\Desktop\Personal\VIDEO\YTDL>youtube-dl https://twitter.com/PenPhiVA/status/1101894562849517568 -o chips🐇🔥👟.mp4 -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://twitter.com/PenPhiVA/status/1101894562849517568', '-o', 'chips🐇🔥👟.mp4', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.03.09
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg 4.1.1, ffprobe 4.1.1, phantomjs 2.1.1
[debug] Proxy map: {}
[twitter] 1101894562849517568: Downloading webpage
[twitter:card] 1101894562849517568: Downloading webpage
[twitter:card] 1101894562849517568: Downloading guest token
[twitter:card] 1101894562849517568: Downloading JSON metadata
[twitter:card] 1101894562849517568: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://video.twimg.com/ext_tw_video/1101894159776935937/pu/pl/1280x720/1j6Qv5WR_GS90xB0.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 3
[download] Destination: chips🐇🔥👟.mp4
[download] 100% of 416.21KiB in 00:00
[debug] ffmpeg command line: ffprobe -show_streams "file:chips🐇🔥👟.mp4"
[ffmpeg] Fixing malformed AAC bitstream in "chips🐇🔥👟.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:chips🐇🔥👟.mp4" -c copy -f mp4 "-bsf:a" aac_adtstoasc "file:chips🐇🔥👟.temp.mp4"
...
<end of log>

Description of my issue, suggested solution and other information

Video won't download if the resulting output filename would be bad. I know that the issue isn't the symbol characters as I've downloaded plenty of other videos with such characters, so I'm assuming that the filename simply resulted too long. The end of the filename "Ch...-1101894562849517568.mp4" with the "..." is why I believe that this is the case. Simply adding "--restrict-filenames" did not fix the issue (2nd -v output supplied). I also supplied (with the symbol characters to prove that that isn't the issue) that the video does indeed download if simply renaming the output file. Not sure if this is highly dependent on the directory that the output file and/or temporary files are saved, but if the filenames could simply be shortened wherever they're having the issue, that might be the fix without the need of manually renaming.

Sorry for the long post - I figured it would be better with 3 different examples to help narrow down the cause of the issue.

@dstftw dstftw closed this Mar 15, 2019
@dstftw dstftw added the duplicate label Mar 15, 2019
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.