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)
const targetBitrate = Math.min(getTargetBitrate(resolution, fps, VIDEO_TRANSCODING_FPS), bitrate)
expect(command).to.includes('-f mp4')
expect(command).to.includes('-movflags faststart')
expect(command).to.includes('-b:a 256k')
expect(command).to.includes('-f mp4')
expect(command).to.includes('-movflags faststart')
expect(command).to.includes('-b:a 256k')