aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/print-transcode-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli/print-transcode-command.ts')
-rw-r--r--server/tests/cli/print-transcode-command.ts31
1 files changed, 0 insertions, 31 deletions
diff --git a/server/tests/cli/print-transcode-command.ts b/server/tests/cli/print-transcode-command.ts
deleted file mode 100644
index 33b6cd27c..000000000
--- a/server/tests/cli/print-transcode-command.ts
+++ /dev/null
@@ -1,31 +0,0 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2
3import { expect } from 'chai'
4import { buildAbsoluteFixturePath } from '@shared/core-utils'
5import { CLICommand } from '@shared/server-commands'
6import { VideoResolution } from '../../../shared/models/videos'
7
8describe('Test print transcode jobs', function () {
9
10 it('Should print the correct command for each resolution', async function () {
11 const fixturePath = buildAbsoluteFixturePath('video_short.webm')
12
13 for (const resolution of [
14 VideoResolution.H_720P,
15 VideoResolution.H_1080P
16 ]) {
17 const command = await CLICommand.exec(`npm run print-transcode-command -- ${fixturePath} -r ${resolution}`)
18
19 expect(command).to.includes(`-vf scale=w=-2:h=${resolution}`)
20 expect(command).to.includes(`-y -acodec aac -vcodec libx264`)
21 expect(command).to.includes('-f mp4')
22 expect(command).to.includes('-movflags faststart')
23 expect(command).to.includes('-b:a 256k')
24 expect(command).to.includes('-r 25')
25 expect(command).to.includes('-level:v 3.1')
26 expect(command).to.includes('-g:v 50')
27 expect(command).to.includes(`-maxrate:v `)
28 expect(command).to.includes(`-bufsize:v `)
29 }
30 })
31})