import { getTargetBitrate, VideoResolution } from '../../../shared/models/videos'
import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants'
import { getTargetBitrate, VideoResolution } from '../../../shared/models/videos'
import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants'
const expect = chai.expect
describe('Test create transcoding jobs', function () {
const expect = chai.expect
describe('Test create transcoding jobs', function () {
it('Should print the correct command for each resolution', async function () {
const fixturePath = 'server/tests/fixtures/video_short.webm'
const fps = await getVideoFileFPS(fixturePath)
it('Should print the correct command for each resolution', async function () {
const fixturePath = 'server/tests/fixtures/video_short.webm'
const fps = await getVideoFileFPS(fixturePath)
const targetBitrate = Math.min(getTargetBitrate(resolution, fps, VIDEO_TRANSCODING_FPS), bitrate)
expect(command).to.includes(`-vf scale=w=-2:h=${resolution}`)
const targetBitrate = Math.min(getTargetBitrate(resolution, fps, VIDEO_TRANSCODING_FPS), bitrate)
expect(command).to.includes(`-vf scale=w=-2:h=${resolution}`)