mirror of
https://github.com/immich-app/immich.git
synced 2026-05-22 23:52:32 -04:00
feat(server): track video metadata (#28023)
* track video metadata * earlier duration check * revert colorspace change * duplicate constant * formatting * linting * add comments * redundant variable * simplify tests * use totalDuration instead of format.duration * medium tests * install ffmpeg * install noble * update test-assets commit * make timeBase non-nullable * linting * use proper smallint * add ffmpeg to mise * simplify duration * regenerate migration
This commit is contained in:
@@ -603,6 +603,133 @@ export enum ExifOrientation {
|
||||
Rotate270CW = 8,
|
||||
}
|
||||
|
||||
/** ITU-T H.273 colour primaries codes. */
|
||||
export enum ColorPrimaries {
|
||||
Reserved = 0,
|
||||
Bt709 = 1,
|
||||
Unknown = 2,
|
||||
Bt470M = 4,
|
||||
Bt470Bg = 5,
|
||||
Smpte170M = 6,
|
||||
Smpte240M = 7,
|
||||
Film = 8,
|
||||
Bt2020 = 9,
|
||||
Smpte428 = 10,
|
||||
Smpte431 = 11,
|
||||
Smpte432 = 12,
|
||||
Ebu3213 = 22,
|
||||
}
|
||||
|
||||
/** ITU-T H.273 transfer characteristics codes. */
|
||||
export enum ColorTransfer {
|
||||
Reserved = 0,
|
||||
Bt709 = 1,
|
||||
Unknown = 2,
|
||||
Bt470M = 4,
|
||||
Bt470Bg = 5,
|
||||
Smpte170M = 6,
|
||||
Smpte240M = 7,
|
||||
Linear = 8,
|
||||
Log100 = 9,
|
||||
Log316 = 10,
|
||||
Iec6196624 = 11,
|
||||
Bt1361E = 12,
|
||||
Iec6196621 = 13,
|
||||
Bt202010 = 14,
|
||||
Bt202012 = 15,
|
||||
Smpte2084 = 16,
|
||||
Smpte428 = 17,
|
||||
AribStdB67 = 18,
|
||||
}
|
||||
|
||||
/** ITU-T H.273 matrix coefficients codes. */
|
||||
export enum ColorMatrix {
|
||||
Gbr = 0,
|
||||
Bt709 = 1,
|
||||
Unknown = 2,
|
||||
Reserved = 3,
|
||||
Fcc = 4,
|
||||
Bt470Bg = 5,
|
||||
Smpte170M = 6,
|
||||
Smpte240M = 7,
|
||||
Ycgco = 8,
|
||||
Bt2020Nc = 9,
|
||||
Bt2020C = 10,
|
||||
Smpte2085 = 11,
|
||||
ChromaDerivedNc = 12,
|
||||
ChromaDerivedC = 13,
|
||||
Ictcp = 14,
|
||||
}
|
||||
|
||||
/** H.264 `profile_idc` values. */
|
||||
// H.264 has a few profiles that have the same value but different names, included so lookup by name works
|
||||
export enum H264Profile {
|
||||
ConstrainedBaseline = 66,
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
||||
Baseline = 66,
|
||||
Main = 77,
|
||||
Extended = 88,
|
||||
ConstrainedHigh = 100,
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
||||
ProgressiveHigh = 100,
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
||||
High = 100,
|
||||
High10 = 110,
|
||||
High422 = 122,
|
||||
High444Predictive = 244,
|
||||
}
|
||||
|
||||
/** HEVC `profile_idc` values. */
|
||||
export enum HevcProfile {
|
||||
Main = 1,
|
||||
Main10 = 2,
|
||||
MainStillPicture = 3,
|
||||
Rext = 4,
|
||||
}
|
||||
|
||||
/** AV1 `seq_profile` values. */
|
||||
export enum Av1Profile {
|
||||
Main = 0,
|
||||
High = 1,
|
||||
Professional = 2,
|
||||
}
|
||||
|
||||
/** MPEG-4 Audio Object Type values for AAC. */
|
||||
export enum AacProfile {
|
||||
Main = 1,
|
||||
Lc = 2,
|
||||
Ssr = 3,
|
||||
Ltp = 4,
|
||||
HeAac = 5,
|
||||
Ld = 23,
|
||||
HeAacv2 = 29,
|
||||
Eld = 39,
|
||||
XheAac = 42,
|
||||
}
|
||||
|
||||
/** Dolby Vision bitstream profile numbers from the DOVI configuration record. */
|
||||
export enum DvProfile {
|
||||
Dvhe03 = 3,
|
||||
Dvhe04 = 4,
|
||||
Dvhe05 = 5,
|
||||
Dvhe07 = 7,
|
||||
Dvhe08 = 8,
|
||||
Dvav09 = 9,
|
||||
Dav110 = 10,
|
||||
}
|
||||
|
||||
/**
|
||||
* Dolby Vision base-layer signal-compatibility ID from the DOVI configuration record.
|
||||
* Identifies what the base HEVC/AVC layer renders as on a non-DV decoder.
|
||||
*/
|
||||
export enum DvSignalCompatibility {
|
||||
None = 0,
|
||||
Hdr10 = 1,
|
||||
Sdr709 = 2,
|
||||
Hlg = 4,
|
||||
Sdr2020 = 6,
|
||||
}
|
||||
|
||||
export enum DatabaseExtension {
|
||||
Cube = 'cube',
|
||||
EarthDistance = 'earthdistance',
|
||||
|
||||
Reference in New Issue
Block a user