Skip to content

DocsGuides

Fade in and out

Fade the picture from and to black or white and the sound from and to silence.

fade fades the picture and the sound in at the start and out at the end of an output.

The request#

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-faded.mp4",
  "trim": {
    "start": 90,
    "duration": 30
  },
  "fade": {
    "in": 1,
    "out": 1
  }
}'

talk-faded.mp4: a 30 second clip that fades in over its first second and out over its last.

fade.out needs the output's length, so set trim.duration or trim.end with it.

To white, picture only#

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-white.mp4",
  "trim": {
    "start": 0,
    "duration": 20
  },
  "fade": {
    "in": 2,
    "out": 2,
    "color": "white"
  },
  "audio": false
}'

Audio outputs fade their sound, and GIFs their picture.