-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
213 lines (204 loc) · 10 KB
/
test.py
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
r"""
generated by json2python-models v0.3.0 at Tue Jun 11 08:35:21 2024
command: /home/user/.local/share/virtualenvs/universal-ffmpeg-recoder--CNKHk_T/bin/json2models -m Ffprobe possible.json -f dataclasses -s nested --datetime
"""
from dataclasses import dataclass, field
from json_to_models.dynamic_typing import BooleanString, FloatString, IntString, IsoDatetimeString, IsoTimeString
from typing import List, Optional, Union
from typing_extensions import Literal
@dataclass
class Ffprobe:
@dataclass
class Stream:
@dataclass
class Disposition:
default: int
dub: int
original: int
comment: int
lyrics: int
karaoke: int
forced: int
hearing_impaired: int
visual_impaired: int
clean_effects: int
attached_pic: int
timed_thumbnails: int
non_diegetic: int
captions: int
descriptions: int
metadata: int
dependent: int
still_image: int
@dataclass
class Tag:
language: Optional[str] = None
title: Optional[str] = None
encoder: Optional[str] = None
duration: Optional[IsoTimeString] = None
bp_seng: Optional[IntString] = None
duratio_neng: Optional[IsoTimeString] = None
number_of_frame_seng: Optional[IntString] = None
number_of_byte_seng: Optional[IntString] = None
_statistics_writing_ap_peng: Optional[str] = None
_statistics_writing_date_ut_ceng: Optional[IsoDatetimeString] = None
_statistics_tag_seng: Optional[str] = None
handler_name: Optional[str] = None
vendor_id: Optional[Literal["FFMP", "[0][0][0][0]", "appl"]] = None
bps: Optional[IntString] = None
number_of_frames: Optional[IntString] = None
number_of_bytes: Optional[IntString] = None
_statistics_writing_app: Optional[str] = None
_statistics_writing_date_utc: Optional[IsoDatetimeString] = None
_statistics_tags: Optional[str] = None
handler_name: Optional[str] = None
vendor_id: Optional[Literal["FFMP", "SVis", "[0][0][0][0]", "appl"]] = None
encoder: Optional[str] = None
alpha_mode: Optional[IntString] = None
filename: Optional[str] = None
mimetype: Optional[str] = None
creation_time: Optional[IsoDatetimeString] = None
source_i_deng: Optional[str] = None
source_id: Optional[Union[IntString, Literal["00120A", "00120B", "00120C"]]] = None
timecode: Optional[str] = None
timecode: Optional[Literal["00:00:00:00", "00:00:02:00"]] = None
@dataclass
class SideDataList:
side_data_type: Literal["Audio Service Type", "CPB properties", "Display Matrix", "Spherical Mapping", "Stereo 3D"]
service_type: Optional[int] = None
displaymatrix: Optional[str] = None
rotation: Optional[int] = None
max_bitrate: Optional[int] = None
min_bitrate: Optional[int] = None
avg_bitrate: Optional[int] = None
buffer_size: Optional[int] = None
vbv_delay: Optional[int] = None
type_: Optional[Literal["2D"]] = None
inverted: Optional[int] = None
projection: Optional[Literal["equirectangular"]] = None
yaw: Optional[int] = None
pitch: Optional[int] = None
roll: Optional[int] = None
index: int
codec_type: Literal["attachment", "audio", "data", "subtitle", "video"]
codec_tag_string: str
codec_tag: str
r_frame_rate: str
avg_frame_rate: str
time_base: str
disposition: 'Disposition'
codec_name: Optional[str] = None
codec_long_name: Optional[str] = None
width: Optional[int] = None
height: Optional[int] = None
coded_width: Optional[int] = None
coded_height: Optional[int] = None
closed_captions: Optional[int] = None
film_grain: Optional[int] = None
has_b_frames: Optional[int] = None
sample_aspect_ratio: Optional[Union[IsoTimeString, str]] = None
display_aspect_ratio: Optional[str] = None
pix_fmt: Optional[str] = None
level: Optional[int] = None
chroma_location: Optional[Literal["center", "left", "topleft"]] = None
refs: Optional[int] = None
quarter_sample: Optional[BooleanString] = None
divx_packed: Optional[BooleanString] = None
start_pts: Optional[int] = None
start_time: Optional[FloatString] = None
duration_ts: Optional[int] = None
duration: Optional[FloatString] = None
bit_rate: Optional[IntString] = None
nb_frames: Optional[IntString] = None
extradata_size: Optional[int] = None
tags: Optional['Tag'] = None
profile: Optional[str] = None
field_order: Optional[Literal["bb", "progressive", "tb", "tt"]] = None
is_avc: Optional[BooleanString] = None
nal_length_size: Optional[IntString] = None
id_: Optional[str] = None
bits_per_raw_sample: Optional[IntString] = None
sample_fmt: Optional[Literal["fltp", "s16", "s16p", "s32", "s32p", "u8"]] = None
sample_rate: Optional[IntString] = None
channels: Optional[int] = None
channel_layout: Optional[str] = None
bits_per_sample: Optional[int] = None
initial_padding: Optional[int] = None
color_range: Optional[Literal["pc", "tv"]] = None
color_space: Optional[Literal["bt2020nc", "bt470bg", "bt709", "gbr", "smpte170m"]] = None
color_transfer: Optional[Literal["bt470bg", "bt709", "smpte170m", "smpte2084"]] = None
color_primaries: Optional[Literal["bt2020", "bt470bg", "bt709", "smpte170m"]] = None
side_data_list: Optional[List['SideDataList']] = field(default_factory=list)
missing_streams: Optional[IntString] = None
@dataclass
class Format:
@dataclass
class Tag_1G:
compatible_brands: Optional[str] = None
major_brand: Optional[Literal["M4V ", "XAVC", "dash", "isom", "mp42", "qt "]] = None
minor_version: Optional[IntString] = None
encoder: Optional[str] = None
major_brand: Optional[Literal["3gp5", "M4B ", "avc1", "iso5", "isom", "mp42", "qt "]] = None
minor_version: Optional[IntString] = None
compatible_brands: Optional[str] = None
encoder: Optional[str] = None
scene: Optional[Literal["Scene"]] = None
file: Optional[str] = None
date_: Optional[Union[IntString, Literal["2021/01/28 21:49:59", "2023/02/14 10:28:12", "2024/05/09 18:11:35", "2024/05/10 12:20:47", "2024/05/12 17:18:39", "2024/05/13 14:14:25", "2024/05/14 17:21:06", "2024/05/14 17:26:58", "2024/05/14 17:28:23"]]] = None
date_: Optional[str] = None
title: Optional[str] = None
creation_time: Optional[str] = None
comment: Optional[str] = None
writingfrontend: Optional[Literal["StaxRip v1.7.0.6"]] = None
purl: Optional[str] = None
comment: Optional[str] = None
artist: Optional[Literal["Bernd Lehahn", "KaraFun Karaoke", "Sing King"]] = None
description: Optional[str] = None
synopsis: Optional[str] = None
artist: Optional[Literal["Sing King"]] = None
description: Optional[str] = None
synopsis: Optional[str] = None
location: Optional[str] = None
hd_video: Optional[IntString] = None
comapplequicktimekeywords: Optional[Literal["1.Mai KJO\u0308", "After Movie EPF", "KSV", "KSV Elke", "KSV Max"]] = None
comapplequicktimedescription: Optional[str] = None
comapplequicktimeauthor: Optional[Literal["Philipp J\u00f6lli"]] = None
comapplequicktimedisplayname: Optional[Literal["1. Mai", "After Movie EPF", "Elke", "Elke fertig", "Max Deutsch"]] = None
comapplequicktimetitle: Optional[Literal["1. Mai", "After Movie EPF", "Elke", "Elke fertig", "Max Deutsch"]] = None
encodereng: Optional[str] = None
timecode: Optional[Literal["00:00:00:00", "00:00:02:00"]] = None
composer: Optional[str] = None
media_type: Optional[IntString] = None
season_number: Optional[IntString] = None
episode_sort: Optional[IntString] = None
i_tun_movi: Optional[str] = None
keywords: Optional[Literal["25.11.21", "TERRAFORMING"]] = None
comapplequicktimetitle: Optional[str] = None
comapplequicktimedescription: Optional[str] = None
comapplequicktimeauthor: Optional[Literal["Bernd Lehahn"]] = None
comapplequicktimedisplayname: Optional[str] = None
comapplequicktimekeywords: Optional[Literal["2.04.23", "2.04.23_2", "X4_CoH_Gamestarts", "_Gamestarts"]] = None
software: Optional[str] = None
modification_time: Optional[IsoDatetimeString] = None
hw: Optional[IntString] = None
bitrate: Optional[IntString] = None
maxrate: Optional[IntString] = None
te_is_reencode: Optional[IntString] = None
comandroidversion: Optional[Union[IntString, Literal["6.0.1", "7.1.1"]]] = None
audiodelay: Optional[IntString] = None
can_seek_to_end: Optional[IntString] = None
creationdate: Optional[str] = None
comandroidcapturefps: Optional[FloatString] = None
filename: str
nb_streams: int
nb_programs: int
format_name: str
format_long_name: str
duration: FloatString
size: IntString
bit_rate: IntString
probe_score: int
start_time: Optional[FloatString] = None
tags: Optional['Tag_1G'] = None
streams: Optional[List['Stream']] = field(default_factory=list)
format_: Optional['Format'] = None