POST /presets/
curl -X POST -H "Authorization: Bearer um9VmyJKTPGFqpkL_THjGE5rkXqfURDYqQ8MTBVidG3PtwkfABIdx6s_z9WlFl4_j" -H "application/json" -d '{ \ "preset": { \ "name": "PERSONAL-FLV-FLV-H264-AAC", \ "description": "My own Flash Video Preset with H.264 Baseline/AAC LC for Flash Player SD", \ "target_format": { \ "extension": "flv", \ "container": "flv", \ "vcodec": { \ "codec": { id: "525ce63284aed52635e85d05" }, \ "profile": "Baseline", \ "passes": 1, \ "caps": { \ "interlaced": "false", \ "max_key_distance": 5, \ "max_width": 640, \ "max_height": 480, \ "max_framerate": 30, \ "max_bitrate": 4000, \ "max_ref_frames": 1, \ "max_buffersize": 384 \ } \ }, \ "acodec": { \ "codec": { id: "525ce63284aed52635e85d06" }, \ "profile": "LC", \ "passes": 1, \ "caps": { \ "max_bitdepth": 16, \ "max_channels": 2, \ "max_samplingrate": 48000, \ "max_bitrate": 160 \ } \ } \ }, \ "settings": { \ "subtitle_policy": "ignore", \ "video": { \ "deinterlace": "auto", \ "crop": "off", \ "resize_policy": "keep", \ "padding_policy": "no_pad", \ "aspect_ratio_policy": "keep" \ }, \ "audio": { \ "resample_policy": "shrink_to_fit" \ }, \ "thumbnails": [ { \ "name": "thumbnails_small", \ "format": "jpg", \ "interval_or_count": "10s", \ "max_width": 85, \ "max_height": 64, \ "resize_policy": "keep", \ "padding_policy": "no_pad" \ }, { \ "name": "thumbnails_big", \ "format": "jpg", \ "interval_or_count": "30", \ "max_width": 320, "max_height": 240, \ "resize_policy": "shrink_to_fit", \ "padding_policy": "no_pad" \ }], \ "logos" : [ { \ "name" : "Logo15", \ "format" : "png", \ "max_width" : "15%", \ "max_height" : "15%", \ "resize_policy" : "keep", \ "x_pos" : "80%", \ "y_pos" : "5%" \ }] \ }, \ } \ }' "https://api.xvid.com/v1/presets/?human=true&show_null=true" |
Valid Fields:
settings:video:resize_policy (optional): Sets the resize_policy, meaning the method to apply in order to fit input videos into the max_width/max_height set as part of vcodec:caps. May be any out of 'fit | fill | stretch | keep | shrink_to_fit | shrink_to_fill'. Currently, the only implemented option is "keep", which will preserve the original input video resolution and aspect ratio if within max width/height or proportionally downscales to match the defined max_width or max_height (whatever is the value exceeded). Input videos smaller than max_width/max_height are not upscaled.