Browse Source

Disable CRF when using hwaccel

pull/23/head
knotteye 8 months ago
parent
commit
a3341d8b7d
  1. 8
      src/server.ts

8
src/server.ts

@ -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));

Loading…
Cancel
Save