From 057ba9206a2deab04a2444db9be8d8a12ead253c Mon Sep 17 00:00:00 2001 From: datagutt Date: Wed, 28 Aug 2019 13:42:34 +0200 Subject: [PATCH] adds possibility to add multiple tasks to the ffmpeg transcoder with different names --- node_trans_session.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node_trans_session.js b/node_trans_session.js index 44b06bbc..a459cab1 100644 --- a/node_trans_session.js +++ b/node_trans_session.js @@ -43,14 +43,14 @@ class NodeTransSession extends EventEmitter { } if (this.conf.hls) { this.conf.hlsFlags = this.conf.hlsFlags ? this.conf.hlsFlags : ''; - let hlsFileName = 'index.m3u8'; + let hlsFileName = this.conf.name ? `${this.conf.name}.m3u8` : 'index.m3u8'; let mapHls = `[${this.conf.hlsFlags}:hls_segment_filename=\'${ouPath}/guaclive_${random}_%d.ts\']${ouPath}/${hlsFileName}|`; mapStr += mapHls; Logger.log('[Transmuxing HLS] ' + this.conf.streamPath + ' to ' + ouPath + '/' + hlsFileName); } if (this.conf.dash) { this.conf.dashFlags = this.conf.dashFlags ? this.conf.dashFlags : ''; - let dashFileName = 'index.mpd'; + let dashFileName = this.conf.name ? `${this.conf.name}.mpd` : 'index.mpd'; let mapDash = `${this.conf.dashFlags}${ouPath}/${dashFileName}`; mapStr += mapDash; Logger.log('[Transmuxing DASH] ' + this.conf.streamPath + ' to ' + ouPath + '/' + dashFileName);