Merge branch 'master' into stream_selectors

This commit is contained in:
Davide Depau 2018-01-12 21:55:38 +01:00 committed by GitHub
commit ef9b102676
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 540 additions and 156 deletions

View File

@ -11,9 +11,6 @@ matrix:
- python: 2.7
env:
- TOX_ENV=py27
- python: 3.3
env:
- TOX_ENV=py33
- python: 3.4
env:
- TOX_ENV=py34

208
LICENSE
View File

@ -1,13 +1,201 @@
Copyright 2017 Karl Kroening
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
http://www.apache.org/licenses/LICENSE-2.0
1. Definitions.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2017 Karl Kroening
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -2,7 +2,7 @@
[![Build status](https://travis-ci.org/kkroening/ffmpeg-python.svg?branch=master)](https://travis-ci.org/kkroening/ffmpeg-python)
<img src="https://ibin.co/3g6Z1Duj7SVU.png" alt="ffmpeg-python logo" width="60%" />
<img src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/doc/formula.png" alt="ffmpeg-python logo" width="60%" />
## Overview
@ -12,7 +12,7 @@ There are tons of Python FFmpeg wrappers out there but they seem to lack complex
## Quickstart
Flip a video horizontally:
```
```python
import ffmpeg
stream = ffmpeg.input('input.mp4')
stream = ffmpeg.hflip(stream)
@ -21,7 +21,7 @@ ffmpeg.run(stream)
```
Or if you prefer a fluent interface:
```
```python
import ffmpeg
(ffmpeg
.input('input.mp4')
@ -39,7 +39,7 @@ Take for example a signal graph that looks like this:
![Signal graph](https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/doc/graph1.png)
The corresponding command-line arguments are pretty gnarly:
```
```bash
ffmpeg -i input.mp4 \
-filter_complex "\
[0]trim=start_frame=10:end_frame=20[v0];\
@ -54,7 +54,7 @@ ffmpeg -i input.mp4 \
Maybe this looks great to you, but if you're not an FFmpeg command-line expert, it probably looks alien.
If you're like me and find Python to be powerful and readable, it's easy with `ffmpeg-python`:
```
```python
import ffmpeg
in_file = ffmpeg.input('input.mp4')
@ -87,7 +87,8 @@ pip install ffmpeg-python
```
It's also possible to clone the source and put it on your python path (`$PYTHONPATH`, `sys.path`, etc.):
```
```bash
$ git clone git@github.com:kkroening/ffmpeg-python.git
$ export PYTHONPATH=${PYTHONPATH}:ffmpeg-python
$ python
@ -99,7 +100,8 @@ $ python
API documentation is automatically generated from python docstrings and hosted on github pages: https://kkroening.github.io/ffmpeg-python/
Alternatively, standard python help is available, such as at the python REPL prompt as follows:
```
```python
>>> import ffmpeg
>>> help(ffmpeg)
```
@ -107,7 +109,7 @@ Alternatively, standard python help is available, such as at the python REPL pro
## Custom Filters
Don't see the filter you're looking for? `ffmpeg-python` is a work in progress, 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.output(stream, 'dummy2.mp4')
@ -115,7 +117,7 @@ ffmpeg.run(stream)
```
Or fluently:
```
```python
(ffmpeg
.input('dummy.mp4')
.filter_('fps', fps=25, round='up')
@ -128,7 +130,7 @@ When in doubt, refer to the [existing filters](https://github.com/kkroening/ffmp
## Contributing
<img align="right" src="https://ibin.co/3g6U1BtizfZG.png" alt="ffmpeg-python logo" width="20%" />
<img align="right" src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/doc/logo.png" alt="ffmpeg-python logo" width="20%" />
Feel free to report any bugs or feature requests.

BIN
doc/formula.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
doc/formula.xcf Normal file

Binary file not shown.

View File

@ -445,10 +445,14 @@ dd {
margin-left: 30px;
}
dt:target, .highlighted {
dt:target, span.highlighted {
background-color: #fbe54e;
}
rect.highlighted {
fill: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;

View File

@ -45,7 +45,7 @@ jQuery.urlencode = encodeURIComponent;
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s == 'undefined')
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
@ -66,29 +66,53 @@ jQuery.getQueryParameters = function(s) {
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node) {
if (node.nodeType == 3) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
var span = document.createElement("span");
span.className = className;
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var bbox = span.getBBox();
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
var parentOfText = node.parentNode.parentNode;
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this);
highlight(this, addItems);
});
}
}
return this.each(function() {
highlight(this);
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
@ -131,21 +155,21 @@ var Documentation = {
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated == 'undefined')
if (typeof translated === 'undefined')
return string;
return (typeof translated == 'string') ? translated : translated[0];
return (typeof translated === 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated == 'undefined')
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
@ -216,7 +240,7 @@ var Documentation = {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) == 'minus.png')
if (src.substr(-9) === 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
@ -248,7 +272,7 @@ var Documentation = {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this == '..')
if (this === '..')
parts.pop();
});
var url = parts.join('/');

View File

@ -16,7 +16,7 @@
body {
font-family: Arial, sans-serif;
font-size: 100%;
background-color: #111;
background-color: #fff;
color: #555;
margin: 0;
padding: 0;

View File

@ -540,6 +540,9 @@ var Search = {
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
var suffix = DOCUMENTATION_OPTIONS.SOURCELINK_SUFFIX;
if (suffix === undefined) {
suffix = '.txt';
}
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[5] + (item[5].slice(-suffix.length) === suffix ? '' : suffix),
dataType: "text",
complete: function(jqxhr, textstatus) {

View File

@ -6,12 +6,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &#8212; ffmpeg-python documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
@ -74,6 +71,8 @@
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#ffmpeg.concat">concat() (in module ffmpeg)</a>
</li>
<li><a href="index.html#ffmpeg.crop">crop() (in module ffmpeg)</a>
</li>
</ul></td>
</tr></table>
@ -82,6 +81,10 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#ffmpeg.drawbox">drawbox() (in module ffmpeg)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#ffmpeg.drawtext">drawtext() (in module ffmpeg)</a>
</li>
</ul></td>
</tr></table>
@ -94,8 +97,6 @@
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#ffmpeg.filter_">filter_() (in module ffmpeg)</a>
</li>
<li><a href="index.html#ffmpeg.filter_multi">filter_multi() (in module ffmpeg)</a>
</li>
</ul></td>
</tr></table>
@ -178,6 +179,10 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#ffmpeg.vflip">vflip() (in module ffmpeg)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#ffmpeg.view">view() (in module ffmpeg)</a>
</li>
</ul></td>
</tr></table>
@ -228,7 +233,7 @@
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2017, Karl Kroening.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.2.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.5.
</div>
</body>
</html>

View File

@ -5,12 +5,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ffmpeg-python: Python bindings for FFmpeg &#8212; ffmpeg-python documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
@ -60,14 +57,14 @@
</div>
<span class="target" id="module-ffmpeg"></span><dl class="function">
<dt id="ffmpeg.colorchannelmixer">
<code class="descclassname">ffmpeg.</code><code class="descname">colorchannelmixer</code><span class="sig-paren">(</span><em>parent_node</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.colorchannelmixer" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">colorchannelmixer</code><span class="sig-paren">(</span><em>stream</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.colorchannelmixer" title="Permalink to this definition"></a></dt>
<dd><p>Adjust video input frames by re-mixing color channels.</p>
<p>Official documentation: <a class="reference external" href="https://ffmpeg.org/ffmpeg-filters.html#colorchannelmixer">colorchannelmixer</a></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.concat">
<code class="descclassname">ffmpeg.</code><code class="descname">concat</code><span class="sig-paren">(</span><em>*parent_nodes</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.concat" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">concat</code><span class="sig-paren">(</span><em>*streams</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.concat" title="Permalink to this definition"></a></dt>
<dd><p>Concatenate audio and video streams, joining them together one after the other.</p>
<p>The filter works on segments of synchronized video and audio streams. All segments must have the same number of
streams of each type, and that will also be the number of streams at output.</p>
@ -92,9 +89,32 @@ output file to handle it.</p>
<p>Official documentation: <a class="reference external" href="https://ffmpeg.org/ffmpeg-filters.html#concat">concat</a></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.crop">
<code class="descclassname">ffmpeg.</code><code class="descname">crop</code><span class="sig-paren">(</span><em>stream</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.crop" title="Permalink to this definition"></a></dt>
<dd><p>Crop the input video.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>x</strong> The horizontal position, in the input video, of the left edge of
the output video.</li>
<li><strong>y</strong> The vertical position, in the input video, of the top edge of the
output video.</li>
<li><strong>width</strong> The width of the output video. Must be greater than 0.</li>
<li><strong>heigth</strong> The height of the output video. Must be greater than 0.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Official documentation: <a class="reference external" href="https://ffmpeg.org/ffmpeg-filters.html#crop">crop</a></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.drawbox">
<code class="descclassname">ffmpeg.</code><code class="descname">drawbox</code><span class="sig-paren">(</span><em>parent_node</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em>, <em>color</em>, <em>thickness=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.drawbox" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">drawbox</code><span class="sig-paren">(</span><em>stream</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em>, <em>color</em>, <em>thickness=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.drawbox" title="Permalink to this definition"></a></dt>
<dd><p>Draw a colored box on the input image.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -121,10 +141,156 @@ video with inverted luma.</li>
<p>Official documentation: <a class="reference external" href="https://ffmpeg.org/ffmpeg-filters.html#drawbox">drawbox</a></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.drawtext">
<code class="descclassname">ffmpeg.</code><code class="descname">drawtext</code><span class="sig-paren">(</span><em>stream</em>, <em>text=None</em>, <em>x=0</em>, <em>y=0</em>, <em>escape_text=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.drawtext" title="Permalink to this definition"></a></dt>
<dd><p>Draw a text string or text from a specified file on top of a video, using the libfreetype library.</p>
<p>To enable compilation of this filter, you need to configure FFmpeg with <code class="docutils literal"><span class="pre">--enable-libfreetype</span></code>. To enable default
font fallback and the font option you need to configure FFmpeg with <code class="docutils literal"><span class="pre">--enable-libfontconfig</span></code>. To enable the
text_shaping option, you need to configure FFmpeg with <code class="docutils literal"><span class="pre">--enable-libfribidi</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>box</strong> Used to draw a box around text using the background color. The value must be either 1 (enable) or 0
(disable). The default value of box is 0.</li>
<li><strong>boxborderw</strong> Set the width of the border to be drawn around the box using boxcolor. The default value of
boxborderw is 0.</li>
<li><strong>boxcolor</strong> The color to be used for drawing box around text. For the syntax of this option, check the “Color”
section in the ffmpeg-utils manual. The default value of boxcolor is “white”.</li>
<li><strong>line_spacing</strong> Set the line spacing in pixels of the border to be drawn around the box using box. The default
value of line_spacing is 0.</li>
<li><strong>borderw</strong> Set the width of the border to be drawn around the text using bordercolor. The default value of
borderw is 0.</li>
<li><strong>bordercolor</strong> Set the color to be used for drawing border around text. For the syntax of this option, check the
“Color” section in the ffmpeg-utils manual. The default value of bordercolor is “black”.</li>
<li><strong>expansion</strong> Select how the text is expanded. Can be either none, strftime (deprecated) or normal (default). See
the Text expansion section below for details.</li>
<li><strong>basetime</strong> Set a start time for the count. Value is in microseconds. Only applied in the deprecated strftime
expansion mode. To emulate in normal expansion mode use the pts function, supplying the start time (in
seconds) as the second argument.</li>
<li><strong>fix_bounds</strong> If true, check and fix text coords to avoid clipping.</li>
<li><strong>fontcolor</strong> The color to be used for drawing fonts. For the syntax of this option, check the “Color” section in
the ffmpeg-utils manual. The default value of fontcolor is “black”.</li>
<li><strong>fontcolor_expr</strong> String which is expanded the same way as text to obtain dynamic fontcolor value. By default
this option has empty value and is not processed. When this option is set, it overrides fontcolor option.</li>
<li><strong>font</strong> The font family to be used for drawing text. By default Sans.</li>
<li><strong>fontfile</strong> The font file to be used for drawing text. The path must be included. This parameter is mandatory if
the fontconfig support is disabled.</li>
<li><strong>alpha</strong> Draw the text applying alpha blending. The value can be a number between 0.0 and 1.0. The expression
accepts the same variables x, y as well. The default value is 1. Please see fontcolor_expr.</li>
<li><strong>fontsize</strong> The font size to be used for drawing text. The default value of fontsize is 16.</li>
<li><strong>text_shaping</strong> If set to 1, attempt to shape the text (for example, reverse the order of right-to-left text and
join Arabic characters) before drawing it. Otherwise, just draw the text exactly as given. By default 1 (if
supported).</li>
<li><strong>ft_load_flags</strong> <p>The flags to be used for loading the fonts. The flags map the corresponding flags supported by
libfreetype, and are a combination of the following values:</p>
<ul>
<li><code class="docutils literal"><span class="pre">default</span></code></li>
<li><code class="docutils literal"><span class="pre">no_scale</span></code></li>
<li><code class="docutils literal"><span class="pre">no_hinting</span></code></li>
<li><code class="docutils literal"><span class="pre">render</span></code></li>
<li><code class="docutils literal"><span class="pre">no_bitmap</span></code></li>
<li><code class="docutils literal"><span class="pre">vertical_layout</span></code></li>
<li><code class="docutils literal"><span class="pre">force_autohint</span></code></li>
<li><code class="docutils literal"><span class="pre">crop_bitmap</span></code></li>
<li><code class="docutils literal"><span class="pre">pedantic</span></code></li>
<li><code class="docutils literal"><span class="pre">ignore_global_advance_width</span></code></li>
<li><code class="docutils literal"><span class="pre">no_recurse</span></code></li>
<li><code class="docutils literal"><span class="pre">ignore_transform</span></code></li>
<li><code class="docutils literal"><span class="pre">monochrome</span></code></li>
<li><code class="docutils literal"><span class="pre">linear_design</span></code></li>
<li><code class="docutils literal"><span class="pre">no_autohint</span></code></li>
</ul>
<p>Default value is “default”. For more information consult the documentation for the FT_LOAD_* libfreetype
flags.</p>
</li>
<li><strong>shadowcolor</strong> The color to be used for drawing a shadow behind the drawn text. For the syntax of this option,
check the “Color” section in the ffmpeg-utils manual. The default value of shadowcolor is “black”.</li>
<li><strong>shadowx</strong> The x offset for the text shadow position with respect to the position of the text. It can be either
positive or negative values. The default value is “0”.</li>
<li><strong>shadowy</strong> The y offset for the text shadow position with respect to the position of the text. It can be either
positive or negative values. The default value is “0”.</li>
<li><strong>start_number</strong> The starting frame number for the n/frame_num variable. The default value is “0”.</li>
<li><strong>tabsize</strong> The size in number of spaces to use for rendering the tab. Default value is 4.</li>
<li><strong>timecode</strong> Set the initial timecode representation in “hh:mm:ss[:;.]ff” format. It can be used with or without
text parameter. timecode_rate option must be specified.</li>
<li><strong>rate</strong> Set the timecode frame rate (timecode only).</li>
<li><strong>timecode_rate</strong> Alias for <code class="docutils literal"><span class="pre">rate</span></code>.</li>
<li><strong>r</strong> Alias for <code class="docutils literal"><span class="pre">rate</span></code>.</li>
<li><strong>tc24hmax</strong> If set to 1, the output of the timecode option will wrap around at 24 hours. Default is 0 (disabled).</li>
<li><strong>text</strong> The text string to be drawn. The text must be a sequence of UTF-8 encoded characters. This parameter is
mandatory if no file is specified with the parameter textfile.</li>
<li><strong>textfile</strong> A text file containing text to be drawn. The text must be a sequence of UTF-8 encoded characters.
This parameter is mandatory if no text string is specified with the parameter text. If both text and
textfile are specified, an error is thrown.</li>
<li><strong>reload</strong> If set to 1, the textfile will be reloaded before each frame. Be sure to update it atomically, or it
may be read partially, or even fail.</li>
<li><strong>x</strong> The expression which specifies the offset where text will be drawn within the video frame. It is relative to
the left border of the output image. The default value is “0”.</li>
<li><strong>y</strong> The expression which specifies the offset where text will be drawn within the video frame. It is relative to
the top border of the output image. The default value is “0”. See below for the list of accepted constants
and functions.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>Expression constants:</dt>
<dd><dl class="first docutils">
<dt>The parameters for x and y are expressions containing the following constants and functions:</dt>
<dd><ul class="first last simple">
<li>dar: input display aspect ratio, it is the same as <code class="docutils literal"><span class="pre">(w</span> <span class="pre">/</span> <span class="pre">h)</span> <span class="pre">*</span> <span class="pre">sar</span></code></li>
<li>hsub: horizontal chroma subsample values. For example for the pixel format “yuv422p” hsub is 2 and vsub
is 1.</li>
<li>vsub: vertical chroma subsample values. For example for the pixel format “yuv422p” hsub is 2 and vsub
is 1.</li>
<li>line_h: the height of each text line</li>
<li>lh: Alias for <code class="docutils literal"><span class="pre">line_h</span></code>.</li>
<li>main_h: the input height</li>
<li>h: Alias for <code class="docutils literal"><span class="pre">main_h</span></code>.</li>
<li>H: Alias for <code class="docutils literal"><span class="pre">main_h</span></code>.</li>
<li>main_w: the input width</li>
<li>w: Alias for <code class="docutils literal"><span class="pre">main_w</span></code>.</li>
<li>W: Alias for <code class="docutils literal"><span class="pre">main_w</span></code>.</li>
<li>ascent: the maximum distance from the baseline to the highest/upper grid coordinate used to place a glyph
outline point, for all the rendered glyphs. It is a positive value, due to the grids orientation with the Y
axis upwards.</li>
<li>max_glyph_a: Alias for <code class="docutils literal"><span class="pre">ascent</span></code>.</li>
<li>descent: the maximum distance from the baseline to the lowest grid coordinate used to place a glyph outline
point, for all the rendered glyphs. This is a negative value, due to the grids orientation, with the Y axis
upwards.</li>
<li>max_glyph_d: Alias for <code class="docutils literal"><span class="pre">descent</span></code>.</li>
<li>max_glyph_h: maximum glyph height, that is the maximum height for all the glyphs contained in the rendered
text, it is equivalent to ascent - descent.</li>
<li>max_glyph_w: maximum glyph width, that is the maximum width for all the glyphs contained in the rendered
text.</li>
<li>n: the number of input frame, starting from 0</li>
<li>rand(min, max): return a random number included between min and max</li>
<li>sar: The input sample aspect ratio.</li>
<li>t: timestamp expressed in seconds, NAN if the input timestamp is unknown</li>
<li>text_h: the height of the rendered text</li>
<li>th: Alias for <code class="docutils literal"><span class="pre">text_h</span></code>.</li>
<li>text_w: the width of the rendered text</li>
<li>tw: Alias for <code class="docutils literal"><span class="pre">text_w</span></code>.</li>
<li>x: the x offset coordinates where the text is drawn.</li>
<li>y: the y offset coordinates where the text is drawn.</li>
</ul>
</dd>
</dl>
<p class="last">These parameters allow the x and y expressions to refer each other, so you can for example specify
<code class="docutils literal"><span class="pre">y=x/dar</span></code>.</p>
</dd>
</dl>
<p>Official documentation: <a class="reference external" href="https://ffmpeg.org/ffmpeg-filters.html#drawtext">drawtext</a></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.filter_">
<code class="descclassname">ffmpeg.</code><code class="descname">filter_</code><span class="sig-paren">(</span><em>parent_node</em>, <em>filter_name</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.filter_" title="Permalink to this definition"></a></dt>
<dd><p>Apply custom single-source filter.</p>
<code class="descclassname">ffmpeg.</code><code class="descname">filter_</code><span class="sig-paren">(</span><em>stream_spec</em>, <em>filter_name</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.filter_" title="Permalink to this definition"></a></dt>
<dd><p>Apply custom filter.</p>
<p><code class="docutils literal"><span class="pre">filter_</span></code> is normally used by higher-level filter functions such as <code class="docutils literal"><span class="pre">hflip</span></code>, but if a filter implementation
is missing from <code class="docutils literal"><span class="pre">fmpeg-python</span></code>, you can call <code class="docutils literal"><span class="pre">filter_</span></code> directly to have <code class="docutils literal"><span class="pre">fmpeg-python</span></code> pass the filter name
and arguments to ffmpeg verbatim.</p>
@ -133,7 +299,7 @@ and arguments to ffmpeg verbatim.</p>
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>parent_node</strong> Source stream to apply filter to.</li>
<li><strong>stream_spec</strong> a Stream, list of Streams, or label-to-Stream dictionary mapping</li>
<li><strong>filter_name</strong> ffmpeg filter name, e.g. <cite>colorchannelmixer</cite></li>
<li><strong>*args</strong> list of args to pass to ffmpeg verbatim</li>
<li><strong>**kwargs</strong> list of keyword-args to pass to ffmpeg verbatim</li>
@ -142,51 +308,21 @@ and arguments to ffmpeg verbatim.</p>
</tr>
</tbody>
</table>
<p>This function is used internally by all of the other single-source filters (e.g. <code class="docutils literal"><span class="pre">hflip</span></code>, <code class="docutils literal"><span class="pre">crop</span></code>, etc.).
For custom multi-source filters, see <code class="docutils literal"><span class="pre">filter_multi</span></code> instead.</p>
<p>The function name is suffixed with <code class="docutils literal"><span class="pre">_</span></code> in order avoid confusion with the standard python <code class="docutils literal"><span class="pre">filter</span></code> function.</p>
<p class="rubric">Example</p>
<p><code class="docutils literal"><span class="pre">ffmpeg.input('in.mp4').filter_('hflip').output('out.mp4').run()</span></code></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.filter_multi">
<code class="descclassname">ffmpeg.</code><code class="descname">filter_multi</code><span class="sig-paren">(</span><em>parent_nodes</em>, <em>filter_name</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.filter_multi" title="Permalink to this definition"></a></dt>
<dd><p>Apply custom multi-source filter.</p>
<p>This is nearly identical to the <code class="docutils literal"><span class="pre">filter</span></code> function except that it allows filters to be applied to multiple
streams. Its normally used by higher-level filter functions such as <code class="docutils literal"><span class="pre">concat</span></code>, but if a filter implementation
is missing from <code class="docutils literal"><span class="pre">fmpeg-python</span></code>, you can call <code class="docutils literal"><span class="pre">filter_multi</span></code> directly.</p>
<p>Note that because it applies to multiple streams, it cant be used as an operator, unlike the <code class="docutils literal"><span class="pre">filter</span></code> function
(e.g. <code class="docutils literal"><span class="pre">ffmpeg.input('in.mp4').filter_('hflip')</span></code>)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>parent_nodes</strong> List of source streams to apply filter to.</li>
<li><strong>filter_name</strong> ffmpeg filter name, e.g. <cite>concat</cite></li>
<li><strong>*args</strong> list of args to pass to ffmpeg verbatim</li>
<li><strong>**kwargs</strong> list of keyword-args to pass to ffmpeg verbatim</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>For custom single-source filters, see <code class="docutils literal"><span class="pre">filter_multi</span></code> instead.</p>
<p class="rubric">Example</p>
<p><code class="docutils literal"><span class="pre">ffmpeg.filter_multi(ffmpeg.input('in1.mp4'),</span> <span class="pre">ffmpeg.input('in2.mp4'),</span> <span class="pre">'concat',</span> <span class="pre">n=2).output('out.mp4').run()</span></code></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.hflip">
<code class="descclassname">ffmpeg.</code><code class="descname">hflip</code><span class="sig-paren">(</span><em>parent_node</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.hflip" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">hflip</code><span class="sig-paren">(</span><em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.hflip" title="Permalink to this definition"></a></dt>
<dd><p>Flip the input video horizontally.</p>
<p>Official documentation: <a class="reference external" href="https://ffmpeg.org/ffmpeg-filters.html#hflip">hflip</a></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.hue">
<code class="descclassname">ffmpeg.</code><code class="descname">hue</code><span class="sig-paren">(</span><em>parent_node</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.hue" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">hue</code><span class="sig-paren">(</span><em>stream</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.hue" title="Permalink to this definition"></a></dt>
<dd><p>Modify the hue and/or the saturation of the input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -207,7 +343,7 @@ is missing from <code class="docutils literal"><span class="pre">fmpeg-python</s
<dl class="function">
<dt id="ffmpeg.overlay">
<code class="descclassname">ffmpeg.</code><code class="descname">overlay</code><span class="sig-paren">(</span><em>main_parent_node</em>, <em>overlay_parent_node</em>, <em>eof_action=urepeat</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.overlay" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">overlay</code><span class="sig-paren">(</span><em>main_parent_node</em>, <em>overlay_parent_node</em>, <em>eof_action=u'repeat'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.overlay" title="Permalink to this definition"></a></dt>
<dd><p>Overlay one video on top of another.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -266,7 +402,7 @@ the stream. A value of 0 disables this behavior. Default value is 1.</li>
<dl class="function">
<dt id="ffmpeg.setpts">
<code class="descclassname">ffmpeg.</code><code class="descname">setpts</code><span class="sig-paren">(</span><em>parent_node</em>, <em>expr</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.setpts" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">setpts</code><span class="sig-paren">(</span><em>stream</em>, <em>expr</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.setpts" title="Permalink to this definition"></a></dt>
<dd><p>Change the PTS (presentation timestamp) of the input frames.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -281,7 +417,7 @@ the stream. A value of 0 disables this behavior. Default value is 1.</li>
<dl class="function">
<dt id="ffmpeg.trim">
<code class="descclassname">ffmpeg.</code><code class="descname">trim</code><span class="sig-paren">(</span><em>parent_node</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.trim" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">trim</code><span class="sig-paren">(</span><em>stream</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.trim" title="Permalink to this definition"></a></dt>
<dd><p>Trim the input so that the output contains one continuous subpart of the input.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -309,14 +445,14 @@ seconds.</li>
<dl class="function">
<dt id="ffmpeg.vflip">
<code class="descclassname">ffmpeg.</code><code class="descname">vflip</code><span class="sig-paren">(</span><em>parent_node</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.vflip" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">vflip</code><span class="sig-paren">(</span><em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.vflip" title="Permalink to this definition"></a></dt>
<dd><p>Flip the input video vertically.</p>
<p>Official documentation: <a class="reference external" href="https://ffmpeg.org/ffmpeg-filters.html#vflip">vflip</a></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.zoompan">
<code class="descclassname">ffmpeg.</code><code class="descname">zoompan</code><span class="sig-paren">(</span><em>parent_node</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.zoompan" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">zoompan</code><span class="sig-paren">(</span><em>stream</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.zoompan" title="Permalink to this definition"></a></dt>
<dd><p>Apply Zoom &amp; Pan effect.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -348,36 +484,49 @@ for single input image.</li>
<dl class="function">
<dt id="ffmpeg.merge_outputs">
<code class="descclassname">ffmpeg.</code><code class="descname">merge_outputs</code><span class="sig-paren">(</span><em>*parent_nodes</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.merge_outputs" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">merge_outputs</code><span class="sig-paren">(</span><em>*streams</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.merge_outputs" title="Permalink to this definition"></a></dt>
<dd><p>Include all given outputs in one ffmpeg command line</p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.output">
<code class="descclassname">ffmpeg.</code><code class="descname">output</code><span class="sig-paren">(</span><em>parent_node</em>, <em>filename</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.output" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">output</code><span class="sig-paren">(</span><em>stream</em>, <em>filename</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.output" title="Permalink to this definition"></a></dt>
<dd><p>Output file URL</p>
<p>Official documentation: <a class="reference external" href="https://ffmpeg.org/ffmpeg.html#Synopsis">Synopsis</a></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.overwrite_output">
<code class="descclassname">ffmpeg.</code><code class="descname">overwrite_output</code><span class="sig-paren">(</span><em>parent_node</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.overwrite_output" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">overwrite_output</code><span class="sig-paren">(</span><em>stream</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.overwrite_output" title="Permalink to this definition"></a></dt>
<dd><p>Overwrite output files without asking (ffmpeg <code class="docutils literal"><span class="pre">-y</span></code> option)</p>
<p>Official documentation: <a class="reference external" href="https://ffmpeg.org/ffmpeg.html#Main-options">Main options</a></p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.get_args">
<code class="descclassname">ffmpeg.</code><code class="descname">get_args</code><span class="sig-paren">(</span><em>node</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.get_args" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">get_args</code><span class="sig-paren">(</span><em>stream_spec</em>, <em>overwrite_output=False</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.get_args" title="Permalink to this definition"></a></dt>
<dd><p>Get command-line arguments for ffmpeg.</p>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.run">
<code class="descclassname">ffmpeg.</code><code class="descname">run</code><span class="sig-paren">(</span><em>node</em>, <em>cmd=uffmpeg</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.run" title="Permalink to this definition"></a></dt>
<code class="descclassname">ffmpeg.</code><code class="descname">run</code><span class="sig-paren">(</span><em>stream_spec</em>, <em>cmd=u'ffmpeg'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.run" title="Permalink to this definition"></a></dt>
<dd><p>Run ffmpeg on node graph.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>**kwargs</strong> keyword-arguments passed to <code class="docutils literal"><span class="pre">get_args()</span></code> (e.g. <code class="docutils literal"><span class="pre">overwrite_output=True</span></code>).</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="ffmpeg.view">
<code class="descclassname">ffmpeg.</code><code class="descname">view</code><span class="sig-paren">(</span><em>stream_spec</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#ffmpeg.view" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
@ -435,7 +584,7 @@ for single input image.</li>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2017, Karl Kroening.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.2.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.5.
</div>
</body>
</html>

View File

@ -2,5 +2,5 @@
# Project: ffmpeg-python
# Version:
# The remainder of this file is compressed using zlib.
•ÓÁj„0à»O1Ð^]ºW`¡‡ÂB@¢Nb ™„8ÙÕ>}Õ Ý…B§'eòýÎD<C38E>Ö>¢<>¸4> Ù!¼<>¥çÓÈÞ½”Zý
u¥wxêƒ ©:ogL[TgêÙócø)E½bºwaYmcjÿc}vlEƒÜªd&µ³Q&3Šœ¥˜eoÌc2؆Ìk@6m±2zÃäÔ"¶÷dùFJ™DnBŽÂíq²^oâ¯ö<>ê<EFBFBD>I Ò^<5E>‰‡Æ©Ôg8ª»ƒ÷í¶úaCè7ô JÇ:.<jàº_¡[…¥õoÔ!Áå²j=<3D>¿ôK},”~”ƒ]:O¨Öãûœ(µ‚?ËúU¬¾ÿMp-
<EFBFBD>ÔÍj„0ð»O1Ð^]ºW`¡‡ÂB@¢N4<4E>/ƉûôUƒt
<EFBFBD>“2ùý<EFBFBD> j´v{ˆkåB—,ÂßárØÙ·\+ß¡,ô/m°<6D>ÚAy<41>Ö™i<>êä[6ÁÃõ9üò­b¥E°#57a[ÆE¶m,#Õ"Û#׊úQ„m<>l¶!¡È“l(‡ÔcoÙn³•Ñ ɪUlg2|nF¢äEnDŽÂñ˜ŒÁIüÖ&ƒ³>BpQý3R<33>þ¨ÀÈ]eUƒÊ+œÕÃÁç~[ü².´;z¹cW‚¯à~\¡Ù„ñÛg«Áí¶“bû×ÿè×ò\ÈüÊÇDî<¢Úƒ×D®eü<65>×ïªÇâL'Š«

View File

@ -5,12 +5,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Python Module Index &#8212; ffmpeg-python documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
@ -105,7 +102,7 @@
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2017, Karl Kroening.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.2.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.5.
</div>
</body>
</html>

View File

@ -5,12 +5,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &#8212; ffmpeg-python documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
@ -101,7 +98,7 @@
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2017, Karl Kroening.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.2.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.5.
</div>
</body>
</html>

View File

@ -1 +1 @@
Search.setIndex({docnames:["index"],envversion:52,filenames:["index.rst"],objects:{"":{ffmpeg:[0,0,0,"-"]},ffmpeg:{colorchannelmixer:[0,1,1,""],concat:[0,1,1,""],drawbox:[0,1,1,""],filter_:[0,1,1,""],filter_multi:[0,1,1,""],get_args:[0,1,1,""],hflip:[0,1,1,""],hue:[0,1,1,""],input:[0,1,1,""],merge_outputs:[0,1,1,""],output:[0,1,1,""],overlay:[0,1,1,""],overwrite_output:[0,1,1,""],run:[0,1,1,""],setpts:[0,1,1,""],trim:[0,1,1,""],vflip:[0,1,1,""],zoompan:[0,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"case":0,"default":0,"function":0,For:0,PTS:0,The:0,accept:0,action:0,activ:0,adjust:0,after:0,alia:0,all:0,allow:0,also:0,alwai:0,angl:0,anoth:0,appli:0,area:0,arg:0,argument:0,asetpt:0,ask:0,audio:0,author:0,automat:0,avoid:0,becaus:0,behavior:0,both:0,box:0,bright:0,call:0,can:0,chang:0,channel:0,check:0,cmd:0,codec:0,color:0,colorchannelmix:0,com:0,command:0,common:0,concat:0,concaten:0,configur:0,confus:0,construct:0,contain:0,continu:0,convert:0,coordin:0,corner:0,correctli:0,correspond:0,crop:0,custom:0,degre:0,deprec:0,differ:0,directli:0,disabl:0,displai:0,document:0,draw:0,drawbox:0,drop:0,durat:0,dure:0,each:0,edg:0,effect:0,encount:0,end:0,end_fram:0,end_pt:0,endal:0,eof:0,eof_act:0,etc:0,eval:0,evalu:0,exactli:0,exampl:0,except:0,explicitli:0,expr:0,express:0,fail:0,file:0,filenam:0,filter:0,filter_:0,filter_multi:0,filter_nam:0,first:0,flip:0,fmpeg:0,follow:0,forc:0,format:0,fps:0,frame:0,from:0,gbrp:0,gener:0,get:0,get_arg:0,github:0,given:0,graph:0,handl:0,have:0,hd720:0,height:0,heigth:0,hflip:0,higher:0,horizont:0,how:0,http:0,hue:0,huge:0,ident:0,imag:0,immedi:0,implement:0,in1:0,in2:0,includ:0,incom:0,index:0,init:0,initi:0,input:0,instead:0,intern:0,interpret:0,invalid:0,invert:0,its:0,join:0,kept:0,keyword:0,kkroen:0,kwarg:0,last:0,layout:0,left:0,level:0,line:0,list:0,longest:0,luma:0,main:0,main_parent_nod:0,mani:0,manual:0,maximum:0,mean:0,merge_output:0,miss:0,mix:0,mode:0,modifi:0,modul:0,mp4:0,multi:0,multipl:0,must:0,name:0,nearli:0,necessari:0,node:0,none:0,normal:0,note:0,number:0,offici:0,onc:0,one:0,onli:0,oper:0,option:0,order:0,other:0,out:0,output:0,over:0,overlai:0,overlaid:0,overlay_parent_nod:0,overwrit:0,overwrite_output:0,pack:0,pad:0,page:0,pan:0,paramet:0,parent_nod:0,pass:0,pixel:0,planar:0,preced:0,present:0,process:0,radian:0,rang:0,rate:0,reason:0,relat:0,repeat:0,repeatlast:0,resolut:0,result:0,rgb:0,run:0,same:0,sampl:0,satur:0,search:0,second:0,secondari:0,section:0,see:0,segment:0,select:0,set:0,setpt:0,shorter:0,shortest:0,should:0,silenc:0,singl:0,size:0,sloppi:0,sourc:0,space:0,special:0,specifi:0,standard:0,start:0,start_fram:0,start_pt:0,stream:0,subpart:0,suffix:0,sure:0,synchron:0,synopsi:0,syntax:0,system:0,take:0,termin:0,them:0,thi:0,thick:0,through:0,time:0,timebas:0,timestamp:0,togeth:0,top:0,track:0,trim:0,type:0,unit:0,unlik:0,unsaf:0,until:0,url:0,use:0,used:0,user:0,util:0,valu:0,variabl:0,variou:0,verbatim:0,vertic:0,vflip:0,video:0,visibl:0,when:0,which:0,width:0,within:0,without:0,work:0,write:0,you:0,yuv420:0,yuv422:0,yuv444:0,zoom:0,zoompan:0},titles:["ffmpeg-python: Python bindings for FFmpeg"],titleterms:{bind:0,ffmpeg:0,indic:0,python:0,tabl:0}})
Search.setIndex({docnames:["index"],envversion:52,filenames:["index.rst"],objects:{"":{ffmpeg:[0,0,0,"-"]},ffmpeg:{colorchannelmixer:[0,1,1,""],concat:[0,1,1,""],crop:[0,1,1,""],drawbox:[0,1,1,""],drawtext:[0,1,1,""],filter_:[0,1,1,""],get_args:[0,1,1,""],hflip:[0,1,1,""],hue:[0,1,1,""],input:[0,1,1,""],merge_outputs:[0,1,1,""],output:[0,1,1,""],overlay:[0,1,1,""],overwrite_output:[0,1,1,""],run:[0,1,1,""],setpts:[0,1,1,""],trim:[0,1,1,""],vflip:[0,1,1,""],view:[0,1,1,""],zoompan:[0,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"case":0,"default":0,"function":0,"return":0,"true":0,For:0,PTS:0,The:0,These:0,Used:0,accept:0,action:0,activ:0,adjust:0,after:0,alia:0,all:0,allow:0,alpha:0,also:0,alwai:0,angl:0,anoth:0,appli:0,arab:0,area:0,arg:0,argument:0,around:0,ascent:0,asetpt:0,ask:0,aspect:0,atom:0,attempt:0,audio:0,author:0,automat:0,avoid:0,axi:0,background:0,baselin:0,basetim:0,befor:0,behavior:0,behind:0,below:0,between:0,black:0,blend:0,border:0,bordercolor:0,borderw:0,both:0,box:0,boxborderw:0,boxcolor:0,bright:0,call:0,can:0,chang:0,channel:0,charact:0,check:0,chroma:0,clip:0,cmd:0,codec:0,color:0,colorchannelmix:0,com:0,combin:0,command:0,common:0,compil:0,concat:0,concaten:0,configur:0,confus:0,constant:0,construct:0,consult:0,contain:0,continu:0,convert:0,coord:0,coordin:0,corner:0,correctli:0,correspond:0,count:0,crop:0,crop_bitmap:0,custom:0,dar:0,degre:0,deprec:0,descent:0,detail:0,dictionari:0,differ:0,directli:0,disabl:0,displai:0,distanc:0,document:0,draw:0,drawbox:0,drawn:0,drawtext:0,drop:0,due:0,durat:0,dure:0,dynam:0,each:0,edg:0,effect:0,either:0,empti:0,emul:0,enabl:0,encod:0,encount:0,end:0,end_fram:0,end_pt:0,endal:0,eof:0,eof_act:0,equival:0,error:0,escape_text:0,eval:0,evalu:0,even:0,exactli:0,exampl:0,except:0,expand:0,expans:0,explicitli:0,expr:0,express:0,fail:0,fallback:0,fals:0,famili:0,file:0,filenam:0,filter:0,filter_:0,filter_nam:0,first:0,fix:0,fix_bound:0,flag:0,flip:0,fmpeg:0,follow:0,font:0,fontcolor:0,fontcolor_expr:0,fontconfig:0,fontfil:0,fontsiz:0,forc:0,force_autohint:0,format:0,fps:0,frame:0,frame_num:0,from:0,ft_load_:0,ft_load_flag:0,gbrp:0,gener:0,get:0,get_arg:0,github:0,given:0,glyph:0,graph:0,greater:0,grid:0,handl:0,has:0,have:0,hd720:0,height:0,heigth:0,hflip:0,higher:0,highest:0,horizont:0,hour:0,how:0,hsub:0,http:0,hue:0,huge:0,ignore_global_advance_width:0,ignore_transform:0,imag:0,immedi:0,implement:0,includ:0,incom:0,index:0,inform:0,init:0,initi:0,input:0,instead:0,interpret:0,invalid:0,invert:0,its:0,join:0,just:0,kept:0,keyword:0,kkroen:0,kwarg:0,label:0,last:0,layout:0,left:0,level:0,libfontconfig:0,libfreetyp:0,libfribidi:0,librari:0,line:0,line_h:0,line_spac:0,linear_design:0,list:0,load:0,longest:0,lowest:0,luma:0,mai:0,main:0,main_h:0,main_parent_nod:0,main_w:0,mandatori:0,mani:0,manual:0,map:0,max:0,max_glyph_a:0,max_glyph_d:0,max_glyph_h:0,max_glyph_w:0,maximum:0,mean:0,merge_output:0,microsecond:0,min:0,miss:0,mix:0,mode:0,modifi:0,modul:0,monochrom:0,more:0,mp4:0,must:0,name:0,nan:0,necessari:0,need:0,neg:0,no_autohint:0,no_bitmap:0,no_hint:0,no_recurs:0,no_scal:0,node:0,none:0,normal:0,number:0,obtain:0,offici:0,offset:0,onc:0,one:0,onli:0,option:0,order:0,orient:0,other:0,otherwis:0,out:0,outlin:0,output:0,over:0,overlai:0,overlaid:0,overlay_parent_nod:0,overrid:0,overwrit:0,overwrite_output:0,pack:0,pad:0,page:0,pan:0,paramet:0,partial:0,pass:0,path:0,pedant:0,pixel:0,place:0,planar:0,pleas:0,point:0,posit:0,preced:0,present:0,process:0,pts:0,radian:0,rand:0,random:0,rang:0,rate:0,ratio:0,read:0,reason:0,refer:0,rel:0,relat:0,reload:0,render:0,repeat:0,repeatlast:0,represent:0,resolut:0,respect:0,result:0,revers:0,rgb:0,right:0,run:0,same:0,sampl:0,san:0,sar:0,satur:0,search:0,second:0,secondari:0,section:0,see:0,segment:0,select:0,sequenc:0,set:0,setpt:0,shadow:0,shadowcolor:0,shadowi:0,shadowx:0,shape:0,shorter:0,shortest:0,should:0,silenc:0,singl:0,size:0,sloppi:0,space:0,special:0,specifi:0,standard:0,start:0,start_fram:0,start_numb:0,start_pt:0,stream:0,stream_spec:0,strftime:0,string:0,subpart:0,subsampl:0,suffix:0,suppli:0,support:0,sure:0,synchron:0,synopsi:0,syntax:0,system:0,tab:0,tabsiz:0,take:0,tc24hmax:0,termin:0,text:0,text_h:0,text_shap:0,text_w:0,textfil:0,than:0,them:0,thi:0,thick:0,through:0,thrown:0,time:0,timebas:0,timecod:0,timecode_r:0,timestamp:0,togeth:0,top:0,track:0,trim:0,type:0,unit:0,unknown:0,unsaf:0,until:0,updat:0,upper:0,upward:0,url:0,use:0,used:0,user:0,using:0,utf:0,util:0,valu:0,variabl:0,variou:0,verbatim:0,vertic:0,vertical_layout:0,vflip:0,video:0,view:0,visibl:0,vsub:0,wai:0,well:0,when:0,where:0,which:0,white:0,width:0,within:0,without:0,work:0,wrap:0,write:0,you:0,yuv420:0,yuv422:0,yuv422p:0,yuv444:0,zoom:0,zoompan:0},titles:["ffmpeg-python: Python bindings for FFmpeg"],titleterms:{bind:0,ffmpeg:0,indic:0,python:0,tabl:0}})

BIN
doc/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
doc/logo.xcf Normal file

Binary file not shown.

View File

@ -287,46 +287,46 @@ def drawtext(stream, text=None, x=0, y=0, escape_text=True, **kwargs):
the top border of the output image. The default value is "0". See below for the list of accepted constants
and functions.
Expression constants:
The parameters for x and y are expressions containing the following constants and functions:
dar: input display aspect ratio, it is the same as ``(w / h) * sar``
hsub: horizontal chroma subsample values. For example for the pixel format "yuv422p" hsub is 2 and vsub
is 1.
vsub: vertical chroma subsample values. For example for the pixel format "yuv422p" hsub is 2 and vsub
is 1.
line_h: the height of each text line
lh: Alias for ``line_h``.
main_h: the input height
h: Alias for ``main_h``.
H: Alias for ``main_h``.
main_w: the input width
w: Alias for ``main_w``.
W: Alias for ``main_w``.
ascent: the maximum distance from the baseline to the highest/upper grid coordinate used to place a
glyph outline point, for all the rendered glyphs. It is a positive value, due to the grid's
orientation with the Y axis upwards.
max_glyph_a: Alias for ``ascent``.
descent: the maximum distance from the baseline to the lowest grid coordinate used to place a glyph
outline point, for all the rendered glyphs. This is a negative value, due to the grid's
orientation, with the Y axis upwards.
max_glyph_d: Alias for ``descent``.
max_glyph_h: maximum glyph height, that is the maximum height for all the glyphs contained in the
rendered text, it is equivalent to ascent - descent.
max_glyph_w: maximum glyph width, that is the maximum width for all the glyphs contained in the
rendered text
n: the number of input frame, starting from 0
rand(min, max): return a random number included between min and max
sar: The input sample aspect ratio.
t: timestamp expressed in seconds, NAN if the input timestamp is unknown
text_h: the height of the rendered text
th: Alias for ``text_h``.
text_w: the width of the rendered text
tw: Alias for ``text_w``.
x: the x offset coordinates where the text is drawn.
y: the y offset coordinates where the text is drawn.
Expression constants:
The parameters for x and y are expressions containing the following constants and functions:
- dar: input display aspect ratio, it is the same as ``(w / h) * sar``
- hsub: horizontal chroma subsample values. For example for the pixel format "yuv422p" hsub is 2 and vsub
is 1.
- vsub: vertical chroma subsample values. For example for the pixel format "yuv422p" hsub is 2 and vsub
is 1.
- line_h: the height of each text line
- lh: Alias for ``line_h``.
- main_h: the input height
- h: Alias for ``main_h``.
- H: Alias for ``main_h``.
- main_w: the input width
- w: Alias for ``main_w``.
- W: Alias for ``main_w``.
- ascent: the maximum distance from the baseline to the highest/upper grid coordinate used to place a glyph
outline point, for all the rendered glyphs. It is a positive value, due to the grid's orientation with the Y
axis upwards.
- max_glyph_a: Alias for ``ascent``.
- descent: the maximum distance from the baseline to the lowest grid coordinate used to place a glyph outline
point, for all the rendered glyphs. This is a negative value, due to the grid's orientation, with the Y axis
upwards.
- max_glyph_d: Alias for ``descent``.
- max_glyph_h: maximum glyph height, that is the maximum height for all the glyphs contained in the rendered
text, it is equivalent to ascent - descent.
- max_glyph_w: maximum glyph width, that is the maximum width for all the glyphs contained in the rendered
text.
- n: the number of input frame, starting from 0
- rand(min, max): return a random number included between min and max
- sar: The input sample aspect ratio.
- t: timestamp expressed in seconds, NAN if the input timestamp is unknown
- text_h: the height of the rendered text
- th: Alias for ``text_h``.
- text_w: the width of the rendered text
- tw: Alias for ``text_w``.
- x: the x offset coordinates where the text is drawn.
- y: the y offset coordinates where the text is drawn.
These parameters allow the x and y expressions to refer each other, so you can for example specify
``y=x/dar``.
These parameters allow the x and y expressions to refer each other, so you can for example specify
``y=x/dar``.
Official documentation: `drawtext <https://ffmpeg.org/ffmpeg-filters.html#drawtext>`__
"""
@ -419,6 +419,7 @@ __all__ = [
'concat',
'crop',
'drawbox',
'drawtext',
'filter_',
'hflip',
'hue',

View File

@ -27,7 +27,7 @@ def _convert_kwargs_to_cmd_line_args(kwargs):
for k in sorted(kwargs.keys()):
v = kwargs[k]
args.append('-{}'.format(k))
if v:
if v is not None:
args.append('{}'.format(v))
return args
@ -145,6 +145,16 @@ def get_args(stream_spec, overwrite_output=False):
return args
@output_operator()
def compile(stream_spec, cmd='ffmpeg', **kwargs):
"""Build command-line for ffmpeg."""
if isinstance(cmd, basestring):
cmd = [cmd]
elif type(cmd) != list:
cmd = list(cmd)
return cmd + get_args(stream_spec, **kwargs)
@output_operator()
def run(stream_spec, cmd='ffmpeg', **kwargs):
"""Run ffmpeg on node graph.
@ -152,15 +162,11 @@ def run(stream_spec, cmd='ffmpeg', **kwargs):
Args:
**kwargs: keyword-arguments passed to ``get_args()`` (e.g. ``overwrite_output=True``).
"""
if isinstance(cmd, basestring):
cmd = [cmd]
elif type(cmd) != list:
cmd = list(cmd)
args = cmd + get_args(stream_spec, **kwargs)
_subprocess.check_call(args)
_subprocess.check_call(compile(stream_spec, cmd, **kwargs))
__all__ = [
'compile',
'get_args',
'run',
]

View File

@ -252,6 +252,12 @@ def test_filter_text_arg_str_escape():
# subprocess.check_call(['ffmpeg', '-version'])
def test_compile():
out_file = ffmpeg.input('dummy.mp4').output('dummy2.mp4')
assert out_file.compile() == ['ffmpeg', '-i', 'dummy.mp4', 'dummy2.mp4']
assert out_file.compile(cmd='ffmpeg.old') == ['ffmpeg.old', '-i', 'dummy.mp4', 'dummy2.mp4']
def test_run():
stream = _get_complex_filter_example()
ffmpeg.run(stream)
@ -318,6 +324,11 @@ def test_merge_outputs():
]
def test__input__start_time():
assert ffmpeg.input('in', ss=10.5).output('out').get_args() == ['-ss', '10.5', '-i', 'in', 'out']
assert ffmpeg.input('in', ss=0.0).output('out').get_args() == ['-ss', '0.0', '-i', 'in', 'out']
def test_multi_passthrough():
out1 = ffmpeg.input('in1.mp4').output('out1.mp4')
out2 = ffmpeg.input('in2.mp4').output('out2.mp4')

View File

@ -2,7 +2,7 @@ from setuptools import setup
from textwrap import dedent
import subprocess
version = '0.1.8'
version = '0.1.9'
download_url = 'https://github.com/kkroening/ffmpeg-python/archive/v{}.zip'.format(version)
long_description = dedent("""\

View File

@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
envlist = py27, py33, py34, py35, py36, pypy
envlist = py27, py34, py35, py36, pypy
[testenv]
commands = py.test -vv