user-1
(User 1)
July 3, 2023, 6:26pm
1
This topic was automatically generated from Slack. You can find the original thread here .
I’m getting npm install failed as an error for this code, which is meant to download a YouTube video and convert it to an mp3.
I generated the code from GPT4 using ’s sample code from an earlier thread (though I think that was also generated by AI).
Has anyone successfully gotten ffmpeg to work on Pipedream?
user-1
(User 1)
July 3, 2023, 6:26pm
2
Hi Thomas, could you share the specific error you’re seeing?
user-1
(User 1)
July 3, 2023, 6:26pm
3
yep - that is the error actually:
Code Error
npm install failed
I’ve turned on support access for my test workflow: https://pipedream.com/@tomfrankly/test-youttube-to-mp3-p_ZJCo3zk/build
user-1
(User 1)
July 3, 2023, 6:26pm
4
Thanks. ffmpeg
should work and that import
is correct, it’s actually failing on import youtubedl from "youtube-dl";
. Looking into the package, it’s likely trying to use a system dependency that we don’t have on our execution environment
user-1
(User 1)
July 3, 2023, 6:26pm
5
look like they actually deprecated that package and point users to another: youtube-dl - npm
user-1
(User 1)
July 3, 2023, 6:26pm
6
unfortunately the new package install also fails, looking into why:
import youtubedl from 'youtube-dl-exec'
user-1
(User 1)
July 3, 2023, 6:26pm
7
it seems like that package requires python
be installed, since it’s a wrapper around GitHub - yt-dlp/yt-dlp: A youtube-dl fork with additional features and fixes . I think that’s part of the issue
user-1
(User 1)
July 3, 2023, 6:26pm
8
Do you have another workaround / technique for downloading YouTube videos?
user-1
(User 1)
July 3, 2023, 6:26pm
9
not that I know of, unless there’s another API that can do it. AFAIK, all of the YouTube-downloader apps use youtube-dl at their core
user-1
(User 1)
July 3, 2023, 6:26pm
10
Not a huge issue at the moment. I anticipated that people would ask how they could transcribe and summarize YouTube videos once I released my voice notes-to-Notion workflow
user-1
(User 1)
July 3, 2023, 6:26pm
11
Are you comfortable running this in a Python / Bash code step?
user-1
(User 1)
July 3, 2023, 6:26pm
12
I’ve never written in Python, but I’m always down to learn and I have plenty of “treat me like a kindergardner” ChatGPT prompts at the ready
user-1
(User 1)
July 3, 2023, 6:26pm
13
Are there any potential issues with that, beyond me being unfamiliar with Python?
I’m turning this into a tutorial, so anything I do would be something that a large number of people might also do
user-1
(User 1)
July 3, 2023, 6:26pm
14
The only hesitation I have in recommending Python is that it’s still in beta, and there are a few bugs we’re working to address.
do you know the best way to download YouTube videos in a workflow? e.g. could we build a pre-built Node action for this?
user-1
(User 1)
July 3, 2023, 6:26pm
15
This would have been a nice use case for a custom container, and install the youtube-dl
binary on.
I’m not aware of any other Node.js library that will download YouTube videos, nor of a 3rd party service that will act as a proxy.
user-1
(User 1)
July 3, 2023, 6:26pm
16
Do you know what youtube-dl
does that we can’t do via straight HTTP?
user-1
(User 1)
July 3, 2023, 6:26pm
17
I know it’s a complex lib, just trying to see if it’s something we can hack for this specific use case
user-1
(User 1)
July 3, 2023, 6:26pm
18
It might perform some request massaging with user-agents, etc. I’m not sure:
user-1
(User 1)
July 3, 2023, 6:26pm
19
If it’s not feasible, no worries for now! I think people will still be very happy being able to transcribe and summarize voice notes and podcast episodes
user-1
(User 1)
July 3, 2023, 6:26pm
20