Skip to content
Docs menu

Convert to APNG

Animated PNG. The API converts 30 formats to APNG. These are the options, by input format.

curl https://api.switchfile.io/v1/convert \
  -H "Authorization: Bearer $SWITCHFILE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/input.3g2","to":"apng","options":{"width":1280}}'

From 30 formats

3g2, 3gp, asf, avi, divx, dv, f4v, flv, ivf, m2ts, m2v, m4v, mkv, mod, mov, mp4, mpeg, mpg, mts, mxf, ogv, rm, rmvb, tod, ts, vob, webm, wmv, wtv, y4m

  • widthintegerdefault: not set

    Width in pixels. Without width and height the result is at most 640 pixels wide.

  • heightintegerdefault: not set

    Height in pixels.

  • fitenumdefault: max

    "max" fits inside width and height without enlarging, "crop" fills and crops, "pad" adds bars, "scale" stretches.

    one of max, crop, pad, scale

  • fpsnumberdefault: 12

    Frames per second.

  • trim_startstringdefault: not set

    Start of the part to keep, in seconds or HH:MM:SS.

  • trim_endstringdefault: not set

    End of the part to keep, in seconds or HH:MM:SS.