add documentation for filter and codec
This commit is contained in:
parent
917fce3b21
commit
d807d636fb
|
|
@ -48,18 +48,22 @@ Codecs
|
|||
|
||||
.. autoclass:: VideoCodec
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: AudioCodec
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
Filters
|
||||
~~~~~~~
|
||||
|
||||
.. autoclass:: VideoFilter
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: AudioFilter
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
Stores and Options
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ class Codec(OptionStore):
|
|||
|
||||
|
||||
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):
|
||||
self.add_option('-b', str(bitrate))
|
||||
|
|
@ -77,6 +81,10 @@ class VideoCodec(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):
|
||||
self.add_option('-aframes', str(number))
|
||||
|
|
@ -103,10 +111,9 @@ class AudioCodec(Codec):
|
|||
return self
|
||||
|
||||
def preset(self, preset):
|
||||
"""Load default presets from a preset file"""
|
||||
self.add_option('-apre', str(preset))
|
||||
return self
|
||||
|
||||
def __iter__(self):
|
||||
return chain(['-acodec', self.name], Codec.__iter__(self))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,16 @@ class FilterStore(OptionStore):
|
|||
|
||||
|
||||
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):
|
||||
filter = self._format_parameter(amount, threshold)
|
||||
|
|
@ -175,8 +185,19 @@ class VideoFilter(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):
|
||||
"""does nothing"""
|
||||
self.add_option('null', None)
|
||||
return self
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue