- const videoCodec = await getVideoStreamCodec(videoFilePath)
- line += `,CODECS="${videoCodec}`
-
- const audioCodec = await getAudioStreamCodec(videoFilePath)
- if (audioCodec) line += `,${audioCodec}`
+ const codecs = await Promise.all([
+ getVideoStreamCodec(videoFilePath),
+ getAudioStreamCodec(videoFilePath)
+ ])