Skip to content
Docs menu

Convert to 3G2

3GPP2 Video. The API converts 30 formats to 3G2. 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":"3g2","options":{"crf":23}}'

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

  • video_codecenumdefault: not set

    Video codec. "copy" keeps the video as it is and fails if it does not fit the format.

    one of copy, x264

  • crfintegerdefault: not set

    Constant Rate Factor: lower values mean higher quality and larger files. 0 to 51 for H.264 and H.265, 0 to 63 for VP9 and AV1.

    0 to 51

  • presetenumdefault: not set

    Encoding speed against file size. Slower presets make smaller files.

    one of ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow

  • tuneenumdefault: not set

    Tune the encoder for the type of content (H.264 and H.265).

    one of film, animation, grain, stillimage, fastdecode, zerolatency, psnr, ssim

  • profileenumdefault: not set

    Compatibility profile (H.264: baseline to high444, H.265: main or main10).

    one of baseline, main, high, high10, high422, high444

  • levelenumdefault: not set

    H.264 compatibility level.

    one of 1, 1b, 1.1, 1.2, 1.3, 2.0, 2.1, 2.2, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2

  • widthintegerdefault: not set

    Width of the video in pixels.

    1 to 16384 px

  • heightintegerdefault: not set

    Height of the video in pixels.

    1 to 16384 px

  • fitenumdefault: max

    "max" fits the video inside width and height without enlarging it, "crop" fills and crops, "pad" adds bars, "scale" stretches to the exact size.

    one of max, crop, pad, scale

  • fpsnumberdefault: not set

    Frame rate of the output.

    0.1 to 240 fps

  • keyframe_intervalintegerdefault: not set

    Largest number of frames between two keyframes.

  • aspect_ratiostringdefault: not set

    Display aspect ratio, for example 16:9 or 4:3.

  • all_audio_streamsbooleandefault: true

    Keep all audio tracks. Set to false to keep only the main audio track.

  • audio_codecenumdefault: not set

    Audio codec. "copy" keeps the audio as it is, "none" removes it.

    one of copy, none, aac

  • audio_bitrateintegerdefault: not set

    Audio bitrate in kbit/s. Without a value the encoder picks a quality-based rate.

  • volumenumberdefault: not set

    Change the volume: 1.0 keeps it, 1.1 is 10% louder, 0.5 is half as loud. At most 10.

  • channelsintegerdefault: not set

    Number of audio channels, for example 1 for mono or 2 for stereo.

  • sample_rateintegerdefault: not set

    Sample rate in Hz, for example 44100 or 48000 (8000 to 192000).

  • 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.