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

Filename too long even after using restrict-filenames #22673

Closed
shirishag75 opened this issue Oct 10, 2019 · 3 comments
Closed

Filename too long even after using restrict-filenames #22673

shirishag75 opened this issue Oct 10, 2019 · 3 comments

Comments

@shirishag75
Copy link

@shirishag75 shirishag75 commented Oct 10, 2019

This is my youtube-dl -

Package: youtube-dl
Version: 2019.09.28-1
Severity: normal

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'testing-debug'), (100, 'unstable-debug'), (100, 'experimental'), (100, 'unstable'), (50, 'experimental-debug')
Architecture: amd64 (x86_64)

Kernel: Linux 5.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8), LANGUAGE=en_IN:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages youtube-dl depends on:
ii  python3                3.7.5-1
ii  python3-pkg-resources  41.2.0-1

Versions of packages youtube-dl recommends:
ii  ca-certificates  20190110
ii  curl             7.66.0-1
ii  ffmpeg           7:4.1.4-1+b2
ii  mpv              0.29.1-1
ii  phantomjs        2.1.1+dfsg-2+b1
ii  python3-pyxattr  0.6.1-1
ii  rtmpdump         2.4+20151223.gitfa8646d.1-2
ii  wget             1.20.3-1+b1

youtube-dl suggests no packages.

-- no debconf information
$ youtube-dl -c -v -f hls-832 --restrict-filenames "https://twitter.com/darrengrimes_/status/1182052201629470720"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-c', '-v', '-f', 'hls-832', '--restrict-filenames', 'https://twitter.com/darrengrimes_/status/1182052201629470720']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.09.28
[debug] Python version 3.7.5rc1 (CPython) - Linux-5.2.0-3-amd64-x86_64-with-debian-bullseye-sid
[debug] exe versions: ffmpeg 4.1.4-1, ffprobe 4.1.4-1, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[twitter] 1182052201629470720: Downloading webpage
[twitter:card] 1182052201629470720: Downloading webpage
[twitter:card] 1182052201629470720: Downloading guest token
[twitter:card] 1182052201629470720: Downloading JSON metadata
[twitter:card] 1182052201629470720: Downloading m3u8 information
[debug] Invoking downloader on 'https://video.twimg.com/amplify_video/1182048693601607684/pl/640x360/9FAjlPX7XYbaeklg.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 171
[download] Destination: Darren_Grimes_-_If_you_re_legitimately_worried_about_climate_change_and_the_impact_it_will_have_on_your_children_s_future_please_watch_this_interview_with_Extinction_Rebellion_by_@afneil._He_skillfully_deconstructs_their_arguments_as_ignoring_evidence_scaremongering_and_proposals_as_extreme.-1182052201629470720.mp4
ERROR: unable to download video data: [Errno 36] File name too long: 'Darren_Grimes_-_If_you_re_legitimately_worried_about_climate_change_and_the_impact_it_will_have_on_your_children_s_future_please_watch_this_interview_with_Extinction_Rebellion_by_@afneil._He_skillfully_deconstructs_their_arguments_as_ignoring_evidence_scaremongering_and_proposals_as_extreme.-1182052201629470720.mp4.ytdl'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 1925, in process_info
    success = dl(filename, info_dict)
  File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 1864, in dl
    return fd.download(name, info)
  File "/usr/lib/python3/dist-packages/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/usr/lib/python3/dist-packages/youtube_dl/downloader/hls.py", line 110, in real_download
    self._prepare_and_start_frag_download(ctx)
  File "/usr/lib/python3/dist-packages/youtube_dl/downloader/fragment.py", line 69, in _prepare_and_start_frag_download
    self._prepare_frag_download(ctx)
  File "/usr/lib/python3/dist-packages/youtube_dl/downloader/fragment.py", line 179, in _prepare_frag_download
    self._write_ytdl_file(ctx)
  File "/usr/lib/python3/dist-packages/youtube_dl/downloader/fragment.py", line 87, in _write_ytdl_file
    frag_index_stream, _ = sanitize_open(self.ytdl_filename(ctx['filename']), 'w')
  File "/usr/lib/python3/dist-packages/youtube_dl/utils.py", line 2042, in sanitize_open
    stream = open(encodeFilename(filename), open_mode)
OSError: [Errno 36] File name too long: 'Darren_Grimes_-_If_you_re_legitimately_worried_about_climate_change_and_the_impact_it_will_have_on_your_children_s_future_please_watch_this_interview_with_Extinction_Rebellion_by_@afneil._He_skillfully_deconstructs_their_arguments_as_ignoring_evidence_scaremongering_and_proposals_as_extreme.-1182052201629470720.mp4.ytdl'
@dstftw dstftw closed this Oct 11, 2019
@dstftw dstftw added the duplicate label Oct 11, 2019
@johnhawkinson
Copy link
Contributor

@johnhawkinson johnhawkinson commented Oct 17, 2019

I just ran into this problem and I'm having trouble finding the Issue this is a duplicate of. Could someone please tell me the Issue number?

This problem is particularly annoying because without -v, there is no hint that the problem is easily resolved by specifying a filename:

pb3:Downloads jhawk$ youtube-dl 'https://twitter.com/aaronbgreiner/status/1180949924940263424'
[twitter] 1180949924940263424: Downloading webpage
[twitter:card] 1180949924940263424: Downloading webpage
[twitter:card] 1180949924940263424: Downloading guest token
[twitter:card] 1180949924940263424: Downloading JSON metadata
[twitter:card] 1180949924940263424: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 10
[download] Destination: Aaron Greiner - The protected intersection at Broadway and Galileo Galilei Way is finally open!!! I may be wrong, but I believe this is the first intersection of its type in Camberville_Boston. @cambbikesafety @cambikelanes @StreetsblogMASS @StreetsBoston @bostonbikeunion @CambMA @jandev-1180949924940263424.mp4
ERROR: unable to download video
pb3:Downloads jhawk$ 
@shirishag75
Copy link
Author

@shirishag75 shirishag75 commented Oct 17, 2019

@dstftw I have had the same issue. You closed the issue, marked it as duplicate but haven't shared where the original question is.

@shillshocked
Copy link

@shillshocked shillshocked commented Jan 3, 2020

How is this issue solvable?

@ytdl-org ytdl-org deleted a comment from sputnick-dev Apr 14, 2020
@ytdl-org ytdl-org locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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