]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video-file-metadata.ts
Add video file metadata to download modal, via ffprobe (#2411)
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video-file-metadata.ts
CommitLineData
8319d6ae
RK
1import { FfprobeData } from "fluent-ffmpeg"
2import { DeepOmit } from "@server/models/utils"
3
4export type VideoFileMetadataModel = DeepOmit<FfprobeData, 'filename'>
5
6export class VideoFileMetadata implements VideoFileMetadataModel {
7 streams: { [x: string]: any, [x: number]: any }[]
8 format: { [x: string]: any, [x: number]: any }
9 chapters: any[]
10
11 constructor (hash: Partial<VideoFileMetadataModel>) {
12 this.chapters = hash.chapters
13 this.format = hash.format
14 this.streams = hash.streams
15
16 delete this.format.filename
17 }
18}