Encoders

Encoders.

get_encoder_class(import_path=None)

Get the encoder class by supplying a fully qualified path to import_path.

If import_path is None the default encoder class specified in the ENCODE_DEFAULT_ENCODER_CLASS is returned.

Parameters:import_path (str) – Fully qualified path of the encoder class, for example: encode.encoders.BasicEncoder.
Returns:The encoder class.
Return type:class
class BaseEncoder(profile, input_path=None, output_path=None)

The base encoder.

Parameters:
  • profile (EncodingProfile) – The encoding profile that configures this encoder.
  • input_path (str) –
  • output_path (str) –
command

The command for the encoder with the vars injected, eg. convert "/path/to/input.gif" "/path/to/output.png".

Return type:str
Returns:The command.
class BasicEncoder(profile, input_path=None, output_path=None)

Encoder that uses the subprocess module.

start()

Start encoding.

Raises:EncodeError if something goes wrong during encoding.
class FFMpegEncoder(profile, input_path=None, output_path=None)

Encoder that uses the FFMpeg tool.

start()

Start encoding.

Raises:EncodeError if something goes wrong during encoding.