mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:29:32 -05:00 
			
		
		
		
	fix(server): nvenc not working when there are no filters (#9802)
don't add format=nv12
This commit is contained in:
		
							parent
							
								
									351dd647a9
								
							
						
					
					
						commit
						21bd20fd75
					
				@ -538,8 +538,6 @@ export class NvencHwDecodeConfig extends NvencSwDecodeConfig {
 | 
			
		||||
    options.push(...this.getToneMapping(videoStream));
 | 
			
		||||
    if (options.length > 0) {
 | 
			
		||||
      options[options.length - 1] += ':format=nv12';
 | 
			
		||||
    } else {
 | 
			
		||||
      options.push('format=nv12');
 | 
			
		||||
    }
 | 
			
		||||
    return options;
 | 
			
		||||
  }
 | 
			
		||||
@ -563,7 +561,7 @@ export class NvencHwDecodeConfig extends NvencSwDecodeConfig {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  getInputThreadOptions() {
 | 
			
		||||
    return [`-threads ${this.config.threads <= 0 ? 1 : this.config.threads}`];
 | 
			
		||||
    return [`-threads 1`];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  getOutputThreadOptions() {
 | 
			
		||||
@ -653,7 +651,7 @@ export class QsvHwDecodeConfig extends QsvSwDecodeConfig {
 | 
			
		||||
      throw new Error('No QSV device found');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const options = ['-hwaccel qsv', '-hwaccel_output_format qsv', '-async_depth 4', '-threads 1'];
 | 
			
		||||
    const options = ['-hwaccel qsv', '-hwaccel_output_format qsv', '-async_depth 4', ...this.getInputThreadOptions()];
 | 
			
		||||
    const hwDevice = this.getPreferredHardwareDevice();
 | 
			
		||||
    if (hwDevice) {
 | 
			
		||||
      options.push(`-qsv_device ${hwDevice}`);
 | 
			
		||||
@ -698,6 +696,10 @@ export class QsvHwDecodeConfig extends QsvSwDecodeConfig {
 | 
			
		||||
      'hwmap=derive_device=qsv:reverse=1,format=qsv',
 | 
			
		||||
    ];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  getInputThreadOptions() {
 | 
			
		||||
    return [`-threads 1`];
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export class VAAPIConfig extends BaseHWConfig {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user