diff options
author | Chocobozzz <me@florianbigard.com> | 2018-03-19 15:02:36 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-19 15:22:18 +0100 |
commit | a797728009eb5c26cf55624a4a01e8ecb73f1297 (patch) | |
tree | 3dcfe4870986c9bacdfbd2a671143b5dfc4f47d3 /server/helpers | |
parent | 9d145133d82c11edfb2781871076b7063cc3ae3d (diff) | |
download | PeerTube-a797728009eb5c26cf55624a4a01e8ecb73f1297.tar.gz PeerTube-a797728009eb5c26cf55624a4a01e8ecb73f1297.tar.zst PeerTube-a797728009eb5c26cf55624a4a01e8ecb73f1297.zip |
Fix video_share_url duplicate key in transcoding job
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/ffmpeg-utils.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index 4f75ba5a8..4d6cd3a82 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as ffmpeg from 'fluent-ffmpeg' | 1 | import * as ffmpeg from 'fluent-ffmpeg' |
2 | import { join } from 'path' | 2 | import { join } from 'path' |
3 | import { VideoResolution } from '../../shared/models/videos' | 3 | import { VideoResolution } from '../../shared/models/videos' |
4 | import { CONFIG, MAX_VIDEO_TRANSCODING_FPS } from '../initializers' | 4 | import { CONFIG, VIDEO_TRANSCODING_FPS } from '../initializers' |
5 | import { unlinkPromise } from './core-utils' | 5 | import { unlinkPromise } from './core-utils' |
6 | import { processImage } from './image-utils' | 6 | import { processImage } from './image-utils' |
7 | import { logger } from './logger' | 7 | import { logger } from './logger' |
@@ -92,7 +92,9 @@ function transcode (options: TranscodeOptions) { | |||
92 | .outputOption('-movflags faststart') | 92 | .outputOption('-movflags faststart') |
93 | // .outputOption('-crf 18') | 93 | // .outputOption('-crf 18') |
94 | 94 | ||
95 | if (fps > MAX_VIDEO_TRANSCODING_FPS) command = command.withFPS(MAX_VIDEO_TRANSCODING_FPS) | 95 | // Our player has some FPS limits |
96 | if (fps > VIDEO_TRANSCODING_FPS.MAX) command = command.withFPS(VIDEO_TRANSCODING_FPS.MAX) | ||
97 | else if (fps < VIDEO_TRANSCODING_FPS.MIN) command = command.withFPS(VIDEO_TRANSCODING_FPS.MIN) | ||
96 | 98 | ||
97 | if (options.resolution !== undefined) { | 99 | if (options.resolution !== undefined) { |
98 | // '?x720' or '720x?' for example | 100 | // '?x720' or '720x?' for example |