fix(server): extract motion photo android single frame (#3903)

This commit is contained in:
Mert
2023-08-29 05:01:42 -04:00
committed by GitHub
parent d0a06739d8
commit e510e733cd
7 changed files with 163 additions and 147 deletions

View File

@@ -42,6 +42,7 @@ export class MediaRepository implements IMediaRepository {
videoStreams: results.streams
.filter((stream) => stream.codec_type === 'video')
.map((stream) => ({
index: stream.index,
height: stream.height || 0,
width: stream.width || 0,
codecName: stream.codec_name === 'h265' ? 'hevc' : stream.codec_name,
@@ -53,8 +54,10 @@ export class MediaRepository implements IMediaRepository {
audioStreams: results.streams
.filter((stream) => stream.codec_type === 'audio')
.map((stream) => ({
index: stream.index,
codecType: stream.codec_type,
codecName: stream.codec_name,
frameCount: Number.parseInt(stream.nb_frames ?? '0'),
})),
};
}