-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinterfaces.ts
114 lines (106 loc) · 2.08 KB
/
interfaces.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/**
* Error information
*
* @internal
*/
export interface FfprobeError {
error: {
code: number;
string: string;
};
}
/**
* ffprobe info object
*/
export interface FfprobeData {
streams: Stream[];
format: Format;
programs?: FfprobeProgram[];
}
interface Format {
filename: string;
nb_streams: number;
nb_programs: number;
format_name: string;
format_long_name: string;
start_time: string;
duration: string;
size: string;
bit_rate: string;
probe_score: number;
tags: Tags;
}
interface Stream {
index: number;
codec_name: string;
codec_long_name: string;
profile: string;
codec_type: string;
codec_time_base: string;
codec_tag_string: string;
codec_tag: string;
width: number;
height: number;
coded_width: number;
coded_height: number;
has_b_frames: number;
sample_aspect_ratio: string;
display_aspect_ratio: string;
pix_fmt: string;
level: number;
chroma_location: string;
refs: number;
is_avc: string;
nal_length_size: string;
r_frame_rate: string;
avg_frame_rate: string;
time_base: string;
start_pts: number;
start_time: string;
duration_ts: number;
duration: string;
bit_rate: string;
bits_per_raw_sample: string;
nb_frames: string;
sample_fmt: string;
sample_rate: string;
channels: number;
channel_layout: string;
bits_per_sample: number;
disposition: Disposition;
tags: Tags;
}
export interface FfprobeOpts {
startTime?: string;
endTime?: string;
path?: string;
}
export type FfprobeCallback = (err: Error | null, data?: FfprobeData) => void;
interface FfprobeProgram {
program_id: number;
program_num: number;
nb_streams: number;
pmt_pid: number;
pcr_pid: number;
start_pts: number;
start_time: string;
tags: Tags;
streams: Stream[];
}
interface Disposition {
default: number;
dub: number;
original: number;
comment: number;
lyrics: number;
karaoke: number;
forced: number;
hearing_impaired: number;
visual_impaired: number;
clean_effects: number;
attached_pic: number;
timed_thumbnails: number;
}
interface Tags {
[key: string]: string;
}