typed-ffmpeg-compatible 3.6__py3-none-any.whl → 3.7.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/_version.py +16 -3
- typed_ffmpeg/common/serialize.py +1 -1
- typed_ffmpeg/dag/io/_output.py +1 -1
- typed_ffmpeg/dag/io/output_args.py +1 -2
- typed_ffmpeg/filters.py +58 -0
- typed_ffmpeg/sources.py +1 -1
- typed_ffmpeg/streams/video.py +379 -1
- {typed_ffmpeg_compatible-3.6.dist-info → typed_ffmpeg_compatible-3.7.1.dist-info}/METADATA +10 -1
- {typed_ffmpeg_compatible-3.6.dist-info → typed_ffmpeg_compatible-3.7.1.dist-info}/RECORD +13 -13
- {typed_ffmpeg_compatible-3.6.dist-info → typed_ffmpeg_compatible-3.7.1.dist-info}/WHEEL +0 -0
- {typed_ffmpeg_compatible-3.6.dist-info → typed_ffmpeg_compatible-3.7.1.dist-info}/entry_points.txt +0 -0
- {typed_ffmpeg_compatible-3.6.dist-info → typed_ffmpeg_compatible-3.7.1.dist-info}/licenses/LICENSE +0 -0
- {typed_ffmpeg_compatible-3.6.dist-info → typed_ffmpeg_compatible-3.7.1.dist-info}/top_level.txt +0 -0
typed_ffmpeg/_version.py
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
3
|
|
|
4
|
-
__all__ = [
|
|
4
|
+
__all__ = [
|
|
5
|
+
"__version__",
|
|
6
|
+
"__version_tuple__",
|
|
7
|
+
"version",
|
|
8
|
+
"version_tuple",
|
|
9
|
+
"__commit_id__",
|
|
10
|
+
"commit_id",
|
|
11
|
+
]
|
|
5
12
|
|
|
6
13
|
TYPE_CHECKING = False
|
|
7
14
|
if TYPE_CHECKING:
|
|
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
|
|
|
9
16
|
from typing import Union
|
|
10
17
|
|
|
11
18
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
+
COMMIT_ID = Union[str, None]
|
|
12
20
|
else:
|
|
13
21
|
VERSION_TUPLE = object
|
|
22
|
+
COMMIT_ID = object
|
|
14
23
|
|
|
15
24
|
version: str
|
|
16
25
|
__version__: str
|
|
17
26
|
__version_tuple__: VERSION_TUPLE
|
|
18
27
|
version_tuple: VERSION_TUPLE
|
|
28
|
+
commit_id: COMMIT_ID
|
|
29
|
+
__commit_id__: COMMIT_ID
|
|
19
30
|
|
|
20
|
-
__version__ = version = '3.
|
|
21
|
-
__version_tuple__ = version_tuple = (3,
|
|
31
|
+
__version__ = version = '3.7.1'
|
|
32
|
+
__version_tuple__ = version_tuple = (3, 7, 1)
|
|
33
|
+
|
|
34
|
+
__commit_id__ = commit_id = None
|
typed_ffmpeg/common/serialize.py
CHANGED
typed_ffmpeg/dag/io/_output.py
CHANGED
|
@@ -154,7 +154,7 @@ def output(
|
|
|
154
154
|
program: add program with specified streams
|
|
155
155
|
stream_group: add stream group with specified streams and group type-specific arguments
|
|
156
156
|
dframes: set the number of data frames to output
|
|
157
|
-
target: specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\" or \"dv50\
|
|
157
|
+
target: specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\" or \"dv50\" with optional prefixes \"pal-\", \"ntsc-\" or \"film-\")
|
|
158
158
|
shortest: finish encoding within shortest input
|
|
159
159
|
shortest_buf_duration: maximum buffering duration (in seconds) for the -shortest option
|
|
160
160
|
bitexact: bitexact mode
|
|
@@ -164,8 +164,7 @@ class OutputArgs(ABC):
|
|
|
164
164
|
program: add program with specified streams
|
|
165
165
|
stream_group: add stream group with specified streams and group type-specific arguments
|
|
166
166
|
dframes: set the number of data frames to output
|
|
167
|
-
target: specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\" or \"dv50\
|
|
168
|
-
"with optional prefixes \"pal-\", \"ntsc-\" or \"film-\")
|
|
167
|
+
target: specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\" or \"dv50\" with optional prefixes \"pal-\", \"ntsc-\" or \"film-\")
|
|
169
168
|
shortest: finish encoding within shortest input
|
|
170
169
|
shortest_buf_duration: maximum buffering duration (in seconds) for the -shortest option
|
|
171
170
|
bitexact: bitexact mode
|
typed_ffmpeg/filters.py
CHANGED
|
@@ -3289,6 +3289,64 @@ def overlay(
|
|
|
3289
3289
|
return filter_node.video(0)
|
|
3290
3290
|
|
|
3291
3291
|
|
|
3292
|
+
def overlay_cuda(
|
|
3293
|
+
_main: VideoStream,
|
|
3294
|
+
_overlay: VideoStream,
|
|
3295
|
+
*,
|
|
3296
|
+
x: String = Default("0"),
|
|
3297
|
+
y: String = Default("0"),
|
|
3298
|
+
eof_action: Int | Literal["repeat", "endall", "pass"] | Default = Default("repeat"),
|
|
3299
|
+
eval: Int | Literal["init", "frame"] | Default = Default("frame"),
|
|
3300
|
+
shortest: Boolean = Default("false"),
|
|
3301
|
+
repeatlast: Boolean = Default("true"),
|
|
3302
|
+
framesync_options: FFMpegFrameSyncOption | None = None,
|
|
3303
|
+
extra_options: dict[str, Any] | None = None,
|
|
3304
|
+
) -> VideoStream:
|
|
3305
|
+
"""
|
|
3306
|
+
|
|
3307
|
+
Overlay one video on top of another using CUDA.
|
|
3308
|
+
|
|
3309
|
+
Args:
|
|
3310
|
+
x: set the x expression of overlay (default "0")
|
|
3311
|
+
y: set the y expression of overlay (default "0")
|
|
3312
|
+
eof_action: Action to take when encountering EOF from secondary input (from 0 to 2) (default repeat)
|
|
3313
|
+
eval: specify when to evaluate expressions (from 0 to 1) (default frame)
|
|
3314
|
+
shortest: force termination when the shortest input terminates (default false)
|
|
3315
|
+
repeatlast: repeat overlay of the last overlay frame (default true)
|
|
3316
|
+
framesync_options: Framesync options
|
|
3317
|
+
extra_options: Extra options for the filter
|
|
3318
|
+
|
|
3319
|
+
Returns:
|
|
3320
|
+
default: the video stream
|
|
3321
|
+
|
|
3322
|
+
References:
|
|
3323
|
+
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#overlay_005fcuda)
|
|
3324
|
+
|
|
3325
|
+
"""
|
|
3326
|
+
filter_node = filter_node_factory(
|
|
3327
|
+
FFMpegFilterDef(
|
|
3328
|
+
name="overlay_cuda",
|
|
3329
|
+
typings_input=("video", "video"),
|
|
3330
|
+
typings_output=("video",),
|
|
3331
|
+
),
|
|
3332
|
+
_main,
|
|
3333
|
+
_overlay,
|
|
3334
|
+
**merge(
|
|
3335
|
+
{
|
|
3336
|
+
"x": x,
|
|
3337
|
+
"y": y,
|
|
3338
|
+
"eof_action": eof_action,
|
|
3339
|
+
"eval": eval,
|
|
3340
|
+
"shortest": shortest,
|
|
3341
|
+
"repeatlast": repeatlast,
|
|
3342
|
+
},
|
|
3343
|
+
extra_options,
|
|
3344
|
+
framesync_options,
|
|
3345
|
+
),
|
|
3346
|
+
)
|
|
3347
|
+
return filter_node.video(0)
|
|
3348
|
+
|
|
3349
|
+
|
|
3292
3350
|
def overlay_opencl(
|
|
3293
3351
|
_main: VideoStream,
|
|
3294
3352
|
_overlay: VideoStream,
|
typed_ffmpeg/sources.py
CHANGED
typed_ffmpeg/streams/video.py
CHANGED
|
@@ -625,6 +625,49 @@ class VideoStream(FilterableStream):
|
|
|
625
625
|
)
|
|
626
626
|
return filter_node.video(0)
|
|
627
627
|
|
|
628
|
+
def bilateral_cuda(
|
|
629
|
+
self,
|
|
630
|
+
*,
|
|
631
|
+
sigmaS: Float = Default("0.1"),
|
|
632
|
+
sigmaR: Float = Default("0.1"),
|
|
633
|
+
window_size: Int = Default("1"),
|
|
634
|
+
extra_options: dict[str, Any] | None = None,
|
|
635
|
+
) -> VideoStream:
|
|
636
|
+
"""
|
|
637
|
+
|
|
638
|
+
GPU accelerated bilateral filter.
|
|
639
|
+
|
|
640
|
+
Args:
|
|
641
|
+
sigmaS: set spatial sigma (from 0.1 to 512) (default 0.1)
|
|
642
|
+
sigmaR: set range sigma (from 0.1 to 512) (default 0.1)
|
|
643
|
+
window_size: set neighbours window_size (from 1 to 255) (default 1)
|
|
644
|
+
extra_options: Extra options for the filter
|
|
645
|
+
|
|
646
|
+
Returns:
|
|
647
|
+
default: the video stream
|
|
648
|
+
|
|
649
|
+
References:
|
|
650
|
+
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#bilateral_005fcuda)
|
|
651
|
+
|
|
652
|
+
"""
|
|
653
|
+
filter_node = filter_node_factory(
|
|
654
|
+
FFMpegFilterDef(
|
|
655
|
+
name="bilateral_cuda",
|
|
656
|
+
typings_input=("video",),
|
|
657
|
+
typings_output=("video",),
|
|
658
|
+
),
|
|
659
|
+
self,
|
|
660
|
+
**merge(
|
|
661
|
+
{
|
|
662
|
+
"sigmaS": sigmaS,
|
|
663
|
+
"sigmaR": sigmaR,
|
|
664
|
+
"window_size": window_size,
|
|
665
|
+
},
|
|
666
|
+
extra_options,
|
|
667
|
+
),
|
|
668
|
+
)
|
|
669
|
+
return filter_node.video(0)
|
|
670
|
+
|
|
628
671
|
def bitplanenoise(
|
|
629
672
|
self,
|
|
630
673
|
*,
|
|
@@ -690,7 +733,7 @@ class VideoStream(FilterableStream):
|
|
|
690
733
|
default: the video stream
|
|
691
734
|
|
|
692
735
|
References:
|
|
693
|
-
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#
|
|
736
|
+
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#blackdetect_002c-blackdetect_005fvulkan)
|
|
694
737
|
|
|
695
738
|
"""
|
|
696
739
|
filter_node = filter_node_factory(
|
|
@@ -1367,6 +1410,54 @@ class VideoStream(FilterableStream):
|
|
|
1367
1410
|
)
|
|
1368
1411
|
return filter_node.video(0)
|
|
1369
1412
|
|
|
1413
|
+
def bwdif_cuda(
|
|
1414
|
+
self,
|
|
1415
|
+
*,
|
|
1416
|
+
mode: Int
|
|
1417
|
+
| Literal[
|
|
1418
|
+
"send_frame", "send_field", "send_frame_nospatial", "send_field_nospatial"
|
|
1419
|
+
]
|
|
1420
|
+
| Default = Default("send_frame"),
|
|
1421
|
+
parity: Int | Literal["tff", "bff", "auto"] | Default = Default("auto"),
|
|
1422
|
+
deint: Int | Literal["all", "interlaced"] | Default = Default("all"),
|
|
1423
|
+
timeline_options: FFMpegTimelineOption | None = None,
|
|
1424
|
+
extra_options: dict[str, Any] | None = None,
|
|
1425
|
+
) -> VideoStream:
|
|
1426
|
+
"""
|
|
1427
|
+
|
|
1428
|
+
Deinterlace CUDA frames.
|
|
1429
|
+
|
|
1430
|
+
Args:
|
|
1431
|
+
mode: specify the interlacing mode (from 0 to 3) (default send_frame)
|
|
1432
|
+
parity: specify the assumed picture field parity (from -1 to 1) (default auto)
|
|
1433
|
+
deint: specify which frames to deinterlace (from 0 to 1) (default all)
|
|
1434
|
+
timeline_options: Timeline options
|
|
1435
|
+
extra_options: Extra options for the filter
|
|
1436
|
+
|
|
1437
|
+
Returns:
|
|
1438
|
+
default: the video stream
|
|
1439
|
+
|
|
1440
|
+
References:
|
|
1441
|
+
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#bwdif_005fcuda)
|
|
1442
|
+
|
|
1443
|
+
"""
|
|
1444
|
+
filter_node = filter_node_factory(
|
|
1445
|
+
FFMpegFilterDef(
|
|
1446
|
+
name="bwdif_cuda", typings_input=("video",), typings_output=("video",)
|
|
1447
|
+
),
|
|
1448
|
+
self,
|
|
1449
|
+
**merge(
|
|
1450
|
+
{
|
|
1451
|
+
"mode": mode,
|
|
1452
|
+
"parity": parity,
|
|
1453
|
+
"deint": deint,
|
|
1454
|
+
},
|
|
1455
|
+
extra_options,
|
|
1456
|
+
timeline_options,
|
|
1457
|
+
),
|
|
1458
|
+
)
|
|
1459
|
+
return filter_node.video(0)
|
|
1460
|
+
|
|
1370
1461
|
def bwdif_vulkan(
|
|
1371
1462
|
self,
|
|
1372
1463
|
*,
|
|
@@ -1620,6 +1711,52 @@ class VideoStream(FilterableStream):
|
|
|
1620
1711
|
)
|
|
1621
1712
|
return filter_node.video(0)
|
|
1622
1713
|
|
|
1714
|
+
def chromakey_cuda(
|
|
1715
|
+
self,
|
|
1716
|
+
*,
|
|
1717
|
+
color: Color = Default("black"),
|
|
1718
|
+
similarity: Float = Default("0.01"),
|
|
1719
|
+
blend: Float = Default("0"),
|
|
1720
|
+
yuv: Boolean = Default("false"),
|
|
1721
|
+
extra_options: dict[str, Any] | None = None,
|
|
1722
|
+
) -> VideoStream:
|
|
1723
|
+
"""
|
|
1724
|
+
|
|
1725
|
+
GPU accelerated chromakey filter.
|
|
1726
|
+
|
|
1727
|
+
Args:
|
|
1728
|
+
color: set the chromakey key color (default "black")
|
|
1729
|
+
similarity: set the chromakey similarity value (from 0.01 to 1) (default 0.01)
|
|
1730
|
+
blend: set the chromakey key blend value (from 0 to 1) (default 0)
|
|
1731
|
+
yuv: color parameter is in yuv instead of rgb (default false)
|
|
1732
|
+
extra_options: Extra options for the filter
|
|
1733
|
+
|
|
1734
|
+
Returns:
|
|
1735
|
+
default: the video stream
|
|
1736
|
+
|
|
1737
|
+
References:
|
|
1738
|
+
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#chromakey_005fcuda)
|
|
1739
|
+
|
|
1740
|
+
"""
|
|
1741
|
+
filter_node = filter_node_factory(
|
|
1742
|
+
FFMpegFilterDef(
|
|
1743
|
+
name="chromakey_cuda",
|
|
1744
|
+
typings_input=("video",),
|
|
1745
|
+
typings_output=("video",),
|
|
1746
|
+
),
|
|
1747
|
+
self,
|
|
1748
|
+
**merge(
|
|
1749
|
+
{
|
|
1750
|
+
"color": color,
|
|
1751
|
+
"similarity": similarity,
|
|
1752
|
+
"blend": blend,
|
|
1753
|
+
"yuv": yuv,
|
|
1754
|
+
},
|
|
1755
|
+
extra_options,
|
|
1756
|
+
),
|
|
1757
|
+
)
|
|
1758
|
+
return filter_node.video(0)
|
|
1759
|
+
|
|
1623
1760
|
def chromanr(
|
|
1624
1761
|
self,
|
|
1625
1762
|
*,
|
|
@@ -2736,6 +2873,43 @@ class VideoStream(FilterableStream):
|
|
|
2736
2873
|
)
|
|
2737
2874
|
return filter_node.video(0)
|
|
2738
2875
|
|
|
2876
|
+
def colorspace_cuda(
|
|
2877
|
+
self,
|
|
2878
|
+
*,
|
|
2879
|
+
range: Int | Literal["tv", "mpeg", "pc", "jpeg"] | Default = Default("0"),
|
|
2880
|
+
extra_options: dict[str, Any] | None = None,
|
|
2881
|
+
) -> VideoStream:
|
|
2882
|
+
"""
|
|
2883
|
+
|
|
2884
|
+
CUDA accelerated video color converter.
|
|
2885
|
+
|
|
2886
|
+
Args:
|
|
2887
|
+
range: Output video range (from 0 to 2) (default 0)
|
|
2888
|
+
extra_options: Extra options for the filter
|
|
2889
|
+
|
|
2890
|
+
Returns:
|
|
2891
|
+
default: the video stream
|
|
2892
|
+
|
|
2893
|
+
References:
|
|
2894
|
+
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#colorspace_005fcuda)
|
|
2895
|
+
|
|
2896
|
+
"""
|
|
2897
|
+
filter_node = filter_node_factory(
|
|
2898
|
+
FFMpegFilterDef(
|
|
2899
|
+
name="colorspace_cuda",
|
|
2900
|
+
typings_input=("video",),
|
|
2901
|
+
typings_output=("video",),
|
|
2902
|
+
),
|
|
2903
|
+
self,
|
|
2904
|
+
**merge(
|
|
2905
|
+
{
|
|
2906
|
+
"range": range,
|
|
2907
|
+
},
|
|
2908
|
+
extra_options,
|
|
2909
|
+
),
|
|
2910
|
+
)
|
|
2911
|
+
return filter_node.video(0)
|
|
2912
|
+
|
|
2739
2913
|
def colortemperature(
|
|
2740
2914
|
self,
|
|
2741
2915
|
*,
|
|
@@ -9716,6 +9890,65 @@ class VideoStream(FilterableStream):
|
|
|
9716
9890
|
)
|
|
9717
9891
|
return filter_node.video(0)
|
|
9718
9892
|
|
|
9893
|
+
def overlay_cuda(
|
|
9894
|
+
self,
|
|
9895
|
+
_overlay: VideoStream,
|
|
9896
|
+
*,
|
|
9897
|
+
x: String = Default("0"),
|
|
9898
|
+
y: String = Default("0"),
|
|
9899
|
+
eof_action: Int | Literal["repeat", "endall", "pass"] | Default = Default(
|
|
9900
|
+
"repeat"
|
|
9901
|
+
),
|
|
9902
|
+
eval: Int | Literal["init", "frame"] | Default = Default("frame"),
|
|
9903
|
+
shortest: Boolean = Default("false"),
|
|
9904
|
+
repeatlast: Boolean = Default("true"),
|
|
9905
|
+
framesync_options: FFMpegFrameSyncOption | None = None,
|
|
9906
|
+
extra_options: dict[str, Any] | None = None,
|
|
9907
|
+
) -> VideoStream:
|
|
9908
|
+
"""
|
|
9909
|
+
|
|
9910
|
+
Overlay one video on top of another using CUDA.
|
|
9911
|
+
|
|
9912
|
+
Args:
|
|
9913
|
+
x: set the x expression of overlay (default "0")
|
|
9914
|
+
y: set the y expression of overlay (default "0")
|
|
9915
|
+
eof_action: Action to take when encountering EOF from secondary input (from 0 to 2) (default repeat)
|
|
9916
|
+
eval: specify when to evaluate expressions (from 0 to 1) (default frame)
|
|
9917
|
+
shortest: force termination when the shortest input terminates (default false)
|
|
9918
|
+
repeatlast: repeat overlay of the last overlay frame (default true)
|
|
9919
|
+
framesync_options: Framesync options
|
|
9920
|
+
extra_options: Extra options for the filter
|
|
9921
|
+
|
|
9922
|
+
Returns:
|
|
9923
|
+
default: the video stream
|
|
9924
|
+
|
|
9925
|
+
References:
|
|
9926
|
+
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#overlay_005fcuda)
|
|
9927
|
+
|
|
9928
|
+
"""
|
|
9929
|
+
filter_node = filter_node_factory(
|
|
9930
|
+
FFMpegFilterDef(
|
|
9931
|
+
name="overlay_cuda",
|
|
9932
|
+
typings_input=("video", "video"),
|
|
9933
|
+
typings_output=("video",),
|
|
9934
|
+
),
|
|
9935
|
+
self,
|
|
9936
|
+
_overlay,
|
|
9937
|
+
**merge(
|
|
9938
|
+
{
|
|
9939
|
+
"x": x,
|
|
9940
|
+
"y": y,
|
|
9941
|
+
"eof_action": eof_action,
|
|
9942
|
+
"eval": eval,
|
|
9943
|
+
"shortest": shortest,
|
|
9944
|
+
"repeatlast": repeatlast,
|
|
9945
|
+
},
|
|
9946
|
+
extra_options,
|
|
9947
|
+
framesync_options,
|
|
9948
|
+
),
|
|
9949
|
+
)
|
|
9950
|
+
return filter_node.video(0)
|
|
9951
|
+
|
|
9719
9952
|
def overlay_opencl(
|
|
9720
9953
|
self,
|
|
9721
9954
|
_overlay: VideoStream,
|
|
@@ -11546,6 +11779,66 @@ class VideoStream(FilterableStream):
|
|
|
11546
11779
|
)
|
|
11547
11780
|
return filter_node.video(0)
|
|
11548
11781
|
|
|
11782
|
+
def scale_cuda(
|
|
11783
|
+
self,
|
|
11784
|
+
*,
|
|
11785
|
+
w: String = Default("iw"),
|
|
11786
|
+
h: String = Default("ih"),
|
|
11787
|
+
interp_algo: Int
|
|
11788
|
+
| Literal["nearest", "bilinear", "bicubic", "lanczos"]
|
|
11789
|
+
| Default = Default("0"),
|
|
11790
|
+
format: Pix_fmt = Default("none"),
|
|
11791
|
+
passthrough: Boolean = Default("true"),
|
|
11792
|
+
param: Float = Default("999999"),
|
|
11793
|
+
force_original_aspect_ratio: Int
|
|
11794
|
+
| Literal["disable", "decrease", "increase"]
|
|
11795
|
+
| Default = Default("disable"),
|
|
11796
|
+
force_divisible_by: Int = Default("1"),
|
|
11797
|
+
extra_options: dict[str, Any] | None = None,
|
|
11798
|
+
) -> VideoStream:
|
|
11799
|
+
"""
|
|
11800
|
+
|
|
11801
|
+
GPU accelerated video resizer.
|
|
11802
|
+
|
|
11803
|
+
Args:
|
|
11804
|
+
w: Output video width (default "iw")
|
|
11805
|
+
h: Output video height (default "ih")
|
|
11806
|
+
interp_algo: Interpolation algorithm used for resizing (from 0 to 4) (default 0)
|
|
11807
|
+
format: Output video pixel format (default none)
|
|
11808
|
+
passthrough: Do not process frames at all if parameters match (default true)
|
|
11809
|
+
param: Algorithm-Specific parameter (from -FLT_MAX to FLT_MAX) (default 999999)
|
|
11810
|
+
force_original_aspect_ratio: decrease or increase w/h if necessary to keep the original AR (from 0 to 2) (default disable)
|
|
11811
|
+
force_divisible_by: enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used (from 1 to 256) (default 1)
|
|
11812
|
+
extra_options: Extra options for the filter
|
|
11813
|
+
|
|
11814
|
+
Returns:
|
|
11815
|
+
default: the video stream
|
|
11816
|
+
|
|
11817
|
+
References:
|
|
11818
|
+
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#scale_005fcuda)
|
|
11819
|
+
|
|
11820
|
+
"""
|
|
11821
|
+
filter_node = filter_node_factory(
|
|
11822
|
+
FFMpegFilterDef(
|
|
11823
|
+
name="scale_cuda", typings_input=("video",), typings_output=("video",)
|
|
11824
|
+
),
|
|
11825
|
+
self,
|
|
11826
|
+
**merge(
|
|
11827
|
+
{
|
|
11828
|
+
"w": w,
|
|
11829
|
+
"h": h,
|
|
11830
|
+
"interp_algo": interp_algo,
|
|
11831
|
+
"format": format,
|
|
11832
|
+
"passthrough": passthrough,
|
|
11833
|
+
"param": param,
|
|
11834
|
+
"force_original_aspect_ratio": force_original_aspect_ratio,
|
|
11835
|
+
"force_divisible_by": force_divisible_by,
|
|
11836
|
+
},
|
|
11837
|
+
extra_options,
|
|
11838
|
+
),
|
|
11839
|
+
)
|
|
11840
|
+
return filter_node.video(0)
|
|
11841
|
+
|
|
11549
11842
|
def scdet(
|
|
11550
11843
|
self,
|
|
11551
11844
|
*,
|
|
@@ -13812,6 +14105,43 @@ class VideoStream(FilterableStream):
|
|
|
13812
14105
|
)
|
|
13813
14106
|
return filter_node.video(0)
|
|
13814
14107
|
|
|
14108
|
+
def thumbnail_cuda(
|
|
14109
|
+
self,
|
|
14110
|
+
*,
|
|
14111
|
+
n: Int = Default("100"),
|
|
14112
|
+
extra_options: dict[str, Any] | None = None,
|
|
14113
|
+
) -> VideoStream:
|
|
14114
|
+
"""
|
|
14115
|
+
|
|
14116
|
+
Select the most representative frame in a given sequence of consecutive frames.
|
|
14117
|
+
|
|
14118
|
+
Args:
|
|
14119
|
+
n: set the frames batch size (from 2 to INT_MAX) (default 100)
|
|
14120
|
+
extra_options: Extra options for the filter
|
|
14121
|
+
|
|
14122
|
+
Returns:
|
|
14123
|
+
default: the video stream
|
|
14124
|
+
|
|
14125
|
+
References:
|
|
14126
|
+
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#thumbnail_005fcuda)
|
|
14127
|
+
|
|
14128
|
+
"""
|
|
14129
|
+
filter_node = filter_node_factory(
|
|
14130
|
+
FFMpegFilterDef(
|
|
14131
|
+
name="thumbnail_cuda",
|
|
14132
|
+
typings_input=("video",),
|
|
14133
|
+
typings_output=("video",),
|
|
14134
|
+
),
|
|
14135
|
+
self,
|
|
14136
|
+
**merge(
|
|
14137
|
+
{
|
|
14138
|
+
"n": n,
|
|
14139
|
+
},
|
|
14140
|
+
extra_options,
|
|
14141
|
+
),
|
|
14142
|
+
)
|
|
14143
|
+
return filter_node.video(0)
|
|
14144
|
+
|
|
13815
14145
|
def tile(
|
|
13816
14146
|
self,
|
|
13817
14147
|
*,
|
|
@@ -15944,6 +16274,54 @@ class VideoStream(FilterableStream):
|
|
|
15944
16274
|
)
|
|
15945
16275
|
return filter_node.video(0)
|
|
15946
16276
|
|
|
16277
|
+
def yadif_cuda(
|
|
16278
|
+
self,
|
|
16279
|
+
*,
|
|
16280
|
+
mode: Int
|
|
16281
|
+
| Literal[
|
|
16282
|
+
"send_frame", "send_field", "send_frame_nospatial", "send_field_nospatial"
|
|
16283
|
+
]
|
|
16284
|
+
| Default = Default("send_frame"),
|
|
16285
|
+
parity: Int | Literal["tff", "bff", "auto"] | Default = Default("auto"),
|
|
16286
|
+
deint: Int | Literal["all", "interlaced"] | Default = Default("all"),
|
|
16287
|
+
timeline_options: FFMpegTimelineOption | None = None,
|
|
16288
|
+
extra_options: dict[str, Any] | None = None,
|
|
16289
|
+
) -> VideoStream:
|
|
16290
|
+
"""
|
|
16291
|
+
|
|
16292
|
+
Deinterlace CUDA frames.
|
|
16293
|
+
|
|
16294
|
+
Args:
|
|
16295
|
+
mode: specify the interlacing mode (from 0 to 3) (default send_frame)
|
|
16296
|
+
parity: specify the assumed picture field parity (from -1 to 1) (default auto)
|
|
16297
|
+
deint: specify which frames to deinterlace (from 0 to 1) (default all)
|
|
16298
|
+
timeline_options: Timeline options
|
|
16299
|
+
extra_options: Extra options for the filter
|
|
16300
|
+
|
|
16301
|
+
Returns:
|
|
16302
|
+
default: the video stream
|
|
16303
|
+
|
|
16304
|
+
References:
|
|
16305
|
+
[FFmpeg Documentation](https://ffmpeg.org/ffmpeg-filters.html#yadif_005fcuda)
|
|
16306
|
+
|
|
16307
|
+
"""
|
|
16308
|
+
filter_node = filter_node_factory(
|
|
16309
|
+
FFMpegFilterDef(
|
|
16310
|
+
name="yadif_cuda", typings_input=("video",), typings_output=("video",)
|
|
16311
|
+
),
|
|
16312
|
+
self,
|
|
16313
|
+
**merge(
|
|
16314
|
+
{
|
|
16315
|
+
"mode": mode,
|
|
16316
|
+
"parity": parity,
|
|
16317
|
+
"deint": deint,
|
|
16318
|
+
},
|
|
16319
|
+
extra_options,
|
|
16320
|
+
timeline_options,
|
|
16321
|
+
),
|
|
16322
|
+
)
|
|
16323
|
+
return filter_node.video(0)
|
|
16324
|
+
|
|
15947
16325
|
def yaepblur(
|
|
15948
16326
|
self,
|
|
15949
16327
|
*,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: typed-ffmpeg-compatible
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.7.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
|
|
@@ -199,3 +199,12 @@ This project is dedicated to my son, Austin, on his seventh birthday (February 2
|
|
|
199
199
|
---
|
|
200
200
|
|
|
201
201
|
Feel free to check the [Documentation](https://livingbio.github.io/typed-ffmpeg/) for detailed information and more advanced features.
|
|
202
|
+
|
|
203
|
+
## Development Setup
|
|
204
|
+
|
|
205
|
+
Install all development dependencies:
|
|
206
|
+
```
|
|
207
|
+
uv pip install --group dev
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
No need to use requirements.in or requirements.txt anymore. All dependencies are managed in `pyproject.toml` and locked in `uv.lock`.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
typed_ffmpeg/__init__.py,sha256=oeMvHs-zZNS0BRey13UCwyaMhthxBrsWlmet2rXeKIw,1733
|
|
2
|
-
typed_ffmpeg/_version.py,sha256=
|
|
2
|
+
typed_ffmpeg/_version.py,sha256=9MjBMdn1ZPGLj9feYeo3MHJ_MYQCg5VstClhojAgSI8,704
|
|
3
3
|
typed_ffmpeg/base.py,sha256=Aq-eIkDfji8FMEGx17DCJCUnIT4wCQvbAA6rBMwW2dE,6312
|
|
4
4
|
typed_ffmpeg/exceptions.py,sha256=rNHAJZXkpUQNgAlnf-R8b4cYNEMkYNNH7NLg2pyk0G0,2475
|
|
5
5
|
typed_ffmpeg/expressions.py,sha256=oQnBqdkjB-1tuHxdf4udhye-qVcNsj1IeBI1t-hIeTg,19669
|
|
6
|
-
typed_ffmpeg/filters.py,sha256=
|
|
6
|
+
typed_ffmpeg/filters.py,sha256=v6jMMTwaMeNFlJBsW466yutHOWdDRjkBNAzQmYYt8bc,139011
|
|
7
7
|
typed_ffmpeg/info.py,sha256=gnXfruqjy5KeIxcNRxy-GZRSpdOUQ8_oTn9RN79dCxA,9529
|
|
8
8
|
typed_ffmpeg/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
typed_ffmpeg/schema.py,sha256=xlF84RA-loeHLU0CQ1DgAujm1oop2wFuKZOfCqtDHY4,1854
|
|
10
|
-
typed_ffmpeg/sources.py,sha256=
|
|
10
|
+
typed_ffmpeg/sources.py,sha256=_LGxviThVDKVbrD7uzj2w2S2TGk6OKZA3IJ3X2ISnE8,124617
|
|
11
11
|
typed_ffmpeg/types.py,sha256=Hz_pm1ZL5g_zAzy-3kTUOfSyoqkvcJ93zaYSA3fmkec,4271
|
|
12
12
|
typed_ffmpeg/codecs/__init__.py,sha256=EL82KdkvLHvxvKwV6nD5_kMbdOa34XHbIIBYKFOgy5c,117
|
|
13
13
|
typed_ffmpeg/codecs/decoders.py,sha256=fg3v-su1qq2w2nclNW5-o-vNV5GTbX_0VP_rBOk26FA,120176
|
|
@@ -16,7 +16,7 @@ typed_ffmpeg/codecs/schema.py,sha256=lJe4qWOzfWzrSy0ZYH8M8wSoe2vZYzxwu7mzdxURV6s
|
|
|
16
16
|
typed_ffmpeg/common/__init__.py,sha256=MOaoqb-pQq-OZGWfzLptwfGX6v3qDh3zUzncr_Vi_n4,39
|
|
17
17
|
typed_ffmpeg/common/cache.py,sha256=JxjvPujIUCs1SdqBhYsrucIWp6ShRSF8EF7hJPbmXrA,1429
|
|
18
18
|
typed_ffmpeg/common/schema.py,sha256=P618Bw4ngMhxvjuMkWUVy0EF-WveFWn2OmRP-tg1TiE,19762
|
|
19
|
-
typed_ffmpeg/common/serialize.py,sha256=
|
|
19
|
+
typed_ffmpeg/common/serialize.py,sha256=cb6sbOYVNcfXC08Ya4PTSHY_GrHlJjwmbJpHYtoJuuU,7811
|
|
20
20
|
typed_ffmpeg/compile/__init__.py,sha256=arrUostAUZzB8cQujLg9xo8OOfB4eoU3CYObAAY198A,44
|
|
21
21
|
typed_ffmpeg/compile/compile_cli.py,sha256=aNRaJnno7ICF6NKoIGQqhTpldMuykCGQCxC5JiVqpnE,34234
|
|
22
22
|
typed_ffmpeg/compile/compile_json.py,sha256=Sp84ss73C5YnUsEmhoqzy-y-gVk8G8q6d3SSKD3YWvE,1048
|
|
@@ -33,8 +33,8 @@ typed_ffmpeg/dag/global_runnable/global_args.py,sha256=fB1iw1VrrdqMelb_8O7WYGMF3
|
|
|
33
33
|
typed_ffmpeg/dag/global_runnable/runnable.py,sha256=KJZuCI05fx4isD4xZHbVNDn0yYImY0Hw7b76uVIySis,12617
|
|
34
34
|
typed_ffmpeg/dag/io/__init__.py,sha256=KSxmqhZYVNbckRCCL575eUjV0GpyvV9EbwnmwGKHdbQ,56
|
|
35
35
|
typed_ffmpeg/dag/io/_input.py,sha256=v-g0lBHveGG1-NFp6ODL4QKjDdEVRfLcZghXZivl6nE,8237
|
|
36
|
-
typed_ffmpeg/dag/io/_output.py,sha256=
|
|
37
|
-
typed_ffmpeg/dag/io/output_args.py,sha256=
|
|
36
|
+
typed_ffmpeg/dag/io/_output.py,sha256=U06M4RQepPleGS3odR9C1IVXijTCv5Q0R-_MOk8PiJI,13646
|
|
37
|
+
typed_ffmpeg/dag/io/output_args.py,sha256=GZJcg8TGBPk5S5jRjz4Xzy21UcIRQY4JnBRoKrt6ync,15224
|
|
38
38
|
typed_ffmpeg/ffprobe/__init__.py,sha256=XsPSdQyt12eJF3YF_5Rb101gjaBgvRasgO7gK4CyzZc,49
|
|
39
39
|
typed_ffmpeg/ffprobe/parse.py,sha256=FKYTp_18SsnQFvStsGFl1fV4bbDfDPVQ3n44-5QtmOE,3834
|
|
40
40
|
typed_ffmpeg/ffprobe/probe.py,sha256=iuGxqhxpNdFJb7SUDXl9gjR4CtGR4nzxJpWLTSH4_K4,10369
|
|
@@ -54,7 +54,7 @@ typed_ffmpeg/streams/audio.py,sha256=xo5CKu9ym82q0W-7OFB9vZzaWAEVugH-ftc1woG-qv0
|
|
|
54
54
|
typed_ffmpeg/streams/av.py,sha256=OyRRhSOEDYC1WtcXxX6h4eCkgDw6b4jFOx7yyUXJ3iA,2627
|
|
55
55
|
typed_ffmpeg/streams/channel_layout.py,sha256=hGagaoc1tnWS8K1yiITp4f_92qq5e7C_zB15bHOL0DI,1162
|
|
56
56
|
typed_ffmpeg/streams/subtitle.py,sha256=f139Wt9OtExHjzSm64HdKYk8KyfXSuv0HjmBZhjOVtQ,165
|
|
57
|
-
typed_ffmpeg/streams/video.py,sha256=
|
|
57
|
+
typed_ffmpeg/streams/video.py,sha256=MqmcjRB2ft2dv0R3PouM17u-p2hbf0auolVWV3ZwiM4,532100
|
|
58
58
|
typed_ffmpeg/utils/__init__.py,sha256=YUl7EosqAlIpB153d39qj5fG4SVFcFG2XI4hRDxUBDQ,52
|
|
59
59
|
typed_ffmpeg/utils/escaping.py,sha256=cM0CJc6LNQ-1gZZ3D9-VmMPgBT6rqJA6G6OngK_c9XI,2965
|
|
60
60
|
typed_ffmpeg/utils/frozendict.py,sha256=TCzkxaS_lxTeBrIop8UNnzsnx_sXuM8ca2e2O2nZWlM,5047
|
|
@@ -65,9 +65,9 @@ typed_ffmpeg/utils/view.py,sha256=wbfHsX4vhXTGgvxvoLdlJgIXbWtzh5TohcMDVgZobGw,34
|
|
|
65
65
|
typed_ffmpeg/utils/lazy_eval/__init__.py,sha256=_yEaOR9o5QerwmrLev_bGFB4cyWeEA_YvxE2WyToK2c,50
|
|
66
66
|
typed_ffmpeg/utils/lazy_eval/operator.py,sha256=w61XIH0kdJkGuo201837lqvKHStTHumOlvyDCm8Gu5o,5472
|
|
67
67
|
typed_ffmpeg/utils/lazy_eval/schema.py,sha256=Xn8ABlx_EK2hv6dsZ2Hu7nPRCzQFvMWxLPXEOgSLnSM,13329
|
|
68
|
-
typed_ffmpeg_compatible-3.
|
|
69
|
-
typed_ffmpeg_compatible-3.
|
|
70
|
-
typed_ffmpeg_compatible-3.
|
|
71
|
-
typed_ffmpeg_compatible-3.
|
|
72
|
-
typed_ffmpeg_compatible-3.
|
|
73
|
-
typed_ffmpeg_compatible-3.
|
|
68
|
+
typed_ffmpeg_compatible-3.7.1.dist-info/licenses/LICENSE,sha256=8Aaya5i_09Cou2i3QMxTwz6uHGzi_fGA4uhkco07-A4,1066
|
|
69
|
+
typed_ffmpeg_compatible-3.7.1.dist-info/METADATA,sha256=OgrA0DqIzR7zalB9eDOtr9XRdtfspmdMQAhK24rpz8Y,8616
|
|
70
|
+
typed_ffmpeg_compatible-3.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
71
|
+
typed_ffmpeg_compatible-3.7.1.dist-info/entry_points.txt,sha256=kUQvZ27paV-07qtkIFV-emKsYtjFOTw9kknBRSXPs04,45
|
|
72
|
+
typed_ffmpeg_compatible-3.7.1.dist-info/top_level.txt,sha256=vuASJGVRQiNmhWY1pt0RXESWSNkknWXqWLIRAU7H_L4,13
|
|
73
|
+
typed_ffmpeg_compatible-3.7.1.dist-info/RECORD,,
|
|
File without changes
|
{typed_ffmpeg_compatible-3.6.dist-info → typed_ffmpeg_compatible-3.7.1.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{typed_ffmpeg_compatible-3.6.dist-info → typed_ffmpeg_compatible-3.7.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{typed_ffmpeg_compatible-3.6.dist-info → typed_ffmpeg_compatible-3.7.1.dist-info}/top_level.txt
RENAMED
|
File without changes
|