Encoding Presets

Encoding presets are simple functions that return dicts that are passed to the selected Nommer. At the current time, this is almost always FFmpegNommer, which uses EC2 instances + ffmpeg to get encodings done.

To use a preset, simply import it and pass it as the job_options argument to media_nommer_api.api.APIConnection.job_submit() method.

import media_nommer_api
from media_nommer_api.presets.video_basic import web_medium

api = media_nommer_api.connect('http://localhost:8001')

response = api.job_submit(
    # Source file to encode.
    's3://YOUR_AWS_ID:YOUR_AWS_SECRET@SOME_BUCKET/infilename.mp4',
    # Destination for the encoding.
    's3://YOUR_AWS_ID:YOUR_AWS_SECRET@SOME_BUCKET2/outfilename.mp4',
    # The encoding preset to use.
    web_medium(),
)

Preset List

This preset list contains all presets included in the media-nommer-api-python package. These are subject to change or be re-named at any time, so you’re typically better off using these as the foundation for your own custom presets.

Basic Video Presets

The following presets are basic video encoding presets. Right now, this is just ffmpeg, but may be expanded in the future with the addition of Nommers.

media_nommer_api.presets.video_basic.web_medium()[source]

This preset is suitable for medium-quality encodings for web consumption. The two-pass encoding yields a smaller size, and we use qtfaststart.py to move the meta-data to the front for faster buffering.

Android Video Presets

The following presets are geared towards compatibility with Android devices. Some of the older handsets are very picky about certain settings like framerate, audio channels, and etc.

media_nommer_api.presets.video_android.android_low()[source]

A lower-quality Android video encoding setting. This should be suitable for the vast majority of devices.

Table Of Contents

Previous topic

Getting Started

Next topic

API Reference

This Page