ffmpeg-python
Advanced tools
| Metadata-Version: 1.1 | ||
| Name: ffmpeg-python | ||
| Version: 0.1.15 | ||
| Version: 0.1.16 | ||
| Summary: Python bindings for FFmpeg - with complex filtering support | ||
@@ -9,3 +9,3 @@ Home-page: https://github.com/kkroening/ffmpeg-python | ||
| License: UNKNOWN | ||
| Download-URL: https://github.com/kkroening/ffmpeg-python/archive/v0.1.15.zip | ||
| Download-URL: https://github.com/kkroening/ffmpeg-python/archive/v0.1.16.zip | ||
| Description: ffmpeg-python: Python bindings for FFmpeg | ||
@@ -12,0 +12,0 @@ ========================================= |
+12
-3
@@ -28,3 +28,3 @@ from __future__ import unicode_literals | ||
| @filter_operator() | ||
| def filter_(stream_spec, filter_name, *args, **kwargs): | ||
| def filter(stream_spec, filter_name, *args, **kwargs): | ||
| """Apply custom filter. | ||
@@ -46,3 +46,3 @@ | ||
| ``ffmpeg.input('in.mp4').filter_('hflip').output('out.mp4').run()`` | ||
| ``ffmpeg.input('in.mp4').filter('hflip').output('out.mp4').run()`` | ||
| """ | ||
@@ -53,2 +53,10 @@ return filter_multi_output(stream_spec, filter_name, *args, **kwargs).stream() | ||
| @filter_operator() | ||
| def filter_(stream_spec, filter_name, *args, **kwargs): | ||
| """Alternate name for ``filter``, so as to not collide with the | ||
| built-in python ``filter`` operator. | ||
| """ | ||
| return filter(stream_spec, filter_name, *args, **kwargs) | ||
| @filter_operator() | ||
| def split(stream): | ||
@@ -349,3 +357,3 @@ return FilterNode(stream, split.__name__) | ||
| kwargs['y'] = y | ||
| return filter_(stream, drawtext.__name__, **kwargs) | ||
| return filter(stream, drawtext.__name__, **kwargs) | ||
@@ -439,2 +447,3 @@ | ||
| 'drawtext', | ||
| 'filter', | ||
| 'filter_', | ||
@@ -441,0 +450,0 @@ 'filter_multi_output', |
+10
-4
@@ -60,3 +60,3 @@ from __future__ import unicode_literals | ||
| def _format_input_stream_name(stream_name_map, edge): | ||
| def _format_input_stream_name(stream_name_map, edge, is_final_arg=False): | ||
| prefix = stream_name_map[edge.upstream_node, edge.upstream_label] | ||
@@ -67,3 +67,9 @@ if not edge.upstream_selector: | ||
| suffix = ':{}'.format(edge.upstream_selector) | ||
| return '[{}{}]'.format(prefix, suffix) | ||
| if is_final_arg and isinstance(edge.upstream_node, InputNode): | ||
| ## Special case: `-map` args should not have brackets for input | ||
| ## nodes. | ||
| fmt = '{}{}' | ||
| else: | ||
| fmt = '[{}{}]' | ||
| return fmt.format(prefix, suffix) | ||
@@ -118,4 +124,4 @@ | ||
| # edge = node.incoming_edges[0] | ||
| stream_name = _format_input_stream_name(stream_name_map, edge) | ||
| if stream_name != '[0]' or len(node.incoming_edges) > 1: | ||
| stream_name = _format_input_stream_name(stream_name_map, edge, is_final_arg=True) | ||
| if stream_name != '0' or len(node.incoming_edges) > 1: | ||
| args += ['-map', stream_name] | ||
@@ -122,0 +128,0 @@ |
+2
-2
@@ -56,3 +56,3 @@ from __future__ import unicode_literals | ||
| input = ffmpeg.input('in.mp4') | ||
| audio = input[:'a'].filter_("aecho", 0.8, 0.9, 1000, 0.3) | ||
| audio = input[:'a'].filter("aecho", 0.8, 0.9, 1000, 0.3) | ||
| video = input[:'v'].hflip() | ||
@@ -145,3 +145,3 @@ out = ffmpeg.output(audio, video, 'out.mp4') | ||
| input = ffmpeg.input('in.mp4') | ||
| audio = input[:'a'].filter_("aecho", 0.8, 0.9, 1000, 0.3) | ||
| audio = input[:'a'].filter("aecho", 0.8, 0.9, 1000, 0.3) | ||
| video = input[:'v'].hflip() | ||
@@ -148,0 +148,0 @@ out = ffmpeg.output(audio, video, 'out.mp4') |
+2
-2
| Metadata-Version: 1.1 | ||
| Name: ffmpeg-python | ||
| Version: 0.1.15 | ||
| Version: 0.1.16 | ||
| Summary: Python bindings for FFmpeg - with complex filtering support | ||
@@ -9,3 +9,3 @@ Home-page: https://github.com/kkroening/ffmpeg-python | ||
| License: UNKNOWN | ||
| Download-URL: https://github.com/kkroening/ffmpeg-python/archive/v0.1.15.zip | ||
| Download-URL: https://github.com/kkroening/ffmpeg-python/archive/v0.1.16.zip | ||
| Description: ffmpeg-python: Python bindings for FFmpeg | ||
@@ -12,0 +12,0 @@ ========================================= |
+11
-7
@@ -26,3 +26,4 @@ # ffmpeg-python: Python bindings for FFmpeg | ||
| import ffmpeg | ||
| (ffmpeg | ||
| ( | ||
| ffmpeg | ||
| .input('input.mp4') | ||
@@ -58,3 +59,4 @@ .hflip() | ||
| overlay_file = ffmpeg.input('overlay.png') | ||
| (ffmpeg | ||
| ( | ||
| ffmpeg | ||
| .concat( | ||
@@ -122,6 +124,6 @@ in_file.trim(start_frame=10, end_frame=20), | ||
| Don't see the filter you're looking for? `ffmpeg-python` includes , but it's easy to use any arbitrary ffmpeg filter: | ||
| Don't see the filter you're looking for? `ffmpeg-python` includes shorthand notation for some of the most commonly used filters (such as `concat`), but it's easy to use any arbitrary ffmpeg filter: | ||
| ```python | ||
| stream = ffmpeg.input('dummy.mp4') | ||
| stream = ffmpeg.filter_(stream, 'fps', fps=25, round='up') | ||
| stream = ffmpeg.filter(stream, 'fps', fps=25, round='up') | ||
| stream = ffmpeg.output(stream, 'dummy2.mp4') | ||
@@ -133,5 +135,6 @@ ffmpeg.run(stream) | ||
| ```python | ||
| (ffmpeg | ||
| ( | ||
| ffmpeg | ||
| .input('dummy.mp4') | ||
| .filter_('fps', fps=25, round='up') | ||
| .filter('fps', fps=25, round='up') | ||
| .output('dummy2.mp4') | ||
@@ -144,3 +147,4 @@ .run() | ||
| ```python | ||
| (ffmpeg | ||
| ( | ||
| ffmpeg | ||
| .input('dummy.mp4') | ||
@@ -147,0 +151,0 @@ .output('dummy2.mp4', **{'qscale:v': 3}) |
+1
-1
| from setuptools import setup | ||
| from textwrap import dedent | ||
| version = '0.1.15' | ||
| version = '0.1.16' | ||
| download_url = 'https://github.com/kkroening/ffmpeg-python/archive/v{}.zip'.format(version) | ||
@@ -6,0 +6,0 @@ |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
69031
0.88%1241
1.06%