encoding: object
Configure a number of output encoding parameters.
clipchamp(element, {
});
Configure a number of output encoding parameters.
The video conversion preset that causes us to produce an output video that is optimized for a particular usage scenario or device. Notice that under your subscription plan with us, only a subset of these presets may be available.
The output video format – notice that the range of supported formats is constrained by the setting for preset
, i.e., the “web” preset supports “mp4”, “webm” and “webm_vp9”; “mobile” supports “mp4”; “windows” supports “asf”; and “animation” supports “gif”. Under your subscription plan with us, only a subset of these formats may be available.
The resolution of the output video – all selections are downscale only, thus if a lower resolution video is submitted it will not be enlarged. This selection may be further constrained by your plan. For instance, if your plan supports up to 480p
(standard definition) resolution, we will not produce output videos with a higher resolution. 320w
and 640w
produce videos with a limited width rather than a limited height. If a resolution that is not covered by your plan is selected, we will use the highest setting available.
The compression ratio for the output video where “max” generally compresses best and fastest at the expense of compromising quality the most. In turn, “min” compresses the least and takes most time, while retaining the best quality.
If the frame rate of the input video exceeds this number it will be downsampled to match it. Videos that are already at a lower frame rate or those where the input frame rate cannot be determined will be unaffected. If omitted or set to “keep”, the output video will have the same frame rate as the input video. This setting does not have any effect on videos encoded with the “animation” preset. BETA
Option to trim the output video by cutting in and out of the input video at timely offsets after the start of the video (trim.from
) and before the end of the video (trim.to
). Does not currently work with the mobile-webcam-format-fallback
flag (see enable
parameter). BETA
Option to crop the video by defining a rectangular area within the dimensions of the output video. When simultaneously downscaling the input video (by setting the resolution
parameter to a value different from "keep"
), the cropping region will apply to an output video, having potentially different (smaller) resolution than the input video. We will not automatically scale the cropping region alongside the input video video.