lib/common/file/entity/video-file-metadata.entity.ts
The entity stores the video metadata of the file
Properties |
bitrate |
Type : number
|
Decorators :
@Index()
|
codec |
Type : string
|
Decorators :
@Index()
|
colorRange |
Type : string
|
Decorators :
@Index()
|
colorSpace |
Type : string
|
Decorators :
@Index()
|
container |
Type : string
|
Decorators :
@Index()
|
displayAspectRatio |
Type : string
|
Decorators :
@Index()
|
duration |
Type : number
|
Decorators :
@Index()
|
frameRate |
Type : string
|
Decorators :
@Index()
|
height |
Type : number
|
Decorators :
@Index()
|
id |
Type : number
|
Decorators :
@PrimaryGeneratedColumn({zerofill: true})
|
rotate |
Type : string
|
Decorators :
@Index()
|
sampleAspectRatio |
Type : string
|
Decorators :
@Index()
|
width |
Type : number
|
Decorators :
@Index()
|
import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";
import { VideoFileMetadata } from "../file.types";
/**
* The entity stores the video metadata of the file
*/
@Entity("file_metadata_video")
export class VideoFileMetadataEntity implements VideoFileMetadata {
@PrimaryGeneratedColumn({ zerofill: true })
id: number;
@Index()
@Column("varchar", { nullable: true })
codec: string;
@Index()
@Column("varchar", { nullable: true })
container: string;
@Index()
@Column("int", { nullable: true, default: null })
width: number;
@Index()
@Column("int", { nullable: true, default: null })
height: number;
@Index()
@Column("int", { nullable: true })
bitrate: number;
@Index()
@Column("decimal", {
nullable: true,
default: null,
precision: 15,
scale: 10,
})
duration: number;
@Index()
@Column("varchar", { name: "sample_aspect_ratio", nullable: true })
sampleAspectRatio: string;
@Index()
@Column("varchar", { name: "display_aspect_ratio", nullable: true })
displayAspectRatio: string;
@Index()
@Column("varchar", { name: "color_range", nullable: true })
colorRange: string;
@Index()
@Column("varchar", { name: "color_space", nullable: true })
colorSpace: string;
@Index()
@Column("varchar", { name: "frame_rate", nullable: true })
frameRate: string;
@Index()
@Column("varchar", { nullable: true })
rotate: string;
}