Help us become awesome, please take our tiny survey!
 

/video/encode robot

Takes a single video file and converts it to a given format.

Parameter Description
preset Converts a video using pre-configured settings. Click here for a list of presets.
width Size for the new video in px. The allowed range is 1 - 1920.
height Height for the new video in px. The allowed range is 1 - 1080.
resize_strategy Click here for a list of available resize strategies. Default = "pad".
ffmpeg An object with parameters to pass to FFmpeg. Check the FFmpeg documentation for available options. If you are using a preset, the options given here will be merged on top.
watermark_url Optional. Url to a png image to overlay over this image.
watermark_position Optional. The position you'd like the watermark to have. Available options are: "center", "top", "bottom", "left", "right". You can also combine options, for example "bottom-right".
watermark_size Optional. The size in percent for this watermark. E.g. "50%".
watermark_resize_strategy Optional, default = "fit". Supports "fit" and "stretch".

Presets

flash

{ width               : 320
, height              : 240
, ffmpeg:
  { 'ab'              : '64k'
  , 'acodec'          : 'libmp3lame'
  , 'ar'              : '44100'
  , 'b'               : '512k'
  , 'f'               : 'flv'
  , 'r'               : '25'
  , 'vcodec'          : 'flv'
  }
}

iphone

{ width               : 480
, height              : 320
, ffmpeg:
  { 'ab'              : '128k'
  , 'ac'              : '2'
  , 'acodec'          : 'libfaac'
  , 'ar'              : '48000'
  , 'b'               : '512k'
  , 'f'               : 'mov'
  , 'bf'              : '0'
  , 'cmp'             : '256'
  , 'coder'           : '0'
  , 'flags'           : '+loop+mv4'
  , 'flags2'          : '+mixed_refs'
  , 'g'               : '250'
  , 'i_qfactor'       : '0.71'
  , 'keyint_min'      : '25'
  , 'me_method'       : 'hex'
  , 'me_range'        : '16'
  , 'partitions'      : '+parti4x4+parti8x8+partp4x4+partp8x8+partb8x8'
  , 'qdiff'           : '4'
  , 'qmax'            : '51'
  , 'qmin'            : '10'
  , 'refs'            : '5'
  , 'sc_threshold'    : '40'
  , 'subq'            : '7'
  , 'trellis'         : '1'
  , 'vcodec'          : 'libx264'
  }
}

Comments