Don't quick transcode with the wrong pixel format
authorChocobozzz <me@florianbigard.com>
Mon, 21 Oct 2019 12:03:04 +0000 (14:03 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 21 Oct 2019 12:08:34 +0000 (14:08 +0200)
server/helpers/ffmpeg-utils.ts

index 914ecc51aa9c45950b94cdd335076f470ac81876..c0e9702a8511f66665b977d3777d7f4808a02b56 100644 (file)
@@ -198,6 +198,7 @@ async function canDoQuickTranscode (path: string): Promise<boolean> {
 
   // check video params
   if (videoStream[ 'codec_name' ] !== 'h264') return false
+  if (videoStream[ 'pix_fmt' ] !== 'yuv420p') return false
   if (fps < VIDEO_TRANSCODING_FPS.MIN || fps > VIDEO_TRANSCODING_FPS.MAX) return false
   if (bitRate > getMaxBitrate(resolution.videoFileResolution, fps, VIDEO_TRANSCODING_FPS)) return false