diff options
author | Chocobozzz <me@florianbigard.com> | 2019-06-06 14:45:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-06-06 14:45:57 +0200 |
commit | ad3405d087b306efa5eb62a69c9b797b04eab4ce (patch) | |
tree | fd81a190cc0c5fe80a2d70465dcb4a4789b62a5f /server/controllers/api | |
parent | a6dbbf03865a955caaedc3b12f3de3e386fe850f (diff) | |
download | PeerTube-ad3405d087b306efa5eb62a69c9b797b04eab4ce.tar.gz PeerTube-ad3405d087b306efa5eb62a69c9b797b04eab4ce.tar.zst PeerTube-ad3405d087b306efa5eb62a69c9b797b04eab4ce.zip |
Improve 4K video quality after transcoding
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/videos/index.ts | 6 |
1 files changed, 3 insertions, 3 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 |