diff --git a/README.md b/README.md index ce9c19f..2c585aa 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ Output options: --video-quality Quality of the converted video (percent) [number] [default: 75] --video-bitrate Bitrate of the converted videos (e.g. 120k) [string] [default: null] --video-format Video output format [choices: "mp4", "webm"] [default: "mp4"] + --video-hwaccel Use Hardware acceleration, requires bitrate too [choices: ["none", "vaapi"] [default: "none"] --video-stills Where the video still frame is taken [choices: "seek", "middle"] [default: "seek"] --video-stills-seek Number of seconds where the still frame is taken [number] [default: 1] --photo-preview How lightbox photos are generated [choices: "resize", "copy", "symlink", "link"] [default: "resize"] diff --git a/src/cli/options.js b/src/cli/options.js index 3abda4e..b86bd86 100644 --- a/src/cli/options.js +++ b/src/cli/options.js @@ -104,6 +104,12 @@ const OPTIONS = { choices: ['mp4', 'webm'], 'default': 'mp4' }, + 'video-hwaccel': { + group: 'Output options:', + description: 'Use Hardware acceleration, requires bitrate too', + choices: ['none', 'vaapi'], + 'default': 'none' + }, 'video-stills': { group: 'Output options:', description: 'Where the video still frame is taken', diff --git a/src/steps/actions.js b/src/steps/actions.js index 2888e9f..673d719 100644 --- a/src/steps/actions.js +++ b/src/steps/actions.js @@ -33,7 +33,8 @@ exports.createMap = function (opts) { const videoOpts = { format: opts.videoFormat, quality: opts.videoQuality, - bitrate: opts.videoBitrate + bitrate: opts.videoBitrate, + hwaccel: opts.videoHwaccel } return { 'fs:copy': (task, done) => fs.copy(task.src, task.dest, done),