- let command = ffmpeg(options.inputPath, { niceness: FFMPEG_NICE.TRANSCODING })
- .output(options.outputPath)
- .preset(standard)
-
- if (CONFIG.TRANSCODING.THREADS > 0) {
- // if we don't set any threads ffmpeg will chose automatically
- command = command.outputOption('-threads ' + CONFIG.TRANSCODING.THREADS)
- }
-
- let fps = await getVideoFileFPS(options.inputPath)
- if (options.resolution !== undefined) {
- // '?x720' or '720x?' for example
- const size = options.isPortraitMode === true ? `${options.resolution}x?` : `?x${options.resolution}`
- command = command.size(size)
-