Options
All
  • Public
  • Public/Protected
  • All
Menu

Module api/model/media

Index

Type aliases

Mp4StickerConversionProcessOptions

Mp4StickerConversionProcessOptions: { crop?: boolean; endTime?: string; fps?: number; log?: boolean; loop?: number; square?: number; startTime?: string }

Type declaration

  • Optional crop?: boolean

    Centres and crops the video. default true

  • Optional endTime?: string

    The video end time of the sticker. By default, stickers are made from the first 5 seconds of the video

    default

    00:00:05.0

  • Optional fps?: number

    Desired Frames per second of the sticker output

    default

    10

  • Optional log?: boolean

    Prints ffmpeg logs in the terminal

    default

    false

  • Optional loop?: number

    The amount of times the video loops in the sticker. To save processing time, leave this as 0 default 0

  • Optional square?: number

    A number representing the WxH of the output sticker (default 512x512). Lowering this number is a great way to process longer duration stickers. The max value is 512. default 512

  • Optional startTime?: string

    The video start time of the sticker

    default

    00:00:00.0

StickerMetadata

StickerMetadata: { author: string; circle?: boolean; cornerRadius?: number; cropPosition?: "top" | "right top" | "right" | "right bottom" | "bottom" | "left bottom" | "left" | "left top" | "north" | "northeast" | "east" | "southeast" | "south" | "southwest" | "west" | "northwest" | "center" | "centre" | "entropy" | "attention"; discord?: string; keepScale?: boolean; pack: string; removebg?: boolean | "HQ" }

Type declaration

  • author: string

    The author of the sticker

    default

    ``

  • Optional circle?: boolean

    Applies a circular mask to the sticker. Works on images only for now.

  • Optional cornerRadius?: number

    The corner radius of the sticker when stickerMetadata.circle is set to true.

    default

    100

    minimum

    1

    maximum

    100

    multipleof

    1

  • Optional cropPosition?: "top" | "right top" | "right" | "right bottom" | "bottom" | "left bottom" | "left" | "left top" | "north" | "northeast" | "east" | "southeast" | "south" | "southwest" | "west" | "northwest" | "center" | "centre" | "entropy" | "attention"

    Crop position

    Learn more: https://sharp.pixelplumbing.com/api-resize

    default

    attention

  • Optional discord?: string

    Your Discord ID to get onto the sticker leaderboard!

  • Optional keepScale?: boolean

    Setting this to true will skip the resizing/square-cropping of the sticker. It will instead 'letterbox' the image with a transparent background.

  • pack: string

    The pack of the sticker

    default

    ``

  • Optional removebg?: boolean | "HQ"

    ALPHA FEATURE - NO GUARANTEES IT WILL WORK AS EXPECTED:

    REQUIRES AN INSIDERS LICENSE-KEY

    Attempt to remove the background of the sticker. Only valid for paid licenses.

    options:

    true - remove background after resizing

    HQ - remove background before resizing (i.e on original photo)

    default

    false

Variables

Const defaultProcessOptions

defaultProcessOptions: Mp4StickerConversionProcessOptions = ...