Skip to content

WHIP

An input type that allows streaming video and audio to the Smelter over WHIP. After the connection is interrupted, Smelter will try to reconnect you to the same input.

Usage

To use WHIP Input you must register it first. You can do it by sending a request like this:

Example request
POST: /api/input/:input_id/register
Content-Type: application/json
{
"type": "whip",
"video": {
"decoder": "ffmpeg_h264"
},
"audio": {
"decoder": "opus"
},
}

RegisterWhipInput

Parameters for an input stream from WHIP source. At least one of video and audio has to be defined.

Type definitions

type WhipInput = {
video?: InputWhipVideoOptions;
audio?: InputWhipAudioOptions;
required?: bool;
offsetMs?: f64;
};

Properties

video

Parameters of a video source included in the WHIP stream.


audio

Parameters of an audio source included in the WHIP stream.


required

Determines if the input stream is essential for output frame production. If set to true and the stream is delayed, Smelter will postpone output frames until the stream is received.

  • Type: bool
  • Default value: false

offsetMs

Offset in milliseconds relative to the pipeline start (start request). If unspecified, the stream synchronizes based on the delivery time of the initial frames.

  • Type: f64

InputWhipVideoOptions

Parameters of a video source included in the WHIP stream.

Type definitions

type InputWhipVideoOptions = {
decoder: "ffmpeg_h264" | "vulkan_video";
}

Properties

decoder

  • Type: "ffmpeg_h264" | "vulkan_video"
  • Supported values:
    • ffmpeg_h264 - uses FFmpeg’s H.264 software decoding.
    • vulkan_video - uses Vulkan Video for hardware-accelerated decoding.

InputWhipAudioOptions

Parameters of a audio source included in the WHIP stream.

Type definitions

type InputWhipAudioOptions =
{
decoder: "opus";
forwardErrorCorrection?: bool;
}

Properties (decoder: “opus”)

forwardErrorCorrection

Specifies whether the stream uses forward error correction. It’s specific for the Opus codec. For more information, visit RFC specification.

  • Type: bool
  • Default value: false