1
0
Fork 0

Don't quick transcode with the wrong pixel format

This commit is contained in:
Chocobozzz 2019-10-21 14:03:04 +02:00
parent baeb429d06
commit f6e0de3f48
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

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