Disable CRF when using hwaccel
parent
8a33b80593
commit
a3341d8b7d
|
@ -155,10 +155,12 @@ async function transCommand(user: string, key: string): Promise<string[]>{
|
||||||
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,]);
|
||||||
}
|
}
|
||||||
|
if(!config['hwaccel']['type']){
|
||||||
for(let i=1;i<config['transcode']['variants'];i++){
|
for(let i=1;i<config['transcode']['variants'];i++){
|
||||||
let crf: number = Math.floor(18 + (i * 8)) > 51 ? 51 : Math.floor(18 + (i * 7));
|
let crf: number = Math.floor(18 + (i * 8)) > 51 ? 51 : Math.floor(18 + (i * 7));
|
||||||
args = args.concat(['-crf:'+i, ''+crf]);
|
args = args.concat(['-crf:'+i, ''+crf]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for(let i=1;i<config['transcode']['variants'];i++){
|
for(let i=1;i<config['transcode']['variants'];i++){
|
||||||
let bv: number = Math.floor((10000 / config['transcode']['variants']) * (config['transcode']['variants'] - i));
|
let bv: number = Math.floor((10000 / config['transcode']['variants']) * (config['transcode']['variants'] - i));
|
||||||
args = args.concat(['-b:v:'+i, ''+bv]);
|
args = args.concat(['-b:v:'+i, ''+bv]);
|
||||||
|
|
Reference in New Issue