typed-ffmpeg-compatible 2.1.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. typed_ffmpeg/__init__.py +25 -0
  2. typed_ffmpeg/base.py +114 -0
  3. typed_ffmpeg/common/__init__.py +0 -0
  4. typed_ffmpeg/common/schema.py +308 -0
  5. typed_ffmpeg/common/serialize.py +132 -0
  6. typed_ffmpeg/dag/__init__.py +13 -0
  7. typed_ffmpeg/dag/compile.py +51 -0
  8. typed_ffmpeg/dag/context.py +221 -0
  9. typed_ffmpeg/dag/factory.py +31 -0
  10. typed_ffmpeg/dag/global_runnable/__init__.py +0 -0
  11. typed_ffmpeg/dag/global_runnable/global_args.py +178 -0
  12. typed_ffmpeg/dag/global_runnable/runnable.py +174 -0
  13. typed_ffmpeg/dag/io/__init__.py +0 -0
  14. typed_ffmpeg/dag/io/_input.py +197 -0
  15. typed_ffmpeg/dag/io/_output.py +318 -0
  16. typed_ffmpeg/dag/io/output_args.py +327 -0
  17. typed_ffmpeg/dag/nodes.py +479 -0
  18. typed_ffmpeg/dag/schema.py +210 -0
  19. typed_ffmpeg/dag/utils.py +41 -0
  20. typed_ffmpeg/dag/validate.py +172 -0
  21. typed_ffmpeg/exceptions.py +42 -0
  22. typed_ffmpeg/filters.py +3510 -0
  23. typed_ffmpeg/probe.py +43 -0
  24. typed_ffmpeg/py.typed +0 -0
  25. typed_ffmpeg/schema.py +29 -0
  26. typed_ffmpeg/streams/__init__.py +5 -0
  27. typed_ffmpeg/streams/audio.py +6955 -0
  28. typed_ffmpeg/streams/av.py +22 -0
  29. typed_ffmpeg/streams/channel_layout.py +39 -0
  30. typed_ffmpeg/streams/video.py +12974 -0
  31. typed_ffmpeg/types.py +119 -0
  32. typed_ffmpeg/utils/__init__.py +0 -0
  33. typed_ffmpeg/utils/escaping.py +49 -0
  34. typed_ffmpeg/utils/lazy_eval/__init__.py +0 -0
  35. typed_ffmpeg/utils/lazy_eval/operator.py +134 -0
  36. typed_ffmpeg/utils/lazy_eval/schema.py +211 -0
  37. typed_ffmpeg/utils/run.py +27 -0
  38. typed_ffmpeg/utils/snapshot.py +26 -0
  39. typed_ffmpeg/utils/typing.py +17 -0
  40. typed_ffmpeg/utils/view.py +64 -0
  41. typed_ffmpeg_compatible-2.1.0.dist-info/LICENSE +21 -0
  42. typed_ffmpeg_compatible-2.1.0.dist-info/METADATA +183 -0
  43. typed_ffmpeg_compatible-2.1.0.dist-info/RECORD +45 -0
  44. typed_ffmpeg_compatible-2.1.0.dist-info/WHEEL +4 -0
  45. typed_ffmpeg_compatible-2.1.0.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,183 @@
