typed-ffmpeg-compatible 3.3__py3-none-any.whl → 3.3.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.
- typed_ffmpeg/__init__.py +2 -1
- typed_ffmpeg/_version.py +2 -2
- typed_ffmpeg/base.py +5 -4
- typed_ffmpeg/compile/compile_cli.py +2 -0
- typed_ffmpeg/streams/__init__.py +2 -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.3.1.dist-info}/METADATA +1 -1
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.3.1.dist-info}/RECORD +13 -13
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.3.1.dist-info}/WHEEL +0 -0
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.3.1.dist-info}/entry_points.txt +0 -0
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.3.1.dist-info}/licenses/LICENSE +0 -0
- {typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.3.1.dist-info}/top_level.txt +0 -0
typed_ffmpeg/__init__.py
CHANGED
@@ -28,7 +28,7 @@ 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
34
|
"sources",
|
@@ -46,6 +46,7 @@ __all__ = [
|
|
46
46
|
"AudioStream",
|
47
47
|
"VideoStream",
|
48
48
|
"AVStream",
|
49
|
+
"SubtitleStream",
|
49
50
|
"vfilter",
|
50
51
|
"afilter",
|
51
52
|
"filter_multi_output",
|
typed_ffmpeg/_version.py
CHANGED
typed_ffmpeg/base.py
CHANGED
@@ -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
|
|
@@ -682,6 +682,8 @@ def get_stream_label(stream: Stream, context: DAGContext | None = None) -> str:
|
|
682
682
|
if len(stream.node.output_typings) > 1:
|
683
683
|
return f"{get_node_label(stream.node, context)}#{stream.index}"
|
684
684
|
return f"{get_node_label(stream.node, context)}"
|
685
|
+
case OutputNode():
|
686
|
+
return f"{get_node_label(stream.node, context)}"
|
685
687
|
case _:
|
686
688
|
raise FFMpegValueError(
|
687
689
|
f"Unknown node type: {stream.node.__class__.__name__}"
|
typed_ffmpeg/streams/__init__.py
CHANGED
typed_ffmpeg/utils/snapshot.py
CHANGED
@@ -21,7 +21,7 @@ from syrupy.types import (
|
|
21
21
|
from ..dag.schema import Stream
|
22
22
|
|
23
23
|
|
24
|
-
class
|
24
|
+
class DAGSnapshotExtension(JSONSnapshotExtension):
|
25
25
|
"""
|
26
26
|
A snapshot extension for serializing and testing FFmpeg DAG structures.
|
27
27
|
|
typed_ffmpeg/utils/view.py
CHANGED
@@ -10,6 +10,7 @@ from __future__ import annotations
|
|
10
10
|
|
11
11
|
from typing import Literal
|
12
12
|
|
13
|
+
from ..compile.compile_cli import get_args, get_stream_label
|
13
14
|
from ..compile.context import DAGContext
|
14
15
|
from ..dag.nodes import FilterNode, InputNode, OutputNode
|
15
16
|
from ..dag.schema import Node
|
@@ -92,7 +93,7 @@ def view(node: Node, format: Literal["png", "svg", "dot"]) -> str:
|
|
92
93
|
color = _get_node_color(node)
|
93
94
|
graph.node(
|
94
95
|
name=node.hex,
|
95
|
-
label=
|
96
|
+
label=" ".join(get_args(node, context)),
|
96
97
|
shape="box",
|
97
98
|
style="filled",
|
98
99
|
fillcolor=color,
|
@@ -105,7 +106,7 @@ def view(node: Node, format: Literal["png", "svg", "dot"]) -> str:
|
|
105
106
|
graph.edge(
|
106
107
|
stream.node.hex,
|
107
108
|
node.hex,
|
108
|
-
label=f"{
|
109
|
+
label=f"{get_stream_label(stream, context)} -> {idx}",
|
109
110
|
)
|
110
111
|
|
111
112
|
return graph.render(engine="dot")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: typed-ffmpeg-compatible
|
3
|
-
Version: 3.3
|
3
|
+
Version: 3.3.1
|
4
4
|
Summary: Modern Python FFmpeg wrappers offer comprehensive support for complex filters, complete with detailed typing and documentation.
|
5
5
|
Author-email: lucemia <lucemia@gmail.com>
|
6
6
|
License-Expression: MIT
|
@@ -1,6 +1,6 @@
|
|
1
|
-
typed_ffmpeg/__init__.py,sha256=
|
2
|
-
typed_ffmpeg/_version.py,sha256=
|
3
|
-
typed_ffmpeg/base.py,sha256=
|
1
|
+
typed_ffmpeg/__init__.py,sha256=yixdEj2DRDUwCVipkVMaPGNo-DjIA_6ZSZrYQTxkUQY,1630
|
2
|
+
typed_ffmpeg/_version.py,sha256=DGQPU6_vrM6PfHseD1DbTrLzSemTnUX5siYWgZbIrdI,511
|
3
|
+
typed_ffmpeg/base.py,sha256=oNL_ZCYiweYoKOm2Kh-OePvIfVOlpQ4cDF8_aLNTz98,6309
|
4
4
|
typed_ffmpeg/exceptions.py,sha256=D4SID6WOwkjVV8O8mAjrEDHWn-8BRDnK_jteaDof1SY,2474
|
5
5
|
typed_ffmpeg/filters.py,sha256=_lBpGZgPHK3KgGVrw-TCdQEsBRuEXVIgwggYNGd80MU,110076
|
6
6
|
typed_ffmpeg/info.py,sha256=0KCzf8hJaI6ObPRT0uftLa96RlYvaQmoEq1sqFJSc24,9521
|
@@ -13,7 +13,7 @@ typed_ffmpeg/common/cache.py,sha256=j0JvfX7jewLpdJWxgo7Pwze0BkUJdYGHX2uGR8BZ-9M,
|
|
13
13
|
typed_ffmpeg/common/schema.py,sha256=qM8yfMX9UU3EAQSNsTrr-SAmyqKx8eQCXTtu3RJWkEk,19673
|
14
14
|
typed_ffmpeg/common/serialize.py,sha256=dLim0DBP5CdJ1JiMV9xEmmh1XMSIhBOWs61EopAL15s,7719
|
15
15
|
typed_ffmpeg/compile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
typed_ffmpeg/compile/compile_cli.py,sha256=
|
16
|
+
typed_ffmpeg/compile/compile_cli.py,sha256=FyFcFN2qgpi57M3fERzXlSdEs4Z7XwD0zKicXbl7_4M,32980
|
17
17
|
typed_ffmpeg/compile/compile_json.py,sha256=YCiTyfAnUVSbFr7BiQpmJYs13K5sa-xo77Iih33mb6I,992
|
18
18
|
typed_ffmpeg/compile/compile_python.py,sha256=YnnRRHE8TEUiqFF9DsqkYOwIcA2ejCYw12k-O5n825A,11506
|
19
19
|
typed_ffmpeg/compile/context.py,sha256=macQ3HhEJ73j_WbWYtU9GCQCzcB_KQGAPimcuU-WOac,10946
|
@@ -35,7 +35,7 @@ typed_ffmpeg/ffprobe/parse.py,sha256=fq1cGFkUpUdvyVi3S-TAQ7qn-tXUdae6ADhymZt7-t4
|
|
35
35
|
typed_ffmpeg/ffprobe/probe.py,sha256=D_opsKp3OgT2HSBzhxgY1b9SIqXpDhz3xh_k9HUGux0,10367
|
36
36
|
typed_ffmpeg/ffprobe/schema.py,sha256=PBgBWYGO8wKnI0Lae9oCJ1Nprhv2ciPkdLrumzPVllY,13631
|
37
37
|
typed_ffmpeg/ffprobe/xml2json.py,sha256=1TSuxR7SYc-M_-JmE-1khHGbXCapgW0Oap9kzL0nwNg,2455
|
38
|
-
typed_ffmpeg/streams/__init__.py,sha256=
|
38
|
+
typed_ffmpeg/streams/__init__.py,sha256=32kiqBVigKH2EqS3cA6EfXCW8KpVdQNWSStAmQ0MktM,196
|
39
39
|
typed_ffmpeg/streams/audio.py,sha256=2oNRhb5UetWtlPG3NW73AjUZoFPl303yMv-6W1sGWt0,259054
|
40
40
|
typed_ffmpeg/streams/av.py,sha256=qrsO692BG6OVMWVwIeuCKPntBGTR685lc2ULbGPTSkQ,2594
|
41
41
|
typed_ffmpeg/streams/channel_layout.py,sha256=hGagaoc1tnWS8K1yiITp4f_92qq5e7C_zB15bHOL0DI,1162
|
@@ -45,15 +45,15 @@ typed_ffmpeg/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
45
45
|
typed_ffmpeg/utils/escaping.py,sha256=m6CTEBwWZTFdtZHTHW-3pQCgkpdZb9f9ynoO-gsD7uM,2937
|
46
46
|
typed_ffmpeg/utils/forzendict.py,sha256=9QWdPQA2AbSfiC9-mrq1YeZFl1qN--zw8WlsqQ2ulCk,3114
|
47
47
|
typed_ffmpeg/utils/run.py,sha256=mSoAdcvD-InldqkRgWNc8iXKgJJoEMAOE4PL2gVmtqw,2178
|
48
|
-
typed_ffmpeg/utils/snapshot.py,sha256=
|
48
|
+
typed_ffmpeg/utils/snapshot.py,sha256=SHdfM1OXxR0cReNs4snDdAASjW45unz2KjF_6jMwq7c,2180
|
49
49
|
typed_ffmpeg/utils/typing.py,sha256=DBQn_gCF8C_DTwsfMHeCgfnNUROwAjlIcHrQ7lNDOoE,1187
|
50
|
-
typed_ffmpeg/utils/view.py,sha256=
|
50
|
+
typed_ffmpeg/utils/view.py,sha256=jiCKJnx-KVJh-uvhkADBQNlWH1uHPqyYgmSZ_iSEj0c,3484
|
51
51
|
typed_ffmpeg/utils/lazy_eval/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
52
|
typed_ffmpeg/utils/lazy_eval/operator.py,sha256=QWybd-UH3VdDa8kgWkqAMi3WV0b0WF1d1JixQr6is2E,4136
|
53
53
|
typed_ffmpeg/utils/lazy_eval/schema.py,sha256=WSg-E3MS3itN1AT6Dq4Z9btnRHEReuN3o6zruXou7h4,9623
|
54
|
-
typed_ffmpeg_compatible-3.3.dist-info/licenses/LICENSE,sha256=8Aaya5i_09Cou2i3QMxTwz6uHGzi_fGA4uhkco07-A4,1066
|
55
|
-
typed_ffmpeg_compatible-3.3.dist-info/METADATA,sha256=
|
56
|
-
typed_ffmpeg_compatible-3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
57
|
-
typed_ffmpeg_compatible-3.3.dist-info/entry_points.txt,sha256=kUQvZ27paV-07qtkIFV-emKsYtjFOTw9kknBRSXPs04,45
|
58
|
-
typed_ffmpeg_compatible-3.3.dist-info/top_level.txt,sha256=vuASJGVRQiNmhWY1pt0RXESWSNkknWXqWLIRAU7H_L4,13
|
59
|
-
typed_ffmpeg_compatible-3.3.dist-info/RECORD,,
|
54
|
+
typed_ffmpeg_compatible-3.3.1.dist-info/licenses/LICENSE,sha256=8Aaya5i_09Cou2i3QMxTwz6uHGzi_fGA4uhkco07-A4,1066
|
55
|
+
typed_ffmpeg_compatible-3.3.1.dist-info/METADATA,sha256=5ZtyLl8XCPa1W-B6XCCjyosTQMJotk5LWqy1WiixwYg,8385
|
56
|
+
typed_ffmpeg_compatible-3.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
57
|
+
typed_ffmpeg_compatible-3.3.1.dist-info/entry_points.txt,sha256=kUQvZ27paV-07qtkIFV-emKsYtjFOTw9kknBRSXPs04,45
|
58
|
+
typed_ffmpeg_compatible-3.3.1.dist-info/top_level.txt,sha256=vuASJGVRQiNmhWY1pt0RXESWSNkknWXqWLIRAU7H_L4,13
|
59
|
+
typed_ffmpeg_compatible-3.3.1.dist-info/RECORD,,
|
File without changes
|
{typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.3.1.dist-info}/entry_points.txt
RENAMED
File without changes
|
{typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.3.1.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
{typed_ffmpeg_compatible-3.3.dist-info → typed_ffmpeg_compatible-3.3.1.dist-info}/top_level.txt
RENAMED
File without changes
|