auto-editor 23.38.1__py3-none-any.whl → 23.40.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.
- auto_editor/__init__.py +2 -2
- auto_editor/analyze.py +19 -23
- auto_editor/help.py +10 -10
- auto_editor/lang/palet.py +203 -187
- auto_editor/lib/contracts.py +67 -30
- auto_editor/lib/data_structs.py +46 -9
- auto_editor/make_layers.py +24 -15
- auto_editor/subcommands/repl.py +4 -3
- auto_editor/timeline.py +16 -16
- {auto_editor-23.38.1.dist-info → auto_editor-23.40.1.dist-info}/METADATA +33 -8
- {auto_editor-23.38.1.dist-info → auto_editor-23.40.1.dist-info}/RECORD +16 -16
- {auto_editor-23.38.1.dist-info → auto_editor-23.40.1.dist-info}/LICENSE +0 -0
- {auto_editor-23.38.1.dist-info → auto_editor-23.40.1.dist-info}/WHEEL +0 -0
- {auto_editor-23.38.1.dist-info → auto_editor-23.40.1.dist-info}/entry_points.txt +0 -0
- {auto_editor-23.38.1.dist-info → auto_editor-23.40.1.dist-info}/top_level.txt +0 -0
- {auto_editor-23.38.1.dist-info → auto_editor-23.40.1.dist-info}/zip-safe +0 -0
auto_editor/__init__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
__version__ = "23.
|
2
|
-
version = "
|
1
|
+
__version__ = "23.40.1"
|
2
|
+
version = "23w40a"
|
auto_editor/analyze.py
CHANGED
@@ -12,9 +12,9 @@ from auto_editor.lang.json import Lexer, Parser, dump
|
|
12
12
|
from auto_editor.lib.contracts import (
|
13
13
|
is_bool,
|
14
14
|
is_nat,
|
15
|
+
is_nat1,
|
15
16
|
is_str,
|
16
17
|
is_threshold,
|
17
|
-
is_uint,
|
18
18
|
is_void,
|
19
19
|
orc,
|
20
20
|
)
|
@@ -46,28 +46,28 @@ if TYPE_CHECKING:
|
|
46
46
|
audio_builder = pAttrs(
|
47
47
|
"audio",
|
48
48
|
pAttr("threshold", 0.04, is_threshold),
|
49
|
-
pAttr("stream", 0, orc(
|
50
|
-
pAttr("mincut", 6,
|
51
|
-
pAttr("minclip", 3,
|
49
|
+
pAttr("stream", 0, orc(is_nat, Sym("all"), "all")),
|
50
|
+
pAttr("mincut", 6, is_nat),
|
51
|
+
pAttr("minclip", 3, is_nat),
|
52
52
|
)
|
53
53
|
motion_builder = pAttrs(
|
54
54
|
"motion",
|
55
55
|
pAttr("threshold", 0.02, is_threshold),
|
56
|
-
pAttr("stream", 0,
|
57
|
-
pAttr("blur", 9,
|
58
|
-
pAttr("width", 400,
|
56
|
+
pAttr("stream", 0, is_nat),
|
57
|
+
pAttr("blur", 9, is_nat),
|
58
|
+
pAttr("width", 400, is_nat1),
|
59
59
|
)
|
60
60
|
pixeldiff_builder = pAttrs(
|
61
61
|
"pixeldiff",
|
62
|
-
pAttr("threshold", 1,
|
63
|
-
pAttr("stream", 0,
|
62
|
+
pAttr("threshold", 1, is_nat),
|
63
|
+
pAttr("stream", 0, is_nat),
|
64
64
|
)
|
65
65
|
subtitle_builder = pAttrs(
|
66
66
|
"subtitle",
|
67
67
|
pAttr("pattern", Required, is_str),
|
68
|
-
pAttr("stream", 0,
|
68
|
+
pAttr("stream", 0, is_nat),
|
69
69
|
pAttr("ignore-case", False, is_bool),
|
70
|
-
pAttr("max-count", None, orc(
|
70
|
+
pAttr("max-count", None, orc(is_nat, is_void)),
|
71
71
|
)
|
72
72
|
|
73
73
|
builder_map = {
|
@@ -149,16 +149,14 @@ def obj_tag(tag: str, tb: Fraction, obj: dict[str, Any]) -> str:
|
|
149
149
|
return key
|
150
150
|
|
151
151
|
|
152
|
+
@dataclass
|
152
153
|
class Levels:
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
self.bar = bar
|
160
|
-
self.temp = temp
|
161
|
-
self.log = log
|
154
|
+
ensure: Ensure
|
155
|
+
src: FileInfo
|
156
|
+
tb: Fraction
|
157
|
+
bar: Bar
|
158
|
+
temp: str
|
159
|
+
log: Log
|
162
160
|
|
163
161
|
@property
|
164
162
|
def media_length(self) -> int:
|
@@ -167,9 +165,7 @@ class Levels:
|
|
167
165
|
return len(arr)
|
168
166
|
|
169
167
|
sr, samples = read(
|
170
|
-
self.ensure.audio(
|
171
|
-
f"{self.src.path.resolve()}", self.src.label, stream=0
|
172
|
-
)
|
168
|
+
self.ensure.audio(f"{self.src.path.resolve()}", self.src.label, 0)
|
173
169
|
)
|
174
170
|
samp_count = len(samples)
|
175
171
|
del samples
|
auto_editor/help.py
CHANGED
@@ -31,28 +31,28 @@ editing.
|
|
31
31
|
Editing Methods:
|
32
32
|
- audio ; Audio silence/loudness detection
|
33
33
|
- threshold threshold? : 4%
|
34
|
-
- stream (or/c
|
35
|
-
- mincut
|
36
|
-
- minclip
|
34
|
+
- stream (or/c nat? 'all "all") : 0
|
35
|
+
- mincut nat? : 6
|
36
|
+
- minclip nat? : 3
|
37
37
|
|
38
38
|
- motion ; Motion detection specialized for noisy real-life videos
|
39
39
|
- threshold threshold? : 2%
|
40
|
-
- stream
|
41
|
-
- blur
|
42
|
-
- width
|
40
|
+
- stream nat? : 0
|
41
|
+
- blur nat? : 9
|
42
|
+
- width nat1? : 400
|
43
43
|
|
44
44
|
- none ; Do not modify the media in anyway; mark all sections as "loud" (1).
|
45
45
|
- all/e ; Cut out everything out; mark all sections as "silent" (0).
|
46
46
|
|
47
47
|
- pixeldiff ; Detect when a certain amount of pixels have changed between frames.
|
48
|
-
- threshold
|
49
|
-
- stream
|
48
|
+
- threshold nat? : 1
|
49
|
+
- stream nat? : 0
|
50
50
|
|
51
51
|
- subtitle ; Detect when subtitle matches pattern as a RegEx string.
|
52
52
|
- pattern string?
|
53
|
-
- stream
|
53
|
+
- stream nat? : 0
|
54
54
|
- ignore-case bool? : #f
|
55
|
-
- max-count (or/c
|
55
|
+
- max-count (or/c nat? void?) : (void)
|
56
56
|
|
57
57
|
Command-line Examples:
|
58
58
|
--edit audio
|