fix(server): encodes iPhone 16 Pro video with unknown audio codec (#13593)

* fix(server): encodes iPhone 16 Pro video with unknown audio codec

* remove white space

* pr feedback + unit test

* remove public method keyword

* test the service

* correcting unit test
This commit is contained in:
Alex
2024-10-19 00:50:08 -05:00
committed by GitHub
parent c9c0212ca9
commit 39b571a95c
3 changed files with 26 additions and 1 deletions

View File

@@ -349,7 +349,9 @@ export class MediaService extends BaseService {
}
private getMainStream<T extends VideoStreamInfo | AudioStreamInfo>(streams: T[]): T {
return streams.sort((stream1, stream2) => stream2.frameCount - stream1.frameCount)[0];
return streams
.filter((stream) => stream.codecName !== 'unknown')
.sort((stream1, stream2) => stream2.frameCount - stream1.frameCount)[0];
}
private getTranscodeTarget(