forked from xfrr/goffmpeg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
81 lines (74 loc) · 2.7 KB
/
models.go
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
package models
type Ffmpeg struct {
FfmpegBinPath string
FfprobeBinPath string
}
type Metadata struct {
Streams []Streams `json:"streams"`
Format Format `json:"format"`
}
type Streams struct {
Index int
ID string `json:"id"`
CodecName string `json:"codec_name"`
CodecLongName string `json:"codec_long_name"`
Profile string `json:"profile"`
CodecType string `json:"codec_type"`
CodecTimeBase string `json:"codec_time_base"`
CodecTagString string `json:"codec_tag_string"`
CodecTag string `json:"codec_tag"`
Width int `json:"width"`
Height int `json:"height"`
CodedWidth int `json:"coded_width"`
CodedHeight int `json:"coded_height"`
HasBFrames int `json:"has_b_frames"`
SampleAspectRatio string `json:"sample_aspect_ratio"`
DisplayAspectRatio string `json:"display_aspect_ratio"`
PixFmt string `json:"pix_fmt"`
Level int `json:"level"`
ChromaLocation string `json:"chroma_location"`
Refs int `json:"refs"`
QuarterSample string `json:"quarter_sample"`
DivxPacked string `json:"divx_packed"`
RFrameRrate string `json:"r_frame_rate"`
AvgFrameRate string `json:"avg_frame_rate"`
TimeBase string `json:"time_base"`
DurationTs int `json:"duration_ts"`
Duration string `json:"duration"`
Disposition Disposition `json:"disposition"`
BitRate string `json:"bit_rate"`
}
type Disposition struct {
Default int `json:"default"`
Dub int `json:"dub"`
Original int `json:"original"`
Comment int `json:"comment"`
Lyrics int `json:"lyrics"`
Karaoke int `json:"karaoke"`
Forced int `json:"forced"`
HearingImpaired int `json:"hearing_impaired"`
VisualImpaired int `json:"visual_impaired"`
CleanEffects int `json:"clean_effects"`
}
type Format struct {
Filename string
NbStreams int `json:"nb_streams"`
NbPrograms int `json:"nb_programs"`
FormatName string `json:"format_name"`
FormatLongName string `json:"format_long_name"`
Duration string `json:"duration"`
Size string `json:"size"`
BitRate string `json:"bit_rate"`
ProbeScore int `json:"probe_score"`
Tags Tags `json:"tags"`
}
type Progress struct {
FramesProcessed string
CurrentTime string
CurrentBitrate string
Progress float64
Speed string
}
type Tags struct {
Encoder string `json:"ENCODER"`
}