The best use case of Nodejs is its ability to stream content in chunks using pipes . This app is developed to use this feature to create a Media Downloader in Nodejs for downloading Video / Audio files from Youtube . Since downloading from youtube is not allowed, we use the popular youtube-dl as a child process in our application.
- Git
- Node.js and npm Node ^13.0.1, npm ^6.12.0
- Youtube-dl
- FFmpeg
- Run
youtube-dl --version
to check if Youtube-dl is installed correctly. - Run
ffmpeg -version
to check if FFmpeg is installed correctly. - Proceed only if above 2 packages are installed correctly and versions are displayed in terminal.
- Create your own Youtube API KEY for getting search results for queries. It's free of cost. Dont worry :)
- Goto
routes/youtube_search.js
and updateconst YOUTUBE_API_KEY = ' YOUR - API - KEY - HERE';
-
Run
npm install
to install server dependencies. -
Run
npm start
to start the development server. -
Open your favorite browser and goto
localhost:3000
-
Search for any video and enjoy your download :)