Map streams automatically instead of manually

pull/23/head
knotteye 2021-01-10 14:29:54 -06:00
parent c5921e4e08
commit 8a33b80593
1 changed files with 2 additions and 2 deletions

View File

@ -149,9 +149,9 @@ async function transCommand(user: string, key: string): Promise<string[]>{
args = args.concat(['-i', 'rtmp://127.0.0.1:'+config['rtmp']['port']+'/'+config['media']['privateEndpoint']+'/'+key, '-movflags', '+faststart']);
if(config['transcode']['adaptive']===true && config['transcode']['variants'] > 1) {
for(let i=0;i<config['transcode']['variants'];i++){
args = args.concat(['-map', '0:2']);
args = args.concat(['-map', '0:v']);
}
args = args.concat(['-map', '0:1', '-c:a', 'aac', '-c:v:0', vcodec]);
args = args.concat(['-map', '0:a', '-c:a', 'aac', '-c:v:0', vcodec]);
for(let i=1;i<config['transcode']['variants'];i++){
args = args.concat(['-c:v:'+i, vcodec,]);
}