2020-06-23 14:10:17 +02:00
|
|
|
import { FfprobeData } from 'fluent-ffmpeg'
|
|
|
|
import { DeepOmit } from '../../core-utils'
|
2020-03-10 14:39:40 +01:00
|
|
|
|
|
|
|
export type VideoFileMetadataModel = DeepOmit<FfprobeData, 'filename'>
|
|
|
|
|
|
|
|
export class VideoFileMetadata implements VideoFileMetadataModel {
|
|
|
|
streams: { [x: string]: any, [x: number]: any }[]
|
|
|
|
format: { [x: string]: any, [x: number]: any }
|
|
|
|
chapters: any[]
|
|
|
|
|
|
|
|
constructor (hash: Partial<VideoFileMetadataModel>) {
|
|
|
|
this.chapters = hash.chapters
|
|
|
|
this.format = hash.format
|
|
|
|
this.streams = hash.streams
|
|
|
|
|
|
|
|
delete this.format.filename
|
|
|
|
}
|
|
|
|
}
|