1
+ Metadata-Version: 2.1
2
+ Name: typed-ffmpeg-compatible
3
+ Version: 2.1.0
4
+ Summary: Modern Python FFmpeg wrappers offer comprehensive support for complex filters, complete with detailed typing and documentation.
5
+ Home-page: https://livingbio.github.io/typed-ffmpeg/
6
+ License: MIT
7
+ Keywords: ffmpeg,video,audio,multimedia,filter
8
+ Author: lucemia
9
+ Author-email: lucemia@gmail.com
10
+ Requires-Python: >=3.10,<4.0
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Natural Language :: English
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Multimedia :: Sound/Audio
22
+ Classifier: Topic :: Multimedia :: Video
23
+ Classifier: Topic :: Software Development :: Libraries
24
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
25
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
+ Provides-Extra: graph
27
+ Requires-Dist: graphviz ; extra == "graph"
28
+ Project-URL: Repository, https://github.com/livingbio/typed-ffmpeg
29
+ Description-Content-Type: text/markdown
30
+
31
+ ## typed-ffmpeg
32
+
33
+ [![CI Package](https://github.com/livingbio/typed-ffmpeg/actions/workflows/ci-package.yml/badge.svg)](https://github.com/livingbio/typed-ffmpeg/actions?query=workflow%3Aci-package)
34
+ [![Documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://livingbio.github.io/typed-ffmpeg/)
35
+ [![PyPI Version](https://img.shields.io/pypi/v/typed-ffmpeg.svg)](https://pypi.org/project/typed-ffmpeg/)
36
+ [![codecov](https://codecov.io/gh/livingbio/typed-ffmpeg/graph/badge.svg?token=B95PR629LP)](https://codecov.io/gh/livingbio/typed-ffmpeg)
37
+
38
+ **typed-ffmpeg** offers a modern, Pythonic interface to FFmpeg, providing extensive support for complex filters with detailed typing and documentation. Inspired by `ffmpeg-python`, this package enhances functionality by addressing common limitations, such as lack of IDE integration and comprehensive typing, while also introducing new features like JSON serialization of filter graphs and automatic FFmpeg validation.
39
+
40
+ ---
41
+
42
+ ### Table of Contents
43
+
44
+ - [Features](#features)
45
+ - [Installation](#installation)
46
+ - [Quick Usage](#quick-usage)
47
+ - [Documentation](https://livingbio.github.io/typed-ffmpeg/)
48
+ - [Acknowledgements](#acknowledgements)
49
+
50
+ ---
51
+
52
+ ## Features
53
+
54
+ ![typed-ffmpeg](https://raw.githubusercontent.com/livingbio/typed-ffmpeg/main/docs/media/autocomplete.png)
55
+
56
+
57
+ - **Zero Dependencies:** Built purely with the Python standard library, ensuring maximum compatibility and security.
58
+ - **User-Friendly:** Simplifies the construction of filter graphs with an intuitive Pythonic interface.
59
+ - **Comprehensive FFmpeg Filter Support:** Out-of-the-box support for most FFmpeg filters, with IDE auto-completion.
60
+ - **Integrated Documentation:** In-line docstrings provide immediate reference for filter usage, reducing the need to consult external documentation.
61
+ - **Robust Typing:** Offers static and dynamic type checking, enhancing code reliability and development experience.
62
+ - **Filter Graph Serialization:** Enables saving and reloading of filter graphs in JSON format for ease of use and repeatability.
63
+ - **Graph Visualization:** Leverages `graphviz` for visual representation, aiding in understanding and debugging.
64
+ - **Validation and Auto-correction:** Assists in identifying and fixing errors within filter graphs.
65
+ - **Input and Output Options Support:** Provide a more comprehensive interface for input and output options, including support for additional codecs and formats.
66
+ - **Partial Evaluation:** Enhance the flexibility of filter graphs by enabling partial evaluation, allowing for modular construction and reuse.
67
+
68
+ ### Planned Features
69
+
70
+ Please note that the following features are under consideration or development for future releases:
71
+
72
+ - **Extended FFmpeg Version Support:** While `typed-ffmpeg` is currently built with FFmpeg version 6.0 in mind, we are working to ensure compatibility across different FFmpeg versions. Feedback and issue reports are welcome to improve version support.
73
+ - **Additional Filter Support:** We aim to expand the range of FFmpeg filters supported by `typed-ffmpeg`. Continuous updates will be made to include more complex and varied filters.
74
+
75
+ ---
76
+
77
+ ## Installation
78
+
79
+ To install `typed-ffmpeg`, simply use pip:
80
+
81
+ ```bash
82
+ pip install typed-ffmpeg
83
+ ```
84
+
85
+ Note: FFmpeg must be installed on your system.
86
+
87
+ Note: If you need to install `ffmpeg-python` at the same time, use `pip install typed-ffmpeg-compatible` to prevent conflicts with the module name.​
88
+
89
+ ### Visualization Support
90
+
91
+ To enable graph visualization features:
92
+
93
+ ```bash
94
+ pip install 'typed-ffmpeg[graph]'
95
+ ```
96
+
97
+ Note: This requires Graphviz to be installed on your system.
98
+
99
+ ---
100
+
101
+ ## Quick Usage
102
+
103
+ Here's how to quickly start using `typed-ffmpeg`:
104
+
105
+
106
+
107
+
108
+ ```python
109
+ import ffmpeg
110
+
111
+ # Flip video horizontally and output
112
+ f = (
113
+ ffmpeg
114
+ .input(filename='input.mp4')
115
+ .hflip()
116
+ .output(filename='output.mp4')
117
+ )
118
+ f
119
+ ```
120
+
121
+
122
+
123
+
124
+
125
+ ![svg](https://raw.githubusercontent.com/livingbio/typed-ffmpeg/main/docs/media/README_files/README_1_0.svg)
126
+
127
+
128
+
129
+
130
+ For a more complex example:
131
+
132
+
133
+
134
+ ```python
135
+ import ffmpeg.filters
136
+ import ffmpeg
137
+
138
+ # Complex filter graph example
139
+ in_file = ffmpeg.input("input.mp4")
140
+ overlay_file = ffmpeg.input("overlay.png")
141
+
142
+ f = (
143
+ ffmpeg.filters
144
+ .concat(
145
+ in_file.trim(start_frame=10, end_frame=20),
146
+ in_file.trim(start_frame=30, end_frame=40),
147
+ )
148
+ .video(0)
149
+ .overlay(overlay_file.hflip())
150
+ .drawbox(x="50", y="50", width="120", height="120", color="red", thickness="5")
151
+ .output(filename="out.mp4")
152
+ )
153
+ f
154
+ ```
155
+
156
+
157
+
158
+
159
+
160
+ ![svg](https://raw.githubusercontent.com/livingbio/typed-ffmpeg/main/docs/media/README_files/README_3_0.svg)
161
+
162
+
163
+
164
+
165
+ See the [Usage](https://livingbio.github.io/typed-ffmpeg/usage/typed/) section in our documentation for more examples and detailed guides.
166
+
167
+
168
+ ---
169
+
170
+ ## Acknowledgements
171
+
172
+ This project was initially inspired by the capabilities of GPT-3, with the original concept focusing on using GPT-3 to generate an FFmpeg filter SDK directly from the FFmpeg documentation. However, during the development process, I encountered limitations with GPT-3's ability to fully automate this task.
173
+
174
+ As a result, I shifted to traditional code generation methods to complete the SDK, ensuring a more robust and reliable tool. Despite this change in approach, both GitHub Copilot and GPT-3 were instrumental in accelerating the development process, providing valuable insights and saving significant time.
175
+
176
+ I would also like to extend my gratitude to the `ffmpeg-python` project, which inspired this project significantly. The API style and design ideas from `ffmpeg-python` have been influential, and I have utilized these aspects to shape the development of our SDK.
177
+
178
+ This project is dedicated to my son, Austin, on his seventh birthday (February 24, 2024), whose curiosity and zest for life continually inspire me.
179
+
180
+ ---
181
+
182
+ Feel free to check the [Documentation](https://livingbio.github.io/typed-ffmpeg/) for detailed information and more advanced features.
183
+
@@ -0,0 +1,45 @@
1
+ typed_ffmpeg/__init__.py,sha256=WnVr15iPyHWL5ZXtAKah50Jf-rR4QEA8qisBWhMY3KI,596
2
+ typed_ffmpeg/base.py,sha256=aa0-lPC_P_P61nnQRK0VR9a-b-XhNCPJUdtYWkQA6yE,3169
3
+ typed_ffmpeg/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ typed_ffmpeg/common/schema.py,sha256=9oiURyju0YDYPdhg0afrSQ1nOyAK-0v1xSkA6S7Psok,9460
5
+ typed_ffmpeg/common/serialize.py,sha256=LGBQm6-yNpktJKoHOg7tP7sgo75K54TSe1wGDF2NgZ4,3431
6
+ typed_ffmpeg/dag/__init__.py,sha256=EGMFaOLWrQRQdy8EJUJbaGLxv0w_H7Z9p6kXwbuXMwI,286
7
+ typed_ffmpeg/dag/compile.py,sha256=891eELZB_LeD6RSwRYFjBrcQmd7uvfFiOaQyp5LCUwU,1565
8
+ typed_ffmpeg/dag/context.py,sha256=BPd_sjumfibcu3YHdzRLLC6Vyf3K8_hewEfhBPWumWI,5804
9
+ typed_ffmpeg/dag/factory.py,sha256=uQQZmRp1wvpDKYIriBEZHu-gehEjLxxjWf6uZTnQNXI,1231
10
+ typed_ffmpeg/dag/global_runnable/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ typed_ffmpeg/dag/global_runnable/global_args.py,sha256=Kfgbv4f-ZidOSNmtQmYjvUC43PWbMH6f9RdElqj32lE,7536
12
+ typed_ffmpeg/dag/global_runnable/runnable.py,sha256=3rXAOeg6wKEekdm-g19WG5lG5igxuMLZ1JOiwSogIf8,5289
13
+ typed_ffmpeg/dag/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ typed_ffmpeg/dag/io/_input.py,sha256=Fh4VGE-y16VpeKBxeK3ovaZAFtEamo0YtmkTjceHAk4,7118
15
+ typed_ffmpeg/dag/io/_output.py,sha256=Atk4sgnuLV1ICcilSp9tm9mINmssJClx9lf--4CtoxM,12357
16
+ typed_ffmpeg/dag/io/output_args.py,sha256=xAWE-HEvzxtpe1DEIyR-NH1P_xBeEOYpmISGR-ErnLg,13832
17
+ typed_ffmpeg/dag/nodes.py,sha256=JrcUwWCL9qImS9K0bmS0cAw_U6na8-MTx-tjjWBxDMY,14366
18
+ typed_ffmpeg/dag/schema.py,sha256=WfY6gJtjnOxJV-Z5hdBcrKUYzpbHv4dT7mYs0Zv9lS0,5926
19
+ typed_ffmpeg/dag/utils.py,sha256=ooGrCOnsvRjjUMhC4JSCc3T2FRL1JLz0CeVSiE9f1hI,1141
20
+ typed_ffmpeg/dag/validate.py,sha256=smkTzh4ex6Omqcm5iUWeKX5-B8c4e0oTTVOGWSl9i5I,5786
21
+ typed_ffmpeg/exceptions.py,sha256=Zz-lKGildItY9a3dD1NHqx5b1U9hO6splbtA8JGce0U,968
22
+ typed_ffmpeg/filters.py,sha256=dp8iQ2KJZF-iuaX6iIG5bIH7c0xOFqzEfoTIKuUULC8,106428
23
+ typed_ffmpeg/probe.py,sha256=srLG1HIK4V4bX3GdgETiLrkc7LJuTAoG7B36L6htteQ,1408
24
+ typed_ffmpeg/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
+ typed_ffmpeg/schema.py,sha256=5ITK1t7g_OLZRyuN69DI920wERsxZZxrV3mV57tql7A,534
26
+ typed_ffmpeg/streams/__init__.py,sha256=Nt9uWpcVI1sQLl5Qt_kBCBcWOGZA1vczCQ0qvFbSko0,141
27
+ typed_ffmpeg/streams/audio.py,sha256=0DoM3A-BQsw2mwOdDah18QK4j8hj_AQw6AUjue1Dj1M,238390
28
+ typed_ffmpeg/streams/av.py,sha256=SWcy8Q9hk36ZZJ4WosG08NR-r1f2IzOgZ4tsAZ7nX18,544
29
+ typed_ffmpeg/streams/channel_layout.py,sha256=ocRb1HM9QgAH4xL0liVs-lXq0WaZyRu1agWz4CaLssU,662
30
+ typed_ffmpeg/streams/video.py,sha256=xutOi6Vmdn5OBbg5eGR2ldBd5htF8TaeS1BTfOsJqSM,421829
31
+ typed_ffmpeg/types.py,sha256=ly3zLtg7KxRa_jsDDrFPAxRZRjTQdWVpiQzOD9NdrFM,4137
32
+ typed_ffmpeg/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ typed_ffmpeg/utils/escaping.py,sha256=zGwBMq9DDqy1HCfa8jof_Kx9pwz1iB7MfrPByUXTd6Y,1208
34
+ typed_ffmpeg/utils/lazy_eval/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
+ typed_ffmpeg/utils/lazy_eval/operator.py,sha256=AFUUdse1M5QvyO6i78xO3e3hxG2lwITSmgywsQbDWNs,2787
36
+ typed_ffmpeg/utils/lazy_eval/schema.py,sha256=JCiwxNElHzeSm5ehfgpwgV1fNbZ7cuQzs2u605zEw5Q,4840
37
+ typed_ffmpeg/utils/run.py,sha256=OotkfIFCU9KD_SzhigCtUeqqvcEWlFiMUsBcxms1k3M,709
38
+ typed_ffmpeg/utils/snapshot.py,sha256=OTEH0Eyzam_r1i5oIC0nKD3hGpVmq4aV5TB2qd5hKuM,813
39
+ typed_ffmpeg/utils/typing.py,sha256=sx4IN38NGQxgMs5GOtPouM02TcHINxvTreXPUbAbGRc,316
40
+ typed_ffmpeg/utils/view.py,sha256=rS8gC_uwlUs9Y5UQFj1ur2NjVbZXkZGdGHND0btJpuM,1705
41
+ typed_ffmpeg_compatible-2.1.0.dist-info/LICENSE,sha256=8Aaya5i_09Cou2i3QMxTwz6uHGzi_fGA4uhkco07-A4,1066
42
+ typed_ffmpeg_compatible-2.1.0.dist-info/METADATA,sha256=qoyJweMArOyQkumRyFN33enQp0ozB32QFP86JPzurL8,7300
43
+ typed_ffmpeg_compatible-2.1.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
44
+ typed_ffmpeg_compatible-2.1.0.dist-info/entry_points.txt,sha256=KfZmNsM16GT_lF1otASIN6E3i6xXHXoB1gMeEdlptjA,44
45
+ typed_ffmpeg_compatible-2.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 1.9.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ scripts=scripts.main:app
3
+