Node-FFmpeg-Converter
is a quick CLI video converter using FFmpeg.
Install FFmpeg according to your operating system from there: https://ffmpeg.org/download.html
Use NPM to install the required dependencies.
$ npm install
Use npm link to create a symlink
$ npm link
ffmpeg-converter
takes one required argument:
For example:
$ ffmpeg-converter -d -p /home/ponystream/movies -i avi -i mkv -o mp4
{
'--help': Boolean,
'--path': String, // --path <string> or --path=<string>
'--input-ext': [String],
'--output-ext': String,
'--delete-source': Boolean,
'-p': '--path',
'-h': '--help',
'-i': '--input-ext',
'-o': '--output-ext',
'-d': '--delete-source',
},
If a second parameter is specified and is an object, it specifies parsing options to modify the behavior of arg()
.
Dislay the help, just in case.
For example:
ffmpeg-converter --help
The only required argument. The path of the where the script will start searching for movie to convert.
For example:
ffmpeg-converter --path=/home/ponystream/movies
An array of movie extension. The script will search and convert all the movies having one of theses given extensions.
Default is ['mkv', 'avi']
.
For example:
ffmpeg-converter --path=/home/ponystream/movies -i avi -i mkv
An array of movie extension. The script will search and convert all the movies having one of theses given extensions.
Default is mp4
.
For example:
ffmpeg-converter --path=/home/ponystream/movies -i avi -i mkv
Request for source deletion after successful conversion.
For example:
ffmpeg-converter --delete-source --path=/home/ponystream/movies -i avi -i mkv
You will encounter an error if you try to use ffmpeg-converter
without having FFmpeg
installed on your system.
What is FFmpeg?
FFmpeg
is a free and open-source software project consisting of a large suite of libraries and programs for handling video, audio, and other multimedia files and streams.
As the core of the conversion is delegated to FFmpeg
, you have to rely on its capacities.
The typical usage of this tool is to convert a complete library of movies into a common format. Some devices cannot handle a certain type of format and require a transcoding step in order to be played. This step is resource consuming and might not be made on the fly.
The time spent for converting a movie is approximately one hour long for an fullHD mkv movie to mp4. Can be lowered, but highly depend on your CPU capabilities, and the movie source. FFmpeg will require the maximum of your CPU resources.
Copyright © 2021 Ponystream.
Released under BSD-3-Clause.