diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-18 09:44:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-18 10:44:16 +0200 |
commit | cdf4cb9eaf5f6bc71f7c1e1963c07575f1d2593d (patch) | |
tree | 344774a9b943db9bf1e46ff091a0df5da1bac7ad /server/tests | |
parent | e27ff5da6ed7bc1f56f50f862b80fb0c7d8a6d98 (diff) | |
download | PeerTube-cdf4cb9eaf5f6bc71f7c1e1963c07575f1d2593d.tar.gz PeerTube-cdf4cb9eaf5f6bc71f7c1e1963c07575f1d2593d.tar.zst PeerTube-cdf4cb9eaf5f6bc71f7c1e1963c07575f1d2593d.zip |
Fix transcoding
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 8 | ||||
-rw-r--r-- | server/tests/api/videos/video-transcoder.ts | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 4553ee855..b9ace2885 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -987,19 +987,19 @@ describe('Test multiple servers', function () { | |||
987 | files: [ | 987 | files: [ |
988 | { | 988 | { |
989 | resolution: 720, | 989 | resolution: 720, |
990 | size: 36000 | 990 | size: 72000 |
991 | }, | 991 | }, |
992 | { | 992 | { |
993 | resolution: 480, | 993 | resolution: 480, |
994 | size: 21000 | 994 | size: 45000 |
995 | }, | 995 | }, |
996 | { | 996 | { |
997 | resolution: 360, | 997 | resolution: 360, |
998 | size: 17000 | 998 | size: 34600 |
999 | }, | 999 | }, |
1000 | { | 1000 | { |
1001 | resolution: 240, | 1001 | resolution: 240, |
1002 | size: 13000 | 1002 | size: 24770 |
1003 | } | 1003 | } |
1004 | ] | 1004 | ] |
1005 | } | 1005 | } |
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts index 0ce5197ea..0a567873c 100644 --- a/server/tests/api/videos/video-transcoder.ts +++ b/server/tests/api/videos/video-transcoder.ts | |||
@@ -123,7 +123,7 @@ describe('Test video transcoding', function () { | |||
123 | expect(videoDetails.files).to.have.lengthOf(4) | 123 | expect(videoDetails.files).to.have.lengthOf(4) |
124 | 124 | ||
125 | const path = join(root(), 'test2', 'videos', video.uuid + '-240.mp4') | 125 | const path = join(root(), 'test2', 'videos', video.uuid + '-240.mp4') |
126 | const probe = await audio.get(ffmpeg, path) | 126 | const probe = await audio.get(path) |
127 | 127 | ||
128 | if (probe.audioStream) { | 128 | if (probe.audioStream) { |
129 | expect(probe.audioStream[ 'codec_name' ]).to.be.equal('aac') | 129 | expect(probe.audioStream[ 'codec_name' ]).to.be.equal('aac') |
@@ -154,7 +154,7 @@ describe('Test video transcoding', function () { | |||
154 | 154 | ||
155 | expect(videoDetails.files).to.have.lengthOf(4) | 155 | expect(videoDetails.files).to.have.lengthOf(4) |
156 | const path = join(root(), 'test2', 'videos', video.uuid + '-240.mp4') | 156 | const path = join(root(), 'test2', 'videos', video.uuid + '-240.mp4') |
157 | const probe = await audio.get(ffmpeg, path) | 157 | const probe = await audio.get(path) |
158 | expect(probe).to.not.have.property('audioStream') | 158 | expect(probe).to.not.have.property('audioStream') |
159 | } | 159 | } |
160 | }) | 160 | }) |
@@ -179,9 +179,9 @@ describe('Test video transcoding', function () { | |||
179 | 179 | ||
180 | expect(videoDetails.files).to.have.lengthOf(4) | 180 | expect(videoDetails.files).to.have.lengthOf(4) |
181 | const fixturePath = buildAbsoluteFixturePath(videoAttributes.fixture) | 181 | const fixturePath = buildAbsoluteFixturePath(videoAttributes.fixture) |
182 | const fixtureVideoProbe = await audio.get(ffmpeg, fixturePath) | 182 | const fixtureVideoProbe = await audio.get(fixturePath) |
183 | const path = join(root(), 'test2', 'videos', video.uuid + '-240.mp4') | 183 | const path = join(root(), 'test2', 'videos', video.uuid + '-240.mp4') |
184 | const videoProbe = await audio.get(ffmpeg, path) | 184 | const videoProbe = await audio.get(path) |
185 | if (videoProbe.audioStream && fixtureVideoProbe.audioStream) { | 185 | if (videoProbe.audioStream && fixtureVideoProbe.audioStream) { |
186 | const toOmit = [ 'max_bit_rate', 'duration', 'duration_ts', 'nb_frames', 'start_time', 'start_pts' ] | 186 | const toOmit = [ 'max_bit_rate', 'duration', 'duration_ts', 'nb_frames', 'start_time', 'start_pts' ] |
187 | expect(omit(videoProbe.audioStream, toOmit)).to.be.deep.equal(omit(fixtureVideoProbe.audioStream, toOmit)) | 187 | expect(omit(videoProbe.audioStream, toOmit)).to.be.deep.equal(omit(fixtureVideoProbe.audioStream, toOmit)) |