diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/api/videos/index.ts | 6 | ||||
-rw-r--r-- | server/helpers/ffmpeg-utils.ts | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 40a2c972b..99900ca4a 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -205,11 +205,11 @@ async function addVideo (req: express.Request, res: express.Response) { | |||
205 | } | 205 | } |
206 | const videoFile = new VideoFileModel(videoFileData) | 206 | const videoFile = new VideoFileModel(videoFileData) |
207 | 207 | ||
208 | if (!videoFile.isAudio()) { | 208 | if (videoFile.isAudio()) { |
209 | videoFile.resolution = DEFAULT_AUDIO_RESOLUTION | ||
210 | } else { | ||
209 | videoFile.fps = await getVideoFileFPS(videoPhysicalFile.path) | 211 | videoFile.fps = await getVideoFileFPS(videoPhysicalFile.path) |
210 | videoFile.resolution = (await getVideoFileResolution(videoPhysicalFile.path)).videoFileResolution | 212 | videoFile.resolution = (await getVideoFileResolution(videoPhysicalFile.path)).videoFileResolution |
211 | } else { | ||
212 | videoFile.resolution = DEFAULT_AUDIO_RESOLUTION | ||
213 | } | 213 | } |
214 | 214 | ||
215 | // Move physical file | 215 | // Move physical file |
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index c180da832..8041e7b3b 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts | |||
@@ -18,7 +18,8 @@ function computeResolutionsToTranscode (videoFileHeight: number) { | |||
18 | VideoResolution.H_360P, | 18 | VideoResolution.H_360P, |
19 | VideoResolution.H_720P, | 19 | VideoResolution.H_720P, |
20 | VideoResolution.H_240P, | 20 | VideoResolution.H_240P, |
21 | VideoResolution.H_1080P | 21 | VideoResolution.H_1080P, |
22 | VideoResolution.H_4K | ||
22 | ] | 23 | ] |
23 | 24 | ||
24 | for (const resolution of resolutions) { | 25 | for (const resolution of resolutions) { |