LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to fix "ENAMETOOLONG" Error in Video DownloadHelper? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-fix-enametoolong-error-in-video-downloadhelper-4175695925/)

jude7 06-02-2021 01:14 PM

How to fix "ENAMETOOLONG" Error in Video DownloadHelper?
 
Running Mint 18.2, Cinnamon 3.4.3 on a Dell i7 laptop,I sometimes am unable to download a video owing to an "ENAMETOLONG" error.

There seems to be ways to fix this in Windows, but not any I can find for linux. Fiddling around with "Smart Naming Rules" I still can't make any headway, owing no doubt to not knowing what I am doing.

Alternatively, if I could get VLC to talk to Video DownloadHelper, that possibly could work?

I tried everything I could think pof there, no luck....

computersavvy 06-02-2021 09:52 PM

I would guess the file has spaces or special characters in the name. You have not given us a file name, site being downloaded from, nor tool used to download (browser maybe?) so no detailed assistance can be provided since we can't even attempt to replicate the error.

jude7 06-03-2021 11:42 AM

Ahh, ok thanks. I had seen videos on eliminating this error on Windows machines, and that involved unchecking some box somewhere. I just assumed the cure in Mint would be unchecking some box or maybe entering a command via the terminal.

ondoho 06-04-2021 04:20 AM

Quote:

Originally Posted by jude7 (Post 6255968)
Alternatively, if I could get VLC to talk to Video DownloadHelper, that possibly could work?

I've been using mpv + youtube-dl to watch online video for, like, ever.
I think I wrote a blog article about it.

Example:
Code:

mpv https://player.vimeo.com/video/557283139

jude7 06-04-2021 10:39 AM

Thanks for that!

Will check it out asap.

For a while, I had good luck with " youtube-dl", but there seems to be an ongoing battle between youtube and anyone who would download from it. What works today probably won't tomorrow.


btw, everyone: is there a way to re-enable the right mouse click when a site disables it? I tried to download an image of an ordinary houseplant, and right-clicking for the "save image as" menu got me a

pop-up banner saying "no right-clicking" (!?!)

"Whose computer is this anyway!"

boughtonp 06-04-2021 11:04 AM

Quote:

Originally Posted by jude7 (Post 6256403)
there seems to be an ongoing battle between youtube and anyone who would download from it. What works today probably won't tomorrow.

Alternatively, what's broken today will probably be fixed tomorrow, (if not sooner).

Youtube-dl is effectively a headless browser; YouTube cannot win whilst browsers can be emulated or until Google gains full control over HTTP and/or HTML.



Quote:

btw, everyone: is there a way to re-enable the right mouse click when a site disables it?
Disabling JavaScript can be an easy way, though may prevent other things from working. (uBlock Origin is a recommended browser addon which makes it easier than fiddling with browser config.)

Alternatively, F12 > Network tab, then reload the page - JavaScript cannot prevent the "Save Image As" option there.


jude7 06-04-2021 11:28 AM

Interesting!

thanks.

teckk 06-04-2021 01:24 PM

Quote:

Alternatively, F12 > Network tab, then reload the page - JavaScript cannot prevent the "Save Image As" option there.
I have seen sites that refuse to load if you have developer tools open. So they are checking for that. If you open the web inspector after the page is loaded, all of the info won't be there.

To the OP, youtube-dl is the best tool that there is for youtube. You will need to keep it up to date. Post a link to the video that you can't download.

jude7 06-04-2021 02:03 PM

OK, thanks. I have tried several times to update youtube-dl, seemingly with success, until I tried to use the "updated" version. I am running Mint 18.2, Cinnamon 3.4.3, a bit long in the tooth - might this be contributing to the issues?

I am a bit reluctant to update from 18.2 because when I updated to it, I guess it wasn't completely "stable", so I ended-up worse off that if I had just stayed with 17.x (I forget exactly which iteration it was) A bad attitude know - so what is the most current, reasonably bug-free Mint/Cinnamon these days?

ANYWAY, here is the info you requested:

1.) url: https://www.youtube.com/watch?v=rn85RHrShrI

the video is definitely viewable, no problem, BUT:

2.) Here is the text from the terminal:

---------------------------------------------------------------------------------------------------------------------

jude@jude-Inspiron-5567 ~ $ youtube-dl https://www.youtube.com/watch?v=rn85RHrShrI
[youtube] rn85RHrShrI: Downloading webpage
[youtube] rn85RHrShrI: Downloading video info webpage
WARNING: unable to download video info webpage: HTTP Error 404: Not Found
WARNING: unable to download video info webpage: HTTP Error 404: Not Found
WARNING: unable to download video info webpage: HTTP Error 404: Not Found
WARNING: unable to download video info webpage: HTTP Error 404: Not Found
WARNING: unable to download video info webpage: HTTP Error 404: Not Found
Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 6, in <module>
youtube_dl.main()
File "/usr/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 471, in main
_real_main(argv)
File "/usr/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 461, in _real_main
retcode = ydl.download(all_urls)
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1989, in download
url, force_generic_extractor=self.params.get('force_generic_extractor', False))
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 785, in extract_info
ie_result = ie.extract(url)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 440, in extract
ie_result = self._real_extract(url)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1605, in _real_extract
if 'token' not in video_info:
TypeError: argument of type 'NoneType' is not iterable
jude@jude-Inspiron-5567 ~ $


