auto-editor 23.38.1__tar.gz → 23.40.1__tar.gz
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-23.38.1 → auto-editor-23.40.1}/PKG-INFO +32 -7
- {auto-editor-23.38.1 → auto-editor-23.40.1}/README.md +30 -6
- auto-editor-23.40.1/auto_editor/__init__.py +2 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/analyze.py +19 -23
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/help.py +10 -10
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/lang/palet.py +203 -187
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/lib/contracts.py +67 -30
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/lib/data_structs.py +46 -9
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/make_layers.py +24 -15
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/subcommands/repl.py +4 -3
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/timeline.py +16 -16
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor.egg-info/PKG-INFO +32 -7
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor.egg-info/requires.txt +1 -1
- {auto-editor-23.38.1 → auto-editor-23.40.1}/setup.py +2 -1
- auto-editor-23.38.1/auto_editor/__init__.py +0 -2
- {auto-editor-23.38.1 → auto-editor-23.40.1}/LICENSE +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/__main__.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/edit.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/ffwrapper.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/formats/__init__.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/formats/fcp11.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/formats/fcp7.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/formats/json.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/formats/shotcut.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/formats/utils.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/lang/__init__.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/lang/json.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/lib/__init__.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/lib/err.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/output.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/preview.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/render/__init__.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/render/audio.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/render/image.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/render/subtitle.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/render/video.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/subcommands/__init__.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/subcommands/desc.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/subcommands/info.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/subcommands/levels.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/subcommands/palet.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/subcommands/subdump.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/subcommands/test.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/utils/__init__.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/utils/bar.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/utils/chunks.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/utils/cmdkw.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/utils/container.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/utils/encoder.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/utils/func.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/utils/log.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/utils/types.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/validate_input.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/vanparse.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor/wavfile.py +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor.egg-info/SOURCES.txt +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor.egg-info/dependency_links.txt +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor.egg-info/entry_points.txt +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor.egg-info/top_level.txt +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/auto_editor.egg-info/zip-safe +0 -0
- {auto-editor-23.38.1 → auto-editor-23.40.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: auto-editor
|
3
|
-
Version: 23.
|
3
|
+
Version: 23.40.1
|
4
4
|
Summary: Auto-Editor: Effort free video editing!
|
5
5
|
Home-page: https://auto-editor.com
|
6
6
|
Author: WyattBlue
|
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3
|
|
22
22
|
Classifier: Programming Language :: Python :: 3 :: Only
|
23
23
|
Classifier: Programming Language :: Python :: 3.10
|
24
24
|
Classifier: Programming Language :: Python :: 3.11
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
25
26
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
26
27
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
27
28
|
Requires-Python: >=3.10
|
@@ -125,22 +126,46 @@ Auto-Editor can also export to:
|
|
125
126
|
|
126
127
|
Other editors, like Sony Vegas, can understand the `premiere` format. If your favorite editor doesn't, you can use ` --export clip-sequence` which creates many video clips that can be imported and manipulated like normal.
|
127
128
|
|
129
|
+
### Naming Timelines
|
130
|
+
By default, auto-editor will name the timeline to "Auto-Editor Media Group" if the export supports naming.
|
131
|
+
|
132
|
+
```
|
133
|
+
auto-editor example.mp4 --export 'premiere:name="Your name here"'
|
134
|
+
|
135
|
+
auto-editor example.mp4 --export 'resolve:name="Your name here"'
|
136
|
+
|
137
|
+
auto-editor example.mp4 --export 'final-cut-pro:name="Your name here"'
|
138
|
+
|
139
|
+
# No other export options support naming
|
140
|
+
```
|
141
|
+
|
142
|
+
### Split by Clip
|
143
|
+
|
144
|
+
If you want to split the clips, but don't want auto-editor to do any more editing. There's a simple command.
|
145
|
+
```
|
146
|
+
auto-editor example.mp4 --silent-speed 1 --video-speed 1 --export premiere
|
147
|
+
```
|
148
|
+
|
128
149
|
<h2 align="center">Manual Editing</h2>
|
129
150
|
|
130
151
|
Use the `--cut-out` option to always remove a section.
|
131
152
|
|
132
153
|
```
|
133
154
|
# Cut out the first 30 seconds.
|
134
|
-
auto-editor example.mp4 --cut-out
|
155
|
+
auto-editor example.mp4 --cut-out 0,30sec
|
135
156
|
|
136
157
|
# Cut out the first 30 frames.
|
137
|
-
auto-editor example.mp4 --cut-out
|
158
|
+
auto-editor example.mp4 --cut-out 0,30
|
159
|
+
|
160
|
+
# Always leave in the first 30 seconds.
|
161
|
+
auto-editor example.mp4 --add-in 0,30sec
|
138
162
|
|
139
163
|
# Cut out the last 10 seconds.
|
140
164
|
auto-editor example.mp4 --cut-out -10sec,end
|
141
165
|
|
142
|
-
#
|
143
|
-
auto-editor example.mp4 --cut-out
|
166
|
+
# You can do multiple at once.
|
167
|
+
auto-editor example.mp4 --cut-out 0,10 15sec,20sec
|
168
|
+
auto-editor example.mp4 --add-in 30sec,40sec 120,150sec
|
144
169
|
```
|
145
170
|
|
146
171
|
And of course, you can use any `--edit` configuration.
|
@@ -149,10 +174,10 @@ If you don't want **any automatic cuts**, you can use `--edit none` or `--edit a
|
|
149
174
|
|
150
175
|
```
|
151
176
|
# Cut out the first 5 seconds, leave the rest untouched.
|
152
|
-
auto-editor example.mp4 --edit none --cut-out
|
177
|
+
auto-editor example.mp4 --edit none --cut-out 0,5sec
|
153
178
|
|
154
179
|
# Leave in the first 5 seconds, cut everything else out.
|
155
|
-
auto-editor example.mp4 --edit all/e --add-in
|
180
|
+
auto-editor example.mp4 --edit all/e --add-in 0,5sec
|
156
181
|
```
|
157
182
|
|
158
183
|
<h2 align="center">More Options</h2>
|
@@ -95,22 +95,46 @@ Auto-Editor can also export to:
|
|
95
95
|
|
96
96
|
Other editors, like Sony Vegas, can understand the `premiere` format. If your favorite editor doesn't, you can use ` --export clip-sequence` which creates many video clips that can be imported and manipulated like normal.
|
97
97
|
|
98
|
+
### Naming Timelines
|
99
|
+
By default, auto-editor will name the timeline to "Auto-Editor Media Group" if the export supports naming.
|
100
|
+
|
101
|
+
```
|
102
|
+
auto-editor example.mp4 --export 'premiere:name="Your name here"'
|
103
|
+
|
104
|
+
auto-editor example.mp4 --export 'resolve:name="Your name here"'
|
105
|
+
|
106
|
+
auto-editor example.mp4 --export 'final-cut-pro:name="Your name here"'
|
107
|
+
|
108
|
+
# No other export options support naming
|
109
|
+
```
|
110
|
+
|
111
|
+
### Split by Clip
|
112
|
+
|
113
|
+
If you want to split the clips, but don't want auto-editor to do any more editing. There's a simple command.
|
114
|
+
```
|
115
|
+
auto-editor example.mp4 --silent-speed 1 --video-speed 1 --export premiere
|
116
|
+
```
|
117
|
+
|
98
118
|
<h2 align="center">Manual Editing</h2>
|
99
119
|
|
100
120
|
Use the `--cut-out` option to always remove a section.
|
101
121
|
|
102
122
|
```
|
103
123
|
# Cut out the first 30 seconds.
|
104
|
-
auto-editor example.mp4 --cut-out
|
124
|
+
auto-editor example.mp4 --cut-out 0,30sec
|
105
125
|
|
106
126
|
# Cut out the first 30 frames.
|
107
|
-
auto-editor example.mp4 --cut-out
|
127
|
+
auto-editor example.mp4 --cut-out 0,30
|
128
|
+
|
129
|
+
# Always leave in the first 30 seconds.
|
130
|
+
auto-editor example.mp4 --add-in 0,30sec
|
108
131
|
|
109
132
|
# Cut out the last 10 seconds.
|
110
133
|
auto-editor example.mp4 --cut-out -10sec,end
|
111
134
|
|
112
|
-
#
|
113
|
-
auto-editor example.mp4 --cut-out
|
135
|
+
# You can do multiple at once.
|
136
|
+
auto-editor example.mp4 --cut-out 0,10 15sec,20sec
|
137
|
+
auto-editor example.mp4 --add-in 30sec,40sec 120,150sec
|
114
138
|
```
|
115
139
|
|
116
140
|
And of course, you can use any `--edit` configuration.
|
@@ -119,10 +143,10 @@ If you don't want **any automatic cuts**, you can use `--edit none` or `--edit a
|
|
119
143
|
|
120
144
|
```
|
121
145
|
# Cut out the first 5 seconds, leave the rest untouched.
|
122
|
-
auto-editor example.mp4 --edit none --cut-out
|
146
|
+
auto-editor example.mp4 --edit none --cut-out 0,5sec
|
123
147
|
|
124
148
|
# Leave in the first 5 seconds, cut everything else out.
|
125
|
-
auto-editor example.mp4 --edit all/e --add-in
|
149
|
+
auto-editor example.mp4 --edit all/e --add-in 0,5sec
|
126
150
|
```
|
127
151
|
|
128
152
|
<h2 align="center">More Options</h2>
|
@@ -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
|
@@ -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
|