aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/hls.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/hls.ts')
-rw-r--r--server/lib/hls.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/lib/hls.ts b/server/lib/hls.ts
index 60bb3ab7e..76380b1f2 100644
--- a/server/lib/hls.ts
+++ b/server/lib/hls.ts
@@ -50,9 +50,13 @@ 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 audioCodec = await getAudioStreamCodec(videoFilePath)
54 const videoCodec = await getVideoStreamCodec(videoFilePath) 53 const videoCodec = await getVideoStreamCodec(videoFilePath)
55 line += `,CODECS="${videoCodec},${audioCodec}"` 54 line += `,CODECS="${videoCodec}`
55
56 const audioCodec = await getAudioStreamCodec(videoFilePath)
57 if (audioCodec) line += `,${audioCodec}`
58
59 line += '"'
56 60
57 masterPlaylists.push(line) 61 masterPlaylists.push(line)
58 masterPlaylists.push(VideoStreamingPlaylistModel.getHlsPlaylistFilename(file.resolution)) 62 masterPlaylists.push(VideoStreamingPlaylistModel.getHlsPlaylistFilename(file.resolution))