Disable CRF when using hwaccel

pull/23/head
knotteye 2021-01-10 15:09:42 -06:00
parent 8a33b80593
commit a3341d8b7d
1 changed files with 5 additions and 3 deletions

View File

@ -155,9 +155,11 @@ async function transCommand(user: string, key: string): Promise<string[]>{
for(let i=1;i<config['transcode']['variants'];i++){
args = args.concat(['-c:v:'+i, vcodec,]);
}
for(let i=1;i<config['transcode']['variants'];i++){
let crf: number = Math.floor(18 + (i * 8)) > 51 ? 51 : Math.floor(18 + (i * 7));
args = args.concat(['-crf:'+i, ''+crf]);
if(!config['hwaccel']['type']){
for(let i=1;i<config['transcode']['variants'];i++){
let crf: number = Math.floor(18 + (i * 8)) > 51 ? 51 : Math.floor(18 + (i * 7));
args = args.concat(['-crf:'+i, ''+crf]);
}
}
for(let i=1;i<config['transcode']['variants'];i++){
let bv: number = Math.floor((10000 / config['transcode']['variants']) * (config['transcode']['variants'] - i));