----------------------------------------------------------------------------------------------------------------------------


I'm not sure, but I think I might have messed something up with one of my update attempts: I remember looking around on the net, and then installing something to do with "python", among other things. This was all more than a few months ago, and I was trying to follow advice from forums.

teckk 06-04-2021 04:02 PM

Code:

youtube-dl -F https://www.youtube.com/watch?v=rn85RHrShrI
[youtube] rn85RHrShrI: Downloading webpage
[info] Available formats for rn85RHrShrI:
format code  extension  resolution note
249          webm      audio only tiny  52k , webm_dash container, opus @ 52k (48000Hz), 4.61MiB
250          webm      audio only tiny  68k , webm_dash container, opus @ 68k (48000Hz), 6.05MiB
140          m4a        audio only tiny  127k , m4a_dash container, mp4a.40.2@127k (44100Hz), 11.24MiB
251          webm      audio only tiny  134k , webm_dash container, opus @134k (48000Hz), 11.92MiB
160          mp4        256x144    144p  47k , mp4_dash container, avc1.4d400c@  47k, 30fps, video only, 4.19MiB
278          webm      256x144    144p  87k , webm_dash container, vp9@  87k, 30fps, video only, 7.78MiB
133          mp4        426x240    240p  114k , mp4_dash container, avc1.4d4015@ 114k, 30fps, video only, 10.17MiB
242          webm      426x240    240p  119k , webm_dash container, vp9@ 119k, 30fps, video only, 10.53MiB
243          webm      640x360    360p  241k , webm_dash container, vp9@ 241k, 30fps, video only, 21.34MiB
134          mp4        640x360    360p  248k , mp4_dash container, avc1.4d401e@ 248k, 30fps, video only, 21.95MiB
244          webm      854x480    480p  432k , webm_dash container, vp9@ 432k, 30fps, video only, 38.25MiB
135          mp4        854x480    480p  534k , mp4_dash container, avc1.4d401f@ 534k, 30fps, video only, 47.29MiB
247          webm      1280x720  720p  750k , webm_dash container, vp9@ 750k, 30fps, video only, 66.38MiB
136          mp4        1280x720  720p  940k , mp4_dash container, avc1.4d401f@ 940k, 30fps, video only, 83.19MiB
248          webm      1920x1080  1080p 1480k , webm_dash container, vp9@1480k, 30fps, video only, 130.99MiB
137          mp4        1920x1080  1080p 1549k , mp4_dash container, avc1.640028@1549k, 30fps, video only, 137.10MiB
18          mp4        640x360    360p  537k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 47.54MiB
22          mp4        1280x720  720p 1066k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best)

Your version of youtube-dl is broke. I thought that youtube-dl used python3.
https://ytdl-org.github.io/youtube-dl/
Nope, 2.7, 3.2+

Code:

youtube-dl --version
2021.04.26

I'm a month out of date.

boughtonp 06-04-2021 04:59 PM

Quote:

Originally Posted by teckk (Post 6256439)
I have seen sites that refuse to load if you have developer tools open.

Apparently there's a method that checks whether the difference between window.innerHeight and window.outerHeight is beyond a certain threshold, which can be bypassed by undocking devtools.

There's also supposedly a method using a new debugger statement, although the demo I tried seemed to only be capable of detecting when it was closed (opening it before or after page load didn't get detected). In theory, that method would be avoidable by setting "devtools.debugger.enabled" to false, but Mozilla are incompetent and that setting does nothing.

If any site is really being an arse, a transparent proxy that simply logs all traffic going through it is easy enough and should be entirely undetectable.

---

On the youtube-dl front, my version is several months old and still downloads that video fine.

I think the path "/usr/lib/python2.7/dist-packages/youtube_dl/__init__.py" suggests a package manager version was used - youtube-dl is one of the few instances where it can be better to not use the package manager version, especially if you're running an older/LTS release of an OS.

The download page gives the following example:
Code:

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl


ondoho 06-06-2021 01:28 AM

Quote:

Originally Posted by jude7 (Post 6256403)
For a while, I had good luck with " youtube-dl", but there seems to be an ongoing battle between youtube and anyone who would download from it. What works today probably won't tomorrow.

youtube-dl always has to be the newest version, esp. with youtube itself (it handles many more sites).
To accomplish that, you should
a) just uninstall any repo version (except if you're using Archlinux)
b) install the version directly from here
c) save it somewhere to your PATH, and mpv will find it

Quote:

Originally Posted by boughtonp (Post 6256410)
Youtube-dl is effectively a headless browser; YouTube cannot win whilst browsers can be emulated or until Google gains full control over HTTP and/or HTML.

Correct, and since after the recent debacle we even have that in legal writing!


All times are GMT -5. The time now is 03:55 PM.