- const audioCodec = await getAudioStreamCodec(filePlaylistPath)
- const videoCodec = await getVideoStreamCodec(filePlaylistPath)
- line += `,CODECS="${videoCodec},${audioCodec}"`
+ const videoCodec = await getVideoStreamCodec(videoFilePath)
+ line += `,CODECS="${videoCodec}`
+
+ const audioCodec = await getAudioStreamCodec(videoFilePath)
+ if (audioCodec) line += `,${audioCodec}`
+
+ line += '"'