typed-ffmpeg-compatible 3.4__py3-none-any.whl → 3.4.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 CHANGED
@@ -22,7 +22,7 @@ Example:
22
22
  ```
23
23
  """
24
24
 
25
- from . import codecs, compile, dag, filters, sources
25
+ from . import codecs, compile, dag, filters, formats, 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
@@ -32,6 +32,7 @@ from .streams import AudioStream, AVStream, SubtitleStream, VideoStream
32
32
 
33
33
  __all__ = [
34
34
  "codecs",
35
+ "formats",
35
36
  "sources",
36
37
  "filters",
37
38
  "input",
typed_ffmpeg/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '3.4'
21
- __version_tuple__ = version_tuple = (3, 4)
20
+ __version__ = version = '3.4.1'
21
+ __version_tuple__ = version_tuple = (3, 4, 1)
@@ -39,9 +39,7 @@ def alias_pix() -> FFMpegEncoderOption:
39
39
 
40
40
 
41
41
  def amv(
42
- mpv_flags: str
43
- | None
44
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
42
+ mpv_flags: str | None = None,
45
43
  luma_elim_threshold: int | None = None,
46
44
  chroma_elim_threshold: int | None = None,
47
45
  quantizer_noise_shaping: int | None = None,
@@ -840,9 +838,7 @@ def flashsv2() -> FFMpegEncoderOption:
840
838
 
841
839
 
842
840
  def flv(
843
- mpv_flags: str
844
- | None
845
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
841
+ mpv_flags: str | None = None,
846
842
  luma_elim_threshold: int | None = None,
847
843
  chroma_elim_threshold: int | None = None,
848
844
  quantizer_noise_shaping: int | None = None,
@@ -953,7 +949,7 @@ def flv(
953
949
 
954
950
 
955
951
  def gif(
956
- gifflags: str | None | Literal["offsetting", "transdiff"] = None,
952
+ gifflags: str | None = None,
957
953
  gifimage: bool | None = None,
958
954
  global_palette: bool | None = None,
959
955
  ) -> FFMpegEncoderOption:
@@ -980,9 +976,7 @@ def gif(
980
976
 
981
977
 
982
978
  def h261(
983
- mpv_flags: str
984
- | None
985
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
979
+ mpv_flags: str | None = None,
986
980
  luma_elim_threshold: int | None = None,
987
981
  chroma_elim_threshold: int | None = None,
988
982
  quantizer_noise_shaping: int | None = None,
@@ -1095,9 +1089,7 @@ def h261(
1095
1089
  def h263(
1096
1090
  obmc: bool | None = None,
1097
1091
  mb_info: int | None = None,
1098
- mpv_flags: str
1099
- | None
1100
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
1092
+ mpv_flags: str | None = None,
1101
1093
  luma_elim_threshold: int | None = None,
1102
1094
  chroma_elim_threshold: int | None = None,
1103
1095
  quantizer_noise_shaping: int | None = None,
@@ -1240,9 +1232,7 @@ def h263p(
1240
1232
  aiv: bool | None = None,
1241
1233
  obmc: bool | None = None,
1242
1234
  structured_slices: bool | None = None,
1243
- mpv_flags: str
1244
- | None
1245
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
1235
+ mpv_flags: str | None = None,
1246
1236
  luma_elim_threshold: int | None = None,
1247
1237
  chroma_elim_threshold: int | None = None,
1248
1238
  quantizer_noise_shaping: int | None = None,
@@ -1939,9 +1929,7 @@ def h264_vaapi(
1939
1929
  quality: int | None = None,
1940
1930
  coder: int | None | Literal["cavlc", "cabac", "vlc", "ac"] = None,
1941
1931
  aud: bool | None = None,
1942
- sei: str
1943
- | None
1944
- | Literal["identifier", "timing", "recovery_point", "a53_cc"] = None,
1932
+ sei: str | None = None,
1945
1933
  profile: int
1946
1934
  | None
1947
1935
  | Literal["constrained_baseline", "main", "high", "high10"] = None,
@@ -2341,7 +2329,7 @@ def hevc_vaapi(
2341
2329
  | Literal[
2342
2330
  "1", "2", "2.1", "3", "3.1", "4", "4.1", "5", "5.1", "5.2", "6", "6.1", "6.2"
2343
2331
  ] = None,
2344
- sei: str | None | Literal["hdr", "a53_cc"] = None,
2332
+ sei: str | None = None,
2345
2333
  tiles: str | None = None,
2346
2334
  ) -> FFMpegEncoderOption:
2347
2335
  """
@@ -2585,9 +2573,7 @@ def magicyuv(
2585
2573
 
2586
2574
 
2587
2575
  def mjpeg(
2588
- mpv_flags: str
2589
- | None
2590
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
2576
+ mpv_flags: str | None = None,
2591
2577
  luma_elim_threshold: int | None = None,
2592
2578
  chroma_elim_threshold: int | None = None,
2593
2579
  quantizer_noise_shaping: int | None = None,
@@ -2738,9 +2724,7 @@ def mpeg1video(
2738
2724
  b_strategy: int | None = None,
2739
2725
  b_sensitivity: int | None = None,
2740
2726
  brd_scale: int | None = None,
2741
- mpv_flags: str
2742
- | None
2743
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
2727
+ mpv_flags: str | None = None,
2744
2728
  luma_elim_threshold: int | None = None,
2745
2729
  chroma_elim_threshold: int | None = None,
2746
2730
  quantizer_noise_shaping: int | None = None,
@@ -2880,9 +2864,7 @@ def mpeg2video(
2880
2864
  video_format: int
2881
2865
  | None
2882
2866
  | Literal["component", "pal", "ntsc", "secam", "mac", "unspecified"] = None,
2883
- mpv_flags: str
2884
- | None
2885
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
2867
+ mpv_flags: str | None = None,
2886
2868
  luma_elim_threshold: int | None = None,
2887
2869
  chroma_elim_threshold: int | None = None,
2888
2870
  quantizer_noise_shaping: int | None = None,
@@ -3069,9 +3051,7 @@ def mpeg4(
3069
3051
  b_strategy: int | None = None,
3070
3052
  b_sensitivity: int | None = None,
3071
3053
  brd_scale: int | None = None,
3072
- mpv_flags: str
3073
- | None
3074
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
3054
+ mpv_flags: str | None = None,
3075
3055
  luma_elim_threshold: int | None = None,
3076
3056
  chroma_elim_threshold: int | None = None,
3077
3057
  quantizer_noise_shaping: int | None = None,
@@ -3257,9 +3237,7 @@ def mpeg4_v4l2m2m(
3257
3237
 
3258
3238
 
3259
3239
  def msmpeg4v2(
3260
- mpv_flags: str
3261
- | None
3262
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
3240
+ mpv_flags: str | None = None,
3263
3241
  luma_elim_threshold: int | None = None,
3264
3242
  chroma_elim_threshold: int | None = None,
3265
3243
  quantizer_noise_shaping: int | None = None,
@@ -3370,9 +3348,7 @@ def msmpeg4v2(
3370
3348
 
3371
3349
 
3372
3350
  def msmpeg4(
3373
- mpv_flags: str
3374
- | None
3375
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
3351
+ mpv_flags: str | None = None,
3376
3352
  luma_elim_threshold: int | None = None,
3377
3353
  chroma_elim_threshold: int | None = None,
3378
3354
  quantizer_noise_shaping: int | None = None,
@@ -3792,9 +3768,7 @@ def rpza(
3792
3768
 
3793
3769
 
3794
3770
  def rv10(
3795
- mpv_flags: str
3796
- | None
3797
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
3771
+ mpv_flags: str | None = None,
3798
3772
  luma_elim_threshold: int | None = None,
3799
3773
  chroma_elim_threshold: int | None = None,
3800
3774
  quantizer_noise_shaping: int | None = None,
@@ -3905,9 +3879,7 @@ def rv10(
3905
3879
 
3906
3880
 
3907
3881
  def rv20(
3908
- mpv_flags: str
3909
- | None
3910
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
3882
+ mpv_flags: str | None = None,
3911
3883
  luma_elim_threshold: int | None = None,
3912
3884
  chroma_elim_threshold: int | None = None,
3913
3885
  quantizer_noise_shaping: int | None = None,
@@ -4092,9 +4064,7 @@ def snow(
4092
4064
 
4093
4065
 
4094
4066
  def speedhq(
4095
- mpv_flags: str
4096
- | None
4097
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
4067
+ mpv_flags: str | None = None,
4098
4068
  luma_elim_threshold: int | None = None,
4099
4069
  chroma_elim_threshold: int | None = None,
4100
4070
  quantizer_noise_shaping: int | None = None,
@@ -4604,9 +4574,7 @@ def libwebp(
4604
4574
 
4605
4575
 
4606
4576
  def wmv1(
4607
- mpv_flags: str
4608
- | None
4609
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
4577
+ mpv_flags: str | None = None,
4610
4578
  luma_elim_threshold: int | None = None,
4611
4579
  chroma_elim_threshold: int | None = None,
4612
4580
  quantizer_noise_shaping: int | None = None,
@@ -4717,9 +4685,7 @@ def wmv1(
4717
4685
 
4718
4686
 
4719
4687
  def wmv2(
4720
- mpv_flags: str
4721
- | None
4722
- | Literal["skip_rd", "strict_gop", "qp_rd", "cbp_rd", "naq", "mv0"] = None,
4688
+ mpv_flags: str | None = None,
4723
4689
  luma_elim_threshold: int | None = None,
4724
4690
  chroma_elim_threshold: int | None = None,
4725
4691
  quantizer_noise_shaping: int | None = None,
@@ -5,6 +5,7 @@ from pathlib import Path
5
5
  from typing import Any
6
6
 
7
7
  from ...codecs.schema import FFMpegDecoderOption
8
+ from ...formats.schema import FFMpegDemuxerOption
8
9
  from ...streams.av import AVStream
9
10
  from ...types import (
10
11
  Boolean,
@@ -74,6 +75,7 @@ def input(
74
75
  dn: Boolean = None,
75
76
  top: Int = None,
76
77
  decoder_options: FFMpegDecoderOption | None = None,
78
+ demuxer_options: FFMpegDemuxerOption | None = None,
77
79
  extra_options: dict[str, Any] | None = None,
78
80
  ) -> AVStream:
79
81
  """
@@ -134,6 +136,7 @@ def input(
134
136
  dn: disable data
135
137
  top: deprecated, use the setfield video filter
136
138
  decoder_options: ffmpeg's decoder options
139
+ demuxer_options: ffmpeg's demuxer options
137
140
  extra_options: ffmpeg's input file options
138
141
 
139
142
  Returns:
@@ -203,6 +206,7 @@ def input(
203
206
  "top": top,
204
207
  },
205
208
  decoder_options.kwargs if decoder_options else {},
209
+ demuxer_options.kwargs if demuxer_options else {},
206
210
  extra_options,
207
211
  ),
208
212
  ).stream()
@@ -5,6 +5,7 @@ from pathlib import Path
5
5
  from typing import Any
6
6
 
7
7
  from ...codecs.schema import FFMpegEncoderOption
8
+ from ...formats.schema import FFMpegMuxerOption
8
9
  from ...types import (
9
10
  Boolean,
10
11
  Float,
@@ -116,6 +117,7 @@ def output(
116
117
  dn: Boolean = None,
117
118
  top: Int = None,
118
119
  encoder_options: FFMpegEncoderOption | None = None,
120
+ muxer_options: FFMpegMuxerOption | None = None,
119
121
  extra_options: dict[str, Any] | None = None,
120
122
  ) -> OutputStream:
121
123
  """
@@ -220,6 +222,7 @@ def output(
220
222
  dn: disable data
221
223
  top: deprecated, use the setfield video filter
222
224
  encoder_options: ffmpeg's encoder options
225
+ muxer_options: ffmpeg's muxer options
223
226
  extra_options: the arguments for the output
224
227
 
225
228
  Returns:
@@ -327,6 +330,7 @@ def output(
327
330
  "top": top,
328
331
  },
329
332
  encoder_options.kwargs if encoder_options else {},
333
+ muxer_options.kwargs if muxer_options else {},
330
334
  extra_options,
331
335
  ),
332
336
  ).stream()
@@ -8,6 +8,7 @@ from pathlib import Path
8
8
  from typing import TYPE_CHECKING, Any
9
9
 
10
10
  from ...codecs.schema import FFMpegEncoderOption
11
+ from ...formats.schema import FFMpegMuxerOption
11
12
  from ...types import (
12
13
  Boolean,
13
14
  Float,
@@ -128,6 +129,7 @@ class OutputArgs(ABC):
128
129
  dn: Boolean = None,
129
130
  top: Int = None,
130
131
  encoder_options: FFMpegEncoderOption | None = None,
132
+ muxer_options: FFMpegMuxerOption | None = None,
131
133
  extra_options: dict[str, Any] | None = None,
132
134
  ) -> OutputStream:
133
135
  """
@@ -232,6 +234,7 @@ class OutputArgs(ABC):
232
234
  dn: disable data
233
235
  top: deprecated, use the setfield video filter
234
236
  encoder_options: ffmpeg's encoder options
237
+ muxer_options: FFMpegMuxerOption | None = None,
235
238
  extra_options: the arguments for the output
236
239
 
237
240
  Returns:
@@ -339,6 +342,7 @@ class OutputArgs(ABC):
339
342
  "top": top,
340
343
  },
341
344
  encoder_options.kwargs if encoder_options else {},
345
+ muxer_options.kwargs if muxer_options else {},
342
346
  extra_options,
343
347
  ),
344
348
  ).stream()
@@ -0,0 +1,3 @@
1
+ from . import demuxers, muxers, schema
2
+
3
+ __all__ = ["muxers", "demuxers", "schema"]