diff --git a/server/src/services/media.service.spec.ts b/server/src/services/media.service.spec.ts index d9e2fa9f51..d4ec8e6533 100644 --- a/server/src/services/media.service.spec.ts +++ b/server/src/services/media.service.spec.ts @@ -1573,6 +1573,7 @@ describe(MediaService.name, () => { '-hwaccel qsv', '-hwaccel_output_format qsv', '-async_depth 4', + '-noautorotate', '-threads 1', ]), outputOptions: expect.arrayContaining([ @@ -1838,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']), + inputOptions: expect.arrayContaining([ + '-hwaccel rkmpp', + '-hwaccel_output_format drm_prime', + '-afbc rga', + '-noautorotate', + ]), outputOptions: expect.arrayContaining([ `-c:v h264_rkmpp`, '-c:a copy', diff --git a/server/src/utils/media.ts b/server/src/utils/media.ts index 74502f3d5c..cf8e438349 100644 --- a/server/src/utils/media.ts +++ b/server/src/utils/media.ts @@ -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', ...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}`); @@ -910,7 +916,7 @@ export class RkmppHwDecodeConfig extends RkmppSwDecodeConfig { throw new Error('No RKMPP device found'); } - return ['-hwaccel rkmpp', '-hwaccel_output_format drm_prime', '-afbc rga']; + return ['-hwaccel rkmpp', '-hwaccel_output_format drm_prime', '-afbc rga', '-noautorotate']; } getFilterOptions(videoStream: VideoStreamInfo) {