aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-10-21 14:03:04 +0200
committerChocobozzz <me@florianbigard.com>2019-10-21 14:08:34 +0200
commitf6e0de3f48993b2c0ef9bd2c24d2d7443acc6ace (patch)
tree1ab1b878b9a6b2a96b353cf6a280970a6b82e905
parentbaeb429d06d101f69c677fdb70c3da2eb9d3823d (diff)
downloadPeerTube-f6e0de3f48993b2c0ef9bd2c24d2d7443acc6ace.tar.gz
PeerTube-f6e0de3f48993b2c0ef9bd2c24d2d7443acc6ace.tar.zst
PeerTube-f6e0de3f48993b2c0ef9bd2c24d2d7443acc6ace.zip
Don't quick transcode with the wrong pixel format
-rw-r--r--server/helpers/ffmpeg-utils.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index 914ecc51a..c0e9702a8 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -198,6 +198,7 @@ async function canDoQuickTranscode (path: string): Promise<boolean> {
198 198
199 // check video params 199 // check video params
200 if (videoStream[ 'codec_name' ] !== 'h264') return false 200 if (videoStream[ 'codec_name' ] !== 'h264') return false
201 if (videoStream[ 'pix_fmt' ] !== 'yuv420p') return false
201 if (fps < VIDEO_TRANSCODING_FPS.MIN || fps > VIDEO_TRANSCODING_FPS.MAX) return false 202 if (fps < VIDEO_TRANSCODING_FPS.MIN || fps > VIDEO_TRANSCODING_FPS.MAX) return false
202 if (bitRate > getMaxBitrate(resolution.videoFileResolution, fps, VIDEO_TRANSCODING_FPS)) return false 203 if (bitRate > getMaxBitrate(resolution.videoFileResolution, fps, VIDEO_TRANSCODING_FPS)) return false
203 204