typed-ffmpeg-compatible 3.3__py3-none-any.whl → 3.4__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.
- typed_ffmpeg/__init__.py +4 -2
- typed_ffmpeg/_version.py +2 -2
- typed_ffmpeg/base.py +6 -5
- typed_ffmpeg/codecs/__init__.py +3 -0
- typed_ffmpeg/codecs/decoders.py +6644 -0
- typed_ffmpeg/codecs/encoders.py +6435 -0
- typed_ffmpeg/codecs/schema.py +17 -0
- typed_ffmpeg/common/serialize.py +1 -1
- typed_ffmpeg/compile/compile_cli.py +2 -0
- typed_ffmpeg/dag/global_runnable/global_args.py +59 -55
- typed_ffmpeg/dag/io/_input.py +72 -64
- typed_ffmpeg/dag/io/_output.py +114 -105
- typed_ffmpeg/dag/io/output_args.py +118 -104
- typed_ffmpeg/dag/nodes.py +1 -1
- typed_ffmpeg/dag/schema.py +1 -1
- typed_ffmpeg/filters.py +1717 -675
- typed_ffmpeg/sources.py +1641 -571
- typed_ffmpeg/streams/__init__.py +2 -1
- typed_ffmpeg/streams/audio.py +1994 -1554
- typed_ffmpeg/streams/video.py +4540 -2843
- typed_ffmpeg/utils/{forzendict.py → frozendict.py} +56 -1
- typed_ffmpeg/utils/run.py +1 -1
- typed_ffmpeg/utils/snapshot.py +1 -1
- typed_ffmpeg/utils/view.py +3 -2
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.4.dist-info}/METADATA +1 -1
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.4.dist-info}/RECORD +30 -26
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.4.dist-info}/WHEEL +0 -0
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.4.dist-info}/entry_points.txt +0 -0
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.4.dist-info}/licenses/LICENSE +0 -0
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.4.dist-info}/top_level.txt +0 -0
typed_ffmpeg/__init__.py
CHANGED
@@ -22,15 +22,16 @@ Example:
|
|
22
22
|
```
|
23
23
|
"""
|
24
24
|
|
25
|
-
from . import compile, dag, filters, sources
|
25
|
+
from . import codecs, compile, dag, filters, sources
|
26
26
|
from .base import afilter, filter_multi_output, input, merge_outputs, output, vfilter
|
27
27
|
from .dag import Stream
|
28
28
|
from .exceptions import FFMpegExecuteError, FFMpegTypeError, FFMpegValueError
|
29
29
|
from .ffprobe.probe import probe, probe_obj
|
30
30
|
from .info import get_codecs, get_decoders, get_encoders
|
31
|
-
from .streams import AudioStream, AVStream, VideoStream
|
31
|
+
from .streams import AudioStream, AVStream, SubtitleStream, VideoStream
|
32
32
|
|
33
33
|
__all__ = [
|
34
|
+
"codecs",
|
34
35
|
"sources",
|
35
36
|
"filters",
|
36
37
|
"input",
|
@@ -46,6 +47,7 @@ __all__ = [
|
|
46
47
|
"AudioStream",
|
47
48
|
"VideoStream",
|
48
49
|
"AVStream",
|
50
|
+
"SubtitleStream",
|
49
51
|
"vfilter",
|
50
52
|
"afilter",
|
51
53
|
"filter_multi_output",
|
typed_ffmpeg/_version.py
CHANGED
typed_ffmpeg/base.py
CHANGED
@@ -21,7 +21,7 @@ from .dag.nodes import (
|
|
21
21
|
from .schema import StreamType
|
22
22
|
from .streams.audio import AudioStream
|
23
23
|
from .streams.video import VideoStream
|
24
|
-
from .utils.
|
24
|
+
from .utils.frozendict import FrozenDict
|
25
25
|
|
26
26
|
|
27
27
|
def merge_outputs(*streams: OutputStream) -> GlobalStream:
|
@@ -137,7 +137,7 @@ def filter_multi_output(
|
|
137
137
|
*streams: FilterableStream,
|
138
138
|
name: str,
|
139
139
|
input_typings: tuple[StreamType, ...] = (),
|
140
|
-
|
140
|
+
output_typings: tuple[StreamType, ...] = (),
|
141
141
|
**kwargs: Any,
|
142
142
|
) -> FilterNode:
|
143
143
|
"""
|
@@ -151,7 +151,7 @@ def filter_multi_output(
|
|
151
151
|
*streams: One or more input streams to apply the filter to
|
152
152
|
name: The FFmpeg filter name (e.g., 'split', 'channelsplit', etc.)
|
153
153
|
input_typings: The expected types of the input streams
|
154
|
-
|
154
|
+
output_typings: The expected types of each output stream
|
155
155
|
**kwargs: Filter-specific parameters as keyword arguments
|
156
156
|
|
157
157
|
Returns:
|
@@ -162,7 +162,7 @@ def filter_multi_output(
|
|
162
162
|
```python
|
163
163
|
# Split a video into two identical streams
|
164
164
|
split_node = ffmpeg.filter_multi_output(
|
165
|
-
stream, name="split",
|
165
|
+
stream, name="split", output_typings=(StreamType.video, StreamType.video)
|
166
166
|
)
|
167
167
|
stream1 = split_node.video(0)
|
168
168
|
stream2 = split_node.video(1)
|
@@ -172,12 +172,13 @@ def filter_multi_output(
|
|
172
172
|
This function is for custom filters not implemented in typed-ffmpeg.
|
173
173
|
Use the built-in filters from the filters module when available.
|
174
174
|
"""
|
175
|
+
|
175
176
|
return FilterNode(
|
176
177
|
name=name,
|
177
178
|
kwargs=FrozenDict(kwargs),
|
178
179
|
inputs=streams,
|
179
180
|
input_typings=input_typings,
|
180
|
-
output_typings=
|
181
|
+
output_typings=output_typings,
|
181
182
|
)
|
182
183
|
|
183
184
|
|