diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-06 13:35:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-06 14:13:26 +0200 |
commit | 679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3 (patch) | |
tree | 03abf589275db05e5b1fa1c89f57049cd807324a /server/lib/job-queue/handlers/video-import.ts | |
parent | c826f34a45757b324a20f71665b44ed10e6953b5 (diff) | |
download | PeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.tar.gz PeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.tar.zst PeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.zip |
Improve target bitrate calculation
Diffstat (limited to 'server/lib/job-queue/handlers/video-import.ts')
-rw-r--r-- | server/lib/job-queue/handlers/video-import.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/job-queue/handlers/video-import.ts b/server/lib/job-queue/handlers/video-import.ts index 5fd2039b1..fec553f2b 100644 --- a/server/lib/job-queue/handlers/video-import.ts +++ b/server/lib/job-queue/handlers/video-import.ts | |||
@@ -114,7 +114,7 @@ async function processFile (downloader: () => Promise<string>, videoImport: MVid | |||
114 | throw new Error('The user video quota is exceeded with this video to import.') | 114 | throw new Error('The user video quota is exceeded with this video to import.') |
115 | } | 115 | } |
116 | 116 | ||
117 | const { videoFileResolution } = await getVideoFileResolution(tempVideoPath) | 117 | const { resolution } = await getVideoFileResolution(tempVideoPath) |
118 | const fps = await getVideoFileFPS(tempVideoPath) | 118 | const fps = await getVideoFileFPS(tempVideoPath) |
119 | const duration = await getDurationFromVideoFile(tempVideoPath) | 119 | const duration = await getDurationFromVideoFile(tempVideoPath) |
120 | 120 | ||
@@ -122,9 +122,9 @@ async function processFile (downloader: () => Promise<string>, videoImport: MVid | |||
122 | const fileExt = getLowercaseExtension(tempVideoPath) | 122 | const fileExt = getLowercaseExtension(tempVideoPath) |
123 | const videoFileData = { | 123 | const videoFileData = { |
124 | extname: fileExt, | 124 | extname: fileExt, |
125 | resolution: videoFileResolution, | 125 | resolution, |
126 | size: stats.size, | 126 | size: stats.size, |
127 | filename: generateWebTorrentVideoFilename(videoFileResolution, fileExt), | 127 | filename: generateWebTorrentVideoFilename(resolution, fileExt), |
128 | fps, | 128 | fps, |
129 | videoId: videoImport.videoId | 129 | videoId: videoImport.videoId |
130 | } | 130 | } |