add documentation for filter and codec
This commit is contained in:
parent
917fce3b21
commit
d807d636fb
|
|
@ -48,18 +48,22 @@ Codecs
|
||||||
|
|
||||||
.. autoclass:: VideoCodec
|
.. autoclass:: VideoCodec
|
||||||
:members:
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
.. autoclass:: AudioCodec
|
.. autoclass:: AudioCodec
|
||||||
:members:
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
Filters
|
Filters
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
.. autoclass:: VideoFilter
|
.. autoclass:: VideoFilter
|
||||||
:members:
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
.. autoclass:: AudioFilter
|
.. autoclass:: AudioFilter
|
||||||
:members:
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
Stores and Options
|
Stores and Options
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,10 @@ class Codec(OptionStore):
|
||||||
|
|
||||||
|
|
||||||
class VideoCodec(Codec):
|
class VideoCodec(Codec):
|
||||||
|
"""This represent an video codec.
|
||||||
|
|
||||||
|
You can append this class to an :class:`Output` object to tell
|
||||||
|
which FFmpeg which codec you want."""
|
||||||
|
|
||||||
def bitrate(self, bitrate):
|
def bitrate(self, bitrate):
|
||||||
self.add_option('-b', str(bitrate))
|
self.add_option('-b', str(bitrate))
|
||||||
|
|
@ -77,6 +81,10 @@ class VideoCodec(Codec):
|
||||||
|
|
||||||
|
|
||||||
class AudioCodec(Codec):
|
class AudioCodec(Codec):
|
||||||
|
"""This represent an audio codec.
|
||||||
|
|
||||||
|
You can append this class to an :class:`Output` object to tell
|
||||||
|
which FFmpeg which codec you want."""
|
||||||
|
|
||||||
def frames(self, number):
|
def frames(self, number):
|
||||||
self.add_option('-aframes', str(number))
|
self.add_option('-aframes', str(number))
|
||||||
|
|
@ -103,10 +111,9 @@ class AudioCodec(Codec):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def preset(self, preset):
|
def preset(self, preset):
|
||||||
|
"""Load default presets from a preset file"""
|
||||||
self.add_option('-apre', str(preset))
|
self.add_option('-apre', str(preset))
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return chain(['-acodec', self.name], Codec.__iter__(self))
|
return chain(['-acodec', self.name], Codec.__iter__(self))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,16 @@ class FilterStore(OptionStore):
|
||||||
|
|
||||||
|
|
||||||
class VideoFilter(FilterStore):
|
class VideoFilter(FilterStore):
|
||||||
|
"""FilterStore for Videofilters.
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
|
||||||
|
`FFmpeg documentation, Videofilter`_
|
||||||
|
Documentation of all filters and which effect they have.
|
||||||
|
|
||||||
|
.. _FFmpeg documentation, Videofilter:
|
||||||
|
http://ffmpeg.org/ffmpeg.html#Video-Filters
|
||||||
|
"""
|
||||||
|
|
||||||
def blackframe(self, amount, threshold):
|
def blackframe(self, amount, threshold):
|
||||||
filter = self._format_parameter(amount, threshold)
|
filter = self._format_parameter(amount, threshold)
|
||||||
|
|
@ -175,8 +185,19 @@ class VideoFilter(FilterStore):
|
||||||
|
|
||||||
|
|
||||||
class AudioFilter(FilterStore):
|
class AudioFilter(FilterStore):
|
||||||
|
"""FilterStore for Audifilters.
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
|
||||||
|
`FFmpeg documentation, Audiofilter`_
|
||||||
|
Documentation of all filters and which effect they have.
|
||||||
|
|
||||||
|
.. _FFmpeg documentation, Audiofilter:
|
||||||
|
http://ffmpeg.org/ffmpeg.html#Audio-Filters
|
||||||
|
"""
|
||||||
|
|
||||||
def null(self):
|
def null(self):
|
||||||
|
"""does nothing"""
|
||||||
self.add_option('null', None)
|
self.add_option('null', None)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue