format fix

This commit is contained in:
Alex Tran
2024-07-08 22:44:29 -05:00
parent 3ab67886b0
commit fed7d0464a
2 changed files with 13 additions and 2 deletions

View File

@@ -1839,7 +1839,12 @@ describe(MediaService.name, () => {
'/original/path.ext',
'upload/encoded-video/user-id/as/se/asset-id.mp4',
{
inputOptions: expect.arrayContaining(['-hwaccel rkmpp', '-hwaccel_output_format drm_prime', '-afbc rga', '-noautorotate']),
inputOptions: expect.arrayContaining([
'-hwaccel rkmpp',
'-hwaccel_output_format drm_prime',
'-afbc rga',
'-noautorotate',
]),
outputOptions: expect.arrayContaining([
`-c:v h264_rkmpp`,
'-c:a copy',

View File

@@ -732,7 +732,13 @@ export class QsvHwDecodeConfig extends QsvSwDecodeConfig {
throw new Error('No QSV device found');
}
const options = ['-hwaccel qsv', '-hwaccel_output_format qsv', '-async_depth 4', '-noautorotate', ...this.getInputThreadOptions()];
const options = [
'-hwaccel qsv',
'-hwaccel_output_format qsv',
'-async_depth 4',
'-noautorotate',
...this.getInputThreadOptions(),
];
const hwDevice = this.getPreferredHardwareDevice();
if (hwDevice) {
options.push(`-qsv_device ${hwDevice}`);