aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-02 12:20:26 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-03 15:31:26 +0200
commit40298b02546e8225dd21bf6048fe7f224aefc32a (patch)
tree0a0b981dbeb2af47810adff6553a0df995a03734 /server/controllers
parentf0adb2701c1cf404ff63095f71e542bfe6d025ae (diff)
downloadPeerTube-40298b02546e8225dd21bf6048fe7f224aefc32a.tar.gz
PeerTube-40298b02546e8225dd21bf6048fe7f224aefc32a.tar.zst
PeerTube-40298b02546e8225dd21bf6048fe7f224aefc32a.zip
Implement video transcoding on server side
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/videos/index.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 6fa84c801..14c969ec3 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -39,13 +39,12 @@ import {
39 getFormattedObjects, 39 getFormattedObjects,
40 renamePromise 40 renamePromise
41} from '../../../helpers' 41} from '../../../helpers'
42import { TagInstance } from '../../../models' 42import { TagInstance, VideoInstance } from '../../../models'
43import { VideoCreate, VideoUpdate } from '../../../../shared' 43import { VideoCreate, VideoUpdate, VideoResolution } from '../../../../shared'
44 44
45import { abuseVideoRouter } from './abuse' 45import { abuseVideoRouter } from './abuse'
46import { blacklistRouter } from './blacklist' 46import { blacklistRouter } from './blacklist'
47import { rateVideoRouter } from './rate' 47import { rateVideoRouter } from './rate'
48import { VideoInstance } from '../../../models/video/video-interface'
49 48
50const videosRouter = express.Router() 49const videosRouter = express.Router()
51 50
@@ -195,7 +194,7 @@ function addVideo (req: express.Request, res: express.Response, videoPhysicalFil
195 .then(({ author, tagInstances, video }) => { 194 .then(({ author, tagInstances, video }) => {
196 const videoFileData = { 195 const videoFileData = {
197 extname: extname(videoPhysicalFile.filename), 196 extname: extname(videoPhysicalFile.filename),
198 resolution: 0, // TODO: improve readability, 197 resolution: VideoResolution.ORIGINAL,
199 size: videoPhysicalFile.size 198 size: videoPhysicalFile.size
200 } 199 }
201 200
@@ -230,7 +229,7 @@ function addVideo (req: express.Request, res: express.Response, videoPhysicalFil
230 } 229 }
231 230
232 tasks.push( 231 tasks.push(
233 JobScheduler.Instance.createJob(t, 'videoTranscoder', dataInput) 232 JobScheduler.Instance.createJob(t, 'videoFileOptimizer', dataInput)
234 ) 233 )
235 } 234 }
236 235