easyrip 4.7.0__py3-none-any.whl → 4.8.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- easyrip/easyrip_command.py +3 -3
- easyrip/easyrip_main.py +34 -9
- easyrip/easyrip_web/third_party_api.py +7 -2
- easyrip/global_val.py +1 -1
- easyrip/ripper/param.py +65 -45
- {easyrip-4.7.0.dist-info → easyrip-4.8.1.dist-info}/METADATA +1 -1
- {easyrip-4.7.0.dist-info → easyrip-4.8.1.dist-info}/RECORD +11 -11
- {easyrip-4.7.0.dist-info → easyrip-4.8.1.dist-info}/WHEEL +0 -0
- {easyrip-4.7.0.dist-info → easyrip-4.8.1.dist-info}/entry_points.txt +0 -0
- {easyrip-4.7.0.dist-info → easyrip-4.8.1.dist-info}/licenses/LICENSE +0 -0
- {easyrip-4.7.0.dist-info → easyrip-4.8.1.dist-info}/top_level.txt +0 -0
easyrip/easyrip_command.py
CHANGED
|
@@ -393,7 +393,7 @@ class Opt_type(enum.Enum):
|
|
|
393
393
|
"'auto:...' can only select which match infix.\n"
|
|
394
394
|
" e.g. 'auto:zh-Hans:zh-Hant'"
|
|
395
395
|
),
|
|
396
|
-
childs=(Cmd_type_val(("
|
|
396
|
+
childs=(Cmd_type_val(("auto",)),),
|
|
397
397
|
)
|
|
398
398
|
_only_mux_sub_path = Cmd_type_val(
|
|
399
399
|
("-only-mux-sub-path",),
|
|
@@ -407,7 +407,7 @@ class Opt_type(enum.Enum):
|
|
|
407
407
|
"Mux ASS subtitles in MKV with subset\n" # .
|
|
408
408
|
"The usage of 'auto' is detailed in '-sub'"
|
|
409
409
|
),
|
|
410
|
-
childs=(Cmd_type_val(("
|
|
410
|
+
childs=(Cmd_type_val(("auto",)),),
|
|
411
411
|
)
|
|
412
412
|
_subset_font_dir = Cmd_type_val(
|
|
413
413
|
("-subset-font-dir",),
|
|
@@ -515,7 +515,7 @@ class Opt_type(enum.Enum):
|
|
|
515
515
|
"Setting FPS when muxing\n"
|
|
516
516
|
"When using auto, the frame rate is automatically obtained from the input video and adsorbed to the nearest preset point"
|
|
517
517
|
),
|
|
518
|
-
childs=(Cmd_type_val(("
|
|
518
|
+
childs=(Cmd_type_val(("auto",)),),
|
|
519
519
|
)
|
|
520
520
|
_chapters = Cmd_type_val(
|
|
521
521
|
("-chapters",),
|
easyrip/easyrip_main.py
CHANGED
|
@@ -8,6 +8,7 @@ import shlex
|
|
|
8
8
|
import shutil
|
|
9
9
|
import subprocess
|
|
10
10
|
import sys
|
|
11
|
+
import textwrap
|
|
11
12
|
import threading
|
|
12
13
|
import tkinter as tk
|
|
13
14
|
import tomllib
|
|
@@ -36,7 +37,8 @@ from .easyrip_mlang import (
|
|
|
36
37
|
)
|
|
37
38
|
from .easyrip_prompt import easyrip_prompt
|
|
38
39
|
from .ripper.media_info import Media_info
|
|
39
|
-
from .ripper.ripper import
|
|
40
|
+
from .ripper.ripper import Ripper
|
|
41
|
+
from .ripper.param import DEFAULT_PRESET_PARAMS, PRESET_OPT_NAME
|
|
40
42
|
from .ripper.sub_and_font import load_fonts
|
|
41
43
|
from .utils import change_title, check_ver, read_text
|
|
42
44
|
|
|
@@ -424,16 +426,39 @@ def run_command(command: Iterable[str] | str) -> bool:
|
|
|
424
426
|
log.send(_want_doc_cmd_type.value.to_doc(), is_format=False)
|
|
425
427
|
elif cmd_list[2] in Ripper.Preset_name._value2member_map_:
|
|
426
428
|
_preset = Ripper.Preset_name(cmd_list[2])
|
|
427
|
-
if
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
429
|
+
if (
|
|
430
|
+
_preset in DEFAULT_PRESET_PARAMS
|
|
431
|
+
or _preset in PRESET_OPT_NAME
|
|
432
|
+
):
|
|
433
|
+
if _preset in PRESET_OPT_NAME:
|
|
434
|
+
log.send(
|
|
435
|
+
"Params that can be directly used:\n{}",
|
|
436
|
+
textwrap.indent(
|
|
437
|
+
"\n".join(
|
|
438
|
+
f"-{n}"
|
|
439
|
+
for n in PRESET_OPT_NAME[_preset]
|
|
440
|
+
),
|
|
441
|
+
prefix=" ",
|
|
442
|
+
),
|
|
443
|
+
)
|
|
444
|
+
if _preset in DEFAULT_PRESET_PARAMS:
|
|
445
|
+
_default_params = DEFAULT_PRESET_PARAMS[_preset]
|
|
446
|
+
max_name_len = (
|
|
447
|
+
max(len(str(n)) for n in _default_params) + 1
|
|
448
|
+
)
|
|
449
|
+
log.send(
|
|
450
|
+
"Default val:\n{}",
|
|
451
|
+
textwrap.indent(
|
|
452
|
+
"\n".join(
|
|
453
|
+
f"{f'-{n}':>{max_name_len}} {v}"
|
|
454
|
+
for n, v in _default_params.items()
|
|
455
|
+
),
|
|
456
|
+
prefix=" ",
|
|
457
|
+
),
|
|
458
|
+
)
|
|
434
459
|
else:
|
|
435
460
|
log.send(
|
|
436
|
-
"The preset '{}' has no
|
|
461
|
+
"The preset '{}' has no separate help", cmd_list[2]
|
|
437
462
|
)
|
|
438
463
|
else:
|
|
439
464
|
log.error("'{}' is not a member of preset", cmd_list[2])
|
|
@@ -82,8 +82,13 @@ class github:
|
|
|
82
82
|
|
|
83
83
|
try:
|
|
84
84
|
with urllib.request.urlopen(req) as response:
|
|
85
|
-
data = json.loads(response.read().decode("utf-8"))
|
|
86
|
-
|
|
85
|
+
data: dict = json.loads(response.read().decode("utf-8"))
|
|
86
|
+
ver = data.get("tag_name")
|
|
87
|
+
if ver is None:
|
|
88
|
+
return None
|
|
89
|
+
if isinstance(ver, str):
|
|
90
|
+
return ver.lstrip("v")
|
|
91
|
+
raise ValueError(f"ver = {ver!r}")
|
|
87
92
|
except Exception as e:
|
|
88
93
|
log.debug(
|
|
89
94
|
"'{}' execution failed: {}",
|
easyrip/global_val.py
CHANGED
|
@@ -3,7 +3,7 @@ import sys
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
|
|
5
5
|
PROJECT_NAME = "Easy Rip"
|
|
6
|
-
PROJECT_VERSION = "4.
|
|
6
|
+
PROJECT_VERSION = "4.8.1"
|
|
7
7
|
PROJECT_TITLE = f"{PROJECT_NAME} v{PROJECT_VERSION}"
|
|
8
8
|
PROJECT_URL = "https://github.com/op200/EasyRip"
|
|
9
9
|
PROJECT_RELEASE_API = "https://api.github.com/repos/op200/EasyRip/releases/latest"
|
easyrip/ripper/param.py
CHANGED
|
@@ -120,50 +120,6 @@ class Muxer(enum.Enum):
|
|
|
120
120
|
return DEFAULT
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
_DEFAULT_X265_PARAMS: Final[dict[LiteralString, LiteralString]] = {
|
|
124
|
-
"crf": "20",
|
|
125
|
-
"qpmin": "6",
|
|
126
|
-
"qpmax": "32",
|
|
127
|
-
"rd": "3",
|
|
128
|
-
"psy-rd": "2",
|
|
129
|
-
"rdoq-level": "0",
|
|
130
|
-
"psy-rdoq": "0",
|
|
131
|
-
"qcomp": "0.68",
|
|
132
|
-
"keyint": "250",
|
|
133
|
-
"min-keyint": "2",
|
|
134
|
-
"deblock": "0,0",
|
|
135
|
-
"me": "umh",
|
|
136
|
-
"merange": "57",
|
|
137
|
-
"hme": "1",
|
|
138
|
-
"hme-search": "hex,hex,hex",
|
|
139
|
-
"hme-range": "16,57,92",
|
|
140
|
-
"aq-mode": "2",
|
|
141
|
-
"aq-strength": "1",
|
|
142
|
-
"tu-intra-depth": "1",
|
|
143
|
-
"tu-inter-depth": "1",
|
|
144
|
-
"limit-tu": "0",
|
|
145
|
-
"bframes": "16",
|
|
146
|
-
"ref": "8",
|
|
147
|
-
"subme": "2",
|
|
148
|
-
"open-gop": "1",
|
|
149
|
-
"gop-lookahead": "0",
|
|
150
|
-
"rc-lookahead": "20",
|
|
151
|
-
"rect": "0",
|
|
152
|
-
"amp": "0",
|
|
153
|
-
"cbqpoffs": "0",
|
|
154
|
-
"crqpoffs": "0",
|
|
155
|
-
"ipratio": "1.4",
|
|
156
|
-
"pbratio": "1.3",
|
|
157
|
-
"early-skip": "1",
|
|
158
|
-
"ctu": "64",
|
|
159
|
-
"min-cu-size": "8",
|
|
160
|
-
"max-tu-size": "32",
|
|
161
|
-
"level-idc": "0",
|
|
162
|
-
"sao": "0",
|
|
163
|
-
"weightb": "1",
|
|
164
|
-
"info": "1",
|
|
165
|
-
}
|
|
166
|
-
|
|
167
123
|
X265_PARAMS_NAME: Final[tuple[LiteralString, ...]] = (
|
|
168
124
|
"crf",
|
|
169
125
|
"qpmin",
|
|
@@ -205,7 +161,6 @@ X265_PARAMS_NAME: Final[tuple[LiteralString, ...]] = (
|
|
|
205
161
|
"level-idc",
|
|
206
162
|
"sao",
|
|
207
163
|
)
|
|
208
|
-
|
|
209
164
|
X264_PARAMS_NAME: Final[tuple[LiteralString, ...]] = (
|
|
210
165
|
"threads",
|
|
211
166
|
"crf",
|
|
@@ -225,8 +180,68 @@ X264_PARAMS_NAME: Final[tuple[LiteralString, ...]] = (
|
|
|
225
180
|
"min-keyint",
|
|
226
181
|
"trellis",
|
|
227
182
|
"fast-pskip",
|
|
183
|
+
"partitions",
|
|
184
|
+
"direct",
|
|
228
185
|
)
|
|
229
186
|
|
|
187
|
+
|
|
188
|
+
_DEFAULT_X265_PARAMS: Final[dict[LiteralString, LiteralString]] = {
|
|
189
|
+
"crf": "20",
|
|
190
|
+
"qpmin": "6",
|
|
191
|
+
"qpmax": "32",
|
|
192
|
+
"rd": "3",
|
|
193
|
+
"psy-rd": "2",
|
|
194
|
+
"rdoq-level": "0",
|
|
195
|
+
"psy-rdoq": "0",
|
|
196
|
+
"qcomp": "0.68",
|
|
197
|
+
"keyint": "250",
|
|
198
|
+
"min-keyint": "2",
|
|
199
|
+
"deblock": "0,0",
|
|
200
|
+
"me": "umh",
|
|
201
|
+
"merange": "57",
|
|
202
|
+
"hme": "1",
|
|
203
|
+
"hme-search": "hex,hex,hex",
|
|
204
|
+
"hme-range": "16,57,92",
|
|
205
|
+
"aq-mode": "2",
|
|
206
|
+
"aq-strength": "1",
|
|
207
|
+
"tu-intra-depth": "1",
|
|
208
|
+
"tu-inter-depth": "1",
|
|
209
|
+
"limit-tu": "0",
|
|
210
|
+
"bframes": "16",
|
|
211
|
+
"ref": "8",
|
|
212
|
+
"subme": "2",
|
|
213
|
+
"open-gop": "1",
|
|
214
|
+
"gop-lookahead": "0",
|
|
215
|
+
"rc-lookahead": "20",
|
|
216
|
+
"rect": "0",
|
|
217
|
+
"amp": "0",
|
|
218
|
+
"cbqpoffs": "0",
|
|
219
|
+
"crqpoffs": "0",
|
|
220
|
+
"ipratio": "1.4",
|
|
221
|
+
"pbratio": "1.3",
|
|
222
|
+
"early-skip": "1",
|
|
223
|
+
"ctu": "64",
|
|
224
|
+
"min-cu-size": "8",
|
|
225
|
+
"max-tu-size": "32",
|
|
226
|
+
"level-idc": "0",
|
|
227
|
+
"sao": "0",
|
|
228
|
+
"weightb": "1",
|
|
229
|
+
"info": "1",
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
PRESET_OPT_NAME: Final[dict[Preset_name, tuple[LiteralString, ...]]] = {
|
|
234
|
+
Preset_name.x264: X264_PARAMS_NAME,
|
|
235
|
+
Preset_name.x264fast: X264_PARAMS_NAME,
|
|
236
|
+
Preset_name.x264slow: X264_PARAMS_NAME,
|
|
237
|
+
Preset_name.x265: X265_PARAMS_NAME,
|
|
238
|
+
Preset_name.x265fast4: X265_PARAMS_NAME,
|
|
239
|
+
Preset_name.x265fast3: X265_PARAMS_NAME,
|
|
240
|
+
Preset_name.x265fast2: X265_PARAMS_NAME,
|
|
241
|
+
Preset_name.x265fast: X265_PARAMS_NAME,
|
|
242
|
+
Preset_name.x265slow: X265_PARAMS_NAME,
|
|
243
|
+
Preset_name.x265full: X265_PARAMS_NAME,
|
|
244
|
+
}
|
|
230
245
|
DEFAULT_PRESET_PARAMS: Final[dict[Preset_name, dict[LiteralString, LiteralString]]] = {
|
|
231
246
|
Preset_name.x264fast: {
|
|
232
247
|
"threads": "auto",
|
|
@@ -248,6 +263,8 @@ DEFAULT_PRESET_PARAMS: Final[dict[Preset_name, dict[LiteralString, LiteralString
|
|
|
248
263
|
"trellis": "1",
|
|
249
264
|
"fast-pskip": "1",
|
|
250
265
|
"weightb": "1",
|
|
266
|
+
"partitions": "all",
|
|
267
|
+
"direct": "auto",
|
|
251
268
|
},
|
|
252
269
|
Preset_name.x264slow: {
|
|
253
270
|
"threads": "auto",
|
|
@@ -269,6 +286,8 @@ DEFAULT_PRESET_PARAMS: Final[dict[Preset_name, dict[LiteralString, LiteralString
|
|
|
269
286
|
"trellis": "2",
|
|
270
287
|
"fast-pskip": "0",
|
|
271
288
|
"weightb": "1",
|
|
289
|
+
"partitions": "all",
|
|
290
|
+
"direct": "auto",
|
|
272
291
|
},
|
|
273
292
|
Preset_name.x265fast4: _DEFAULT_X265_PARAMS
|
|
274
293
|
| dict[LiteralString, LiteralString](
|
|
@@ -448,6 +467,7 @@ DEFAULT_PRESET_PARAMS: Final[dict[Preset_name, dict[LiteralString, LiteralString
|
|
|
448
467
|
),
|
|
449
468
|
}
|
|
450
469
|
|
|
470
|
+
|
|
451
471
|
SUBTITLE_SUFFIX_SET: Final[set[LiteralString]] = {
|
|
452
472
|
".srt",
|
|
453
473
|
".ass",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
easyrip/__init__.py,sha256=PIvSPDgswsIkWL4dsCe87knnxKmtvcrWYzmqAwZix_M,765
|
|
2
2
|
easyrip/__main__.py,sha256=5t5NjuTSFW6jDp_HH4rTX8EOlf-GJI5HuTSwwndkw_I,4557
|
|
3
|
-
easyrip/easyrip_command.py,sha256=
|
|
3
|
+
easyrip/easyrip_command.py,sha256=X9_8t9Sxl1-gILpsQ5PueCwozTQgjgL2cImzOZ6pO7w,27837
|
|
4
4
|
easyrip/easyrip_log.py,sha256=i5r3OPGQ55c3_zCN0fmriPXiWxibq-w35FbNT7VfuuM,15610
|
|
5
|
-
easyrip/easyrip_main.py,sha256=
|
|
5
|
+
easyrip/easyrip_main.py,sha256=rP67eBcIBMVX8kXHQMWUhQsy-aXsnon4TbOzshx00nw,44691
|
|
6
6
|
easyrip/easyrip_prompt.py,sha256=A5S7ybeJSGFkCmwdJ9TCQ_-lde7NWgkbFytZ2KnvkWI,2145
|
|
7
|
-
easyrip/global_val.py,sha256=
|
|
7
|
+
easyrip/global_val.py,sha256=zKSrQg0Sata9X6CcHpcGK5dhAhuYCPXpIn2yYBrXGAU,773
|
|
8
8
|
easyrip/utils.py,sha256=N1rMF1MyoC-YFBgy10_u29cFoowfhR-5Viea93O7wQ4,8750
|
|
9
9
|
easyrip/easyrip_config/config.py,sha256=aj6Vg1rJkvICSTZ0ZONznR_MkvVr5u5ngkX_zfZopvU,9859
|
|
10
10
|
easyrip/easyrip_config/config_key.py,sha256=_jjdKOunskUoG7UUWOz3QZK-s4LF_x6hmM9MKttyS2Q,766
|
|
@@ -15,17 +15,17 @@ easyrip/easyrip_mlang/lang_zh_Hans_CN.py,sha256=zJ9z5dW8yZdg6VWUMw3e7VNFjn_NoMhk
|
|
|
15
15
|
easyrip/easyrip_mlang/translator.py,sha256=Vg0S0p2rpMNAy3LHTdK7qKFdkPEXlOoCCXcaH7PyAC4,5939
|
|
16
16
|
easyrip/easyrip_web/__init__.py,sha256=tMyEeaSGeEJjND7MF0MBv9aDiDgaO3MOnppwxA70U2c,177
|
|
17
17
|
easyrip/easyrip_web/http_server.py,sha256=iyulCAFQrJlz86Lrr-Dm3fhOnNCf79Bp6fVHhr0ephY,8350
|
|
18
|
-
easyrip/easyrip_web/third_party_api.py,sha256=
|
|
18
|
+
easyrip/easyrip_web/third_party_api.py,sha256=GhP6LmR1sVMeLLbnj82r-QYjoUdSnyaU9xp0LRnRLsw,4623
|
|
19
19
|
easyrip/ripper/media_info.py,sha256=mQq_vbQ7S9fWpb39HLkoZlAL-pqNfwxewv6X776Nf50,5078
|
|
20
|
-
easyrip/ripper/param.py,sha256=
|
|
20
|
+
easyrip/ripper/param.py,sha256=y1n2XaW55TJQ_r858pB4kYZVgT6TRpmS5vv9iMEIESc,11736
|
|
21
21
|
easyrip/ripper/ripper.py,sha256=k00oHGk9X3ciJ8KzHa_jaHlTy5EXfdnJy9u0iSL3ia8,50343
|
|
22
22
|
easyrip/ripper/sub_and_font/__init__.py,sha256=cBT7mxL7RRFaJXFPXuZ7RT-YK6FbnanaU5v6U9BOquw,153
|
|
23
23
|
easyrip/ripper/sub_and_font/ass.py,sha256=eGi1eIDWAV1Ti_BYIAcAMwrAlXJ5f_zGYte3nNu4PeE,25532
|
|
24
24
|
easyrip/ripper/sub_and_font/font.py,sha256=DBtTi32deXES1ylZiZ0qzcv9zvRQRIYBAH9Zbwij3G0,8086
|
|
25
25
|
easyrip/ripper/sub_and_font/subset.py,sha256=VsFYTFuVWXW9ltkqWZIiwOIh-nGDKmW1tUv3oi5kpWw,17815
|
|
26
|
-
easyrip-4.
|
|
27
|
-
easyrip-4.
|
|
28
|
-
easyrip-4.
|
|
29
|
-
easyrip-4.
|
|
30
|
-
easyrip-4.
|
|
31
|
-
easyrip-4.
|
|
26
|
+
easyrip-4.8.1.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
27
|
+
easyrip-4.8.1.dist-info/METADATA,sha256=dh80xbE407kcu4GVmpWgs6JAqXVLgJDNSA_NyC48BGE,3506
|
|
28
|
+
easyrip-4.8.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
easyrip-4.8.1.dist-info/entry_points.txt,sha256=D6GBMMTzZ-apgX76KyZ6jxMmIFqGYwU9neeLLni_qKI,49
|
|
30
|
+
easyrip-4.8.1.dist-info/top_level.txt,sha256=kuEteBXm-Gf90jRQgH3-fTo-Z-Q6czSuUEqY158H4Ww,8
|
|
31
|
+
easyrip-4.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|