Fix transcoding

This commit is contained in:
Chocobozzz
2018-10-18 09:44:43 +02:00
parent e27ff5da6e
commit cdf4cb9eaf
6 changed files with 1548 additions and 89 deletions

View File

@@ -987,19 +987,19 @@ describe('Test multiple servers', function () {
files: [
{
resolution: 720,
size: 36000
size: 72000
},
{
resolution: 480,
size: 21000
size: 45000
},
{
resolution: 360,
size: 17000
size: 34600
},
{
resolution: 240,
size: 13000
size: 24770
}
]
}

View File

@@ -123,7 +123,7 @@ describe('Test video transcoding', function () {
expect(videoDetails.files).to.have.lengthOf(4)
const path = join(root(), 'test2', 'videos', video.uuid + '-240.mp4')
const probe = await audio.get(ffmpeg, path)
const probe = await audio.get(path)
if (probe.audioStream) {
expect(probe.audioStream[ 'codec_name' ]).to.be.equal('aac')
@@ -154,7 +154,7 @@ describe('Test video transcoding', function () {
expect(videoDetails.files).to.have.lengthOf(4)
const path = join(root(), 'test2', 'videos', video.uuid + '-240.mp4')
const probe = await audio.get(ffmpeg, path)
const probe = await audio.get(path)
expect(probe).to.not.have.property('audioStream')
}
})
@@ -179,9 +179,9 @@ describe('Test video transcoding', function () {
expect(videoDetails.files).to.have.lengthOf(4)
const fixturePath = buildAbsoluteFixturePath(videoAttributes.fixture)
const fixtureVideoProbe = await audio.get(ffmpeg, fixturePath)
const fixtureVideoProbe = await audio.get(fixturePath)
const path = join(root(), 'test2', 'videos', video.uuid + '-240.mp4')
const videoProbe = await audio.get(ffmpeg, path)
const videoProbe = await audio.get(path)
if (videoProbe.audioStream && fixtureVideoProbe.audioStream) {
const toOmit = [ 'max_bit_rate', 'duration', 'duration_ts', 'nb_frames', 'start_time', 'start_pts' ]
expect(omit(videoProbe.audioStream, toOmit)).to.be.deep.equal(omit(fixtureVideoProbe.audioStream, toOmit))