Map streams automatically instead of manually
parent
c5921e4e08
commit
8a33b80593
|
@ -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']);
|
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) {
|
if(config['transcode']['adaptive']===true && config['transcode']['variants'] > 1) {
|
||||||
for(let i=0;i<config['transcode']['variants'];i++){
|
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++){
|
for(let i=1;i<config['transcode']['variants'];i++){
|
||||||
args = args.concat(['-c:v:'+i, vcodec,]);
|
args = args.concat(['-c:v:'+i, vcodec,]);
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue