aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/hls.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/server/lib/hls.ts b/server/lib/hls.ts
index 84539e2c1..05be403f3 100644
--- a/server/lib/hls.ts
+++ b/server/lib/hls.ts
@@ -50,13 +50,12 @@ async function updateMasterHLSPlaylist (video: MVideoWithFile) {
50 let line = `#EXT-X-STREAM-INF:${bandwidth},${resolution}` 50 let line = `#EXT-X-STREAM-INF:${bandwidth},${resolution}`
51 if (file.fps) line += ',FRAME-RATE=' + file.fps 51 if (file.fps) line += ',FRAME-RATE=' + file.fps
52 52
53 const videoCodec = await getVideoStreamCodec(videoFilePath) 53 const codecs = await Promise.all([
54 line += `,CODECS="${videoCodec}` 54 getVideoStreamCodec(videoFilePath),
55 getAudioStreamCodec(videoFilePath)
56 ])
55 57
56 const audioCodec = await getAudioStreamCodec(videoFilePath) 58 line += `,CODECS="${codecs.filter(c => !!c).join(',')}"`
57 if (audioCodec) line += `,${audioCodec}`
58
59 line += '"'
60 59
61 masterPlaylists.push(line) 60 masterPlaylists.push(line)
62 masterPlaylists.push(VideoStreamingPlaylistModel.getHlsPlaylistFilename(file.resolution)) 61 masterPlaylists.push(VideoStreamingPlaylistModel.getHlsPlaylistFilename(file.resolution))