feat(server): only transcode streams that require it (#7106)

This commit is contained in:
Mert
2024-02-14 11:24:39 -05:00
committed by GitHub
parent b823dfffdc
commit 5ff68d4cdb
7 changed files with 169 additions and 97 deletions

View File

@@ -118,6 +118,13 @@ export enum TranscodePolicy {
DISABLED = 'disabled',
}
export enum TranscodeTarget {
NONE,
AUDIO,
VIDEO,
ALL,
}
export enum VideoCodec {
H264 = 'h264',
HEVC = 'hevc',

View File

@@ -60,6 +60,7 @@ export class MediaRepository implements IMediaRepository {
frameCount: Number.parseInt(stream.nb_frames ?? '0'),
rotation: Number.parseInt(`${stream.rotation ?? 0}`),
isHDR: stream.color_transfer === 'smpte2084' || stream.color_transfer === 'arib-std-b67',
bitrate: Number.parseInt(stream.bit_rate ?? '0'),
})),
audioStreams: results.streams
.filter((stream) => stream.codec_type === 'audio')