-
- const { resolutionPlaylistPath: outputPath } = await generateHlsPlaylistResolutionFromTS({
- video,
- concatenatedTsFilePath,
- resolution,
- isAAC: audioStream?.codec_name === 'aac'
- })
-
- if (!durationDone) {
- video.duration = await getVideoStreamDuration(outputPath)
- await video.save()
-
- durationDone = true
+ const fps = await getVideoStreamFPS(concatenatedTsFilePath, probe)
+
+ try {
+ await generateHlsPlaylistResolutionFromTS({
+ video,
+ inputFileMutexReleaser,
+ concatenatedTsFilePath,
+ resolution,
+ fps,
+ isAAC: audioStream?.codec_name === 'aac'
+ })
+ } catch (err) {
+ logger.error('Cannot generate HLS playlist resolution from TS files.', { err })