Skip to content

DocsGuides

Vertical, square and rotated

Cut a landscape video to 9:16 or 1:1 for social feeds, letterbox it into a new frame, or rotate and flip it.

Turn one recording into the shapes each network wants. Crop when the subject is in the middle, pad when nothing may be cut off.

Vertical 9:16#

The social-vertical preset crops the centre to 1080 by 1920 at 30 frames a second.

bash
curl "$VIDEXO_API_URL/v1/transcode" \
  -H "Authorization: Bearer $VIDEXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "https://example.com/talk.mp4",
  "preset": "social-vertical",
  "filename": "talk-vertical.mp4"
}'

talk-vertical.mp4: a 1080 by 1920 video at 30 frames a second, cut from the middle of the frame, with the sound as AAC.

Square 1:1#

bash
curl "$VIDEXO_API_URL/v1/transcode" \
  -H "Authorization: Bearer $VIDEXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "https://example.com/talk.mp4",
  "preset": "square",
  "filename": "talk-square.mp4"
}'

talk-square.mp4: a 1080 by 1080 video at 30 frames a second, cut from the middle of the frame, with the sound as AAC.

Keep the whole picture#

fit: "pad" fits the picture into the frame and fills the rest with a colour.

bash
curl "$VIDEXO_API_URL/v1/transcode" \
  -H "Authorization: Bearer $VIDEXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "https://example.com/talk.mp4",
  "filename": "talk-letterbox.mp4",
  "resize": {
    "width": 1080,
    "height": 1920,
    "fit": "pad",
    "pad_color": "black"
  }
}'

talk-letterbox.mp4: the full landscape picture centred in a 1080 by 1920 frame, black above and below.

Crop to a shape at the input's size#

aspect alone crops (or pads, with fit: "pad") to the shape without scaling, whatever the input's size. anchor picks the part that stays.

bash
curl "$VIDEXO_API_URL/v1/transcode" \
  -H "Authorization: Bearer $VIDEXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "https://example.com/talk.mp4",
  "filename": "talk-portrait.mp4",
  "resize": {
    "aspect": "4:5",
    "anchor": "left"
  }
}'

Rotate and flip#

bash
curl "$VIDEXO_API_URL/v1/transcode" \
  -H "Authorization: Bearer $VIDEXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "https://example.com/talk.mp4",
  "filename": "talk-rotated.mp4",
  "rotate": 90
}'

talk-rotated.mp4: the video turned 90 degrees clockwise.

flip mirrors the picture: "horizontal" for a selfie that came out mirrored.

bash
curl "$VIDEXO_API_URL/v1/transcode" \
  -H "Authorization: Bearer $VIDEXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "https://example.com/talk.mp4",
  "filename": "talk-mirrored.mp4",
  "flip": "horizontal"
}'