![]() ![]() This can be downloaded here (the version used for this tutorial is 4.2.1-make sure to select the binary for your operating system). To complete our setup, the last thing we need to do is download a binary of the ffmpeg command line tool which will be the centerpiece of our work. We'll use this package to create a command line prompt for gathering information about the video we're going to convert, the format we're going to output, and the location of the output file. Next, we need to install one dependency via NPM, inquirer: Next, we're going to modify the package.json that was created to set the project type to be module:ĭoing this enables ESModules support in Node.js allowing us to use import and export in our code (as opposed to require() and modules.export. The -f stands for "force" and skips the automated wizard for generating this file (we skip it here for the sake of speed but feel free to omit the -f and follow the prompts). This will automatically initialize a package.json file inside of your project folder. Terminal cd video-converter & npm init -f Next, cd into that folder and run npm init -f: This should be placed wherever you keep projects on your computer (e.g., ~/projects where ~ is the home folder or root on your computer). If you have Node.js installed, next, we want to create a new folder for our project. If you don't have Node.js installed, read this tutorial first before continuing. Make sure that you have the latest LTS version of Node.js installed on your machine. ![]() For this tutorial, we're going to build a Node.js project from scratch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |