Browse Source

Map streams automatically instead of manually

pull/23/head
knotteye 10 months ago
parent
commit
8a33b80593
  1. 4
      src/server.ts

4
src/server.ts

@ -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,]);
}

Loading…
Cancel
Save