File size: 2,778 Bytes
9cddcfd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Metadata-Version: 2.1
Name: ffmpy
Version: 0.3.1
Summary: A simple Python wrapper for ffmpeg
Home-page: https://github.com/Ch00k/ffmpy
Author: Andrii Yurchuk
Author-email: ay@mntw.re
License: MIT
Keywords: ffmpeg ffprobe wrapper audio video transcoding
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: BSD
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
License-File: LICENSE

.. image:: https://github.com/Ch00k/ffmpy/workflows/test/badge.svg
    :target: https://github.com/Ch00k/ffmpy/actions
    :alt: Tests

.. image:: https://codecov.io/gh/Ch00k/ffmpy/branch/master/graphs/badge.svg
    :target: https://codecov.io/github/Ch00k/ffmpy
    :alt: Coverage

.. image:: https://readthedocs.org/projects/ffmpy/badge/?version=latest
    :target: http://ffmpy.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation

.. image:: https://img.shields.io/pypi/v/ffmpy.svg
    :target: https://pypi.python.org/pypi/ffmpy
    :alt: Latest version


ffmpy
=====
ffmpy is a simplistic `FFmpeg <http://ffmpeg.org/>`_ command line wrapper. It implements a Pythonic interface for FFmpeg command line compilation and uses Python `subprocess <https://docs.python.org/2/library/subprocess.html>`_ module to execute compiled command line.

Installation
------------
You guessed it::

  pip install ffmpy

Quick example
-------------
.. code:: python

  >>> import ffmpy
  >>> ff = ffmpy.FFmpeg(
  ...     inputs={'input.mp4': None},
  ...     outputs={'output.avi': None}
  ... )
  >>> ff.run()

This will take ``input.mp4`` file in the current directory as the input, change the video container from MP4 to AVI without changing any other video parameters and create a new output file ``output.avi`` in the current directory.

Documentation
-------------
http://ffmpy.rtfd.io

See `Examples <http://ffmpy.readthedocs.io/en/latest/examples.html>`_ section for usage examples.

License
-------
ffmpy is licensed under the terms of MIT license