aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/helpers/ffmpeg-utils.ts2
-rw-r--r--server/lib/hls.ts4
-rw-r--r--server/lib/video-transcoding.ts4
3 files changed, 4 insertions, 6 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index 1eea05d1e..00c32e99a 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -70,7 +70,7 @@ async function getAudioStreamCodec (path: string) {
70 if (!audioStream) return '' 70 if (!audioStream) return ''
71 71
72 const audioCodec = audioStream.codec_name 72 const audioCodec = audioStream.codec_name
73 if (audioCodec.codec_name === 'aac') return 'mp4a.40.2' 73 if (audioCodec === 'aac') return 'mp4a.40.2'
74 74
75 logger.warn('Cannot get audio codec of %s.', path, { audioStream }) 75 logger.warn('Cannot get audio codec of %s.', path, { audioStream })
76 76
diff --git a/server/lib/hls.ts b/server/lib/hls.ts
index c94b599df..443a60088 100644
--- a/server/lib/hls.ts
+++ b/server/lib/hls.ts
@@ -50,8 +50,8 @@ 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(filePlaylistPath) 53 const audioCodec = await getAudioStreamCodec(videoFilePath)
54 const videoCodec = await getVideoStreamCodec(filePlaylistPath) 54 const videoCodec = await getVideoStreamCodec(videoFilePath)
55 line += `,CODECS="${videoCodec},${audioCodec}"` 55 line += `,CODECS="${videoCodec},${audioCodec}"`
56 56
57 masterPlaylists.push(line) 57 masterPlaylists.push(line)
diff --git a/server/lib/video-transcoding.ts b/server/lib/video-transcoding.ts
index ab5200936..03bc21559 100644
--- a/server/lib/video-transcoding.ts
+++ b/server/lib/video-transcoding.ts
@@ -205,10 +205,8 @@ async function generateHlsPlaylist (video: MVideoWithFile, resolution: VideoReso
205 205
206 await createTorrentAndSetInfoHash(videoStreamingPlaylist, newVideoFile) 206 await createTorrentAndSetInfoHash(videoStreamingPlaylist, newVideoFile)
207 207
208 const updatedVideoFile = await newVideoFile.save() 208 await newVideoFile.save()
209
210 videoStreamingPlaylist.VideoFiles = await videoStreamingPlaylist.$get('VideoFiles') as VideoFileModel[] 209 videoStreamingPlaylist.VideoFiles = await videoStreamingPlaylist.$get('VideoFiles') as VideoFileModel[]
211 videoStreamingPlaylist.VideoFiles.push(updatedVideoFile)
212 210
213 video.setHLSPlaylist(videoStreamingPlaylist) 211 video.setHLSPlaylist(videoStreamingPlaylist)
214 212