feat(server, web): Added TranscodePolicy "Bitrate higher than max bitrate or not in accepted format" (#6479)
* chore: rebase * chore: open api * Add Database-Migration for setting targetCodec as acceptedCodec if it was set by admin * Add TranscodePolicy setting, to only transcode files with a bitrate higher than set max bitrate * Rename enum value of TranscodePolicy * calculate max_bitrate according to "k" and "m" suffix for comparison * remove migration * minor changes * UnitTest for Bitrate Policy * Fix UnitTest * Add missing output options --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
@@ -108,6 +108,7 @@ export enum SystemConfigKey {
|
||||
export enum TranscodePolicy {
|
||||
ALL = 'all',
|
||||
OPTIMAL = 'optimal',
|
||||
BITRATE = 'bitrate',
|
||||
REQUIRED = 'required',
|
||||
DISABLED = 'disabled',
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ export class MediaRepository implements IMediaRepository {
|
||||
formatName: results.format.format_name,
|
||||
formatLongName: results.format.format_long_name,
|
||||
duration: results.format.duration || 0,
|
||||
bitrate: results.format.bit_rate ?? 0,
|
||||
},
|
||||
videoStreams: results.streams
|
||||
.filter((stream) => stream.codec_type === 'video')
|
||||
|
||||
Reference in New Issue
Block a user