|
@@ -8,9 +8,17 @@ import subtitle from '../subtitle/index';
|
|
|
/**
|
|
|
* Merges the subtitle and video files into a Matroska Multimedia Container.
|
|
|
*/
|
|
|
- export default function(config: IConfig, isSubtitled: boolean, rtmpInputPath: string, filePath: string, done: (err: Error) => void) {
|
|
|
+ export default function(config: IConfig, isSubtitled: boolean, rtmpInputPath: string, filePath: string, streamMode: string, done: (err: Error) => void) {
|
|
|
var subtitlePath = filePath + '.' + (subtitle.formats[config.format] ? config.format : 'ass');
|
|
|
- var videoPath = filePath + path.extname(rtmpInputPath);
|
|
|
+ var videoPath = filePath;
|
|
|
+ if (streamMode == "RTMP")
|
|
|
+ {
|
|
|
+ videoPath += path.extname(rtmpInputPath);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ videoPath += ".mp4";
|
|
|
+ }
|
|
|
childProcess.exec(command() + ' ' +
|
|
|
'-o "' + filePath + '.mkv" ' +
|
|
|
'"' + videoPath + '" ' +
|