Add video privacy setting
[oweals/peertube.git] / server / helpers / ffmpeg-utils.ts
index c35125ec1cedc1a784c6f7ed84c1c1c3391d0ad7..f18b6bd9a12827918ad3626fe17480887481e1aa 100644 (file)
@@ -25,7 +25,7 @@ function getDurationFromVideoFile (path: string) {
   })
 }
 
-function generateImageFromVideoFile (fromPath: string, folder: string, imageName: string, size?: string) {
+function generateImageFromVideoFile (fromPath: string, folder: string, imageName: string, size: string) {
   const options = {
     filename: imageName,
     count: 1,
@@ -57,9 +57,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)
     }