]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/ffmpeg-utils.ts
Fix lint
[github/Chocobozzz/PeerTube.git] / server / helpers / ffmpeg-utils.ts
index 913a909058e334490678ffb17a43029916272597..c2581f4602315bef1b01349b8a38a6d90fc78328 100644 (file)
@@ -1,8 +1,6 @@
-import * as Promise from 'bluebird'
 import * as ffmpeg from 'fluent-ffmpeg'
-
+import { VideoResolution } from '../../shared/models/videos'
 import { CONFIG } from '../initializers'
-import { VideoResolution } from '../../shared/models/videos/video-resolution.enum'
 
 function getVideoFileHeight (path: string) {
   return new Promise<number>((res, rej) => {
@@ -57,9 +55,10 @@ function transcode (options: TranscodeOptions) {
                     .videoCodec('libx264')
                     .outputOption('-threads ' + CONFIG.TRANSCODING.THREADS)
                     .outputOption('-movflags faststart')
+                    // .outputOption('-crf 18')
 
     if (options.resolution !== undefined) {
-      const size = `${options.resolution}x?` // '720x?' for example
+      const size = `?x${options.resolution}` // '?x720' for example
       command = command.size(size)
     }