youtube-dl: [Errno 36] File name too long on eCryptfs
Filesystem: EXT4
OS: Ubuntu Linux 14.04 LTS
youtube-dl --version: 2015.06.04.1
When I try to download a Vimeo video:
youtube-dl --ignore-errors --restrict-filenames https://vimeo.com/80352108
I got the following error:
ERROR: unable to open for writing: [Errno 36] File name too long: ...
About this issue
- Original URL
- State: open
- Created 9 years ago
- Reactions: 6
- Comments: 27
Bug is still here, running cd /tmp helped thx, but permanent fix would be very nice to have.
Long path names are also a problem on Windows. Using symbolic links or juncture points is also a way to fix the issue (so you don’t have to add some messy movement operation) but it makes file structures cluttered.
Please add support for longer file names or have some way to truncate all or part of the string in the options.
EXAMPLE
Where
tis the truncate delimiter and20is the number of characters before the string gets truncated.@chovy This output format fixes it:
Replace the 100 with whatever you want, a character limit of 220 works good for me on Windows. This still should be implemented in to youtube-dl, though.
I want to just automatically truncate long filenames.
It is not only for Vimeo, but for all services. I sometimes get this error. I believe it is due to a Linux encrypted home. Encrypted home makes the maximum filename size much shorter. Running
cd /tmpbefore running youtube-dl works as a workaround. A better solution would be to first check the maximum filename size, or at least, if it fails try again with shorter filenames.Since Twitter increased their char limit from 140 to 280 chars, this service is also affected when saving on eCryptfs
A workaround is to download in
/tmpand then move the file to the dest folder with a shorter name or use theyoutube-dl [...] -o <filename>option.Hello everyone! I’ve fix it (sort of kludge) with setting limit for output file name in my fork in corresponded branch Hope it helps for somebody
Command:
youtube-dl --verbose --ignore-errors --restrict-filenames https://vimeo.com/80352108Output:
I think the limit depends not on the number of characters, but on the number of bytes.
In my case(Linux), the limit is 255 bytes for the entire path(filename).