import * as grpc from "@grpc/grpc-js"; import { FileTsInputMessage, M3u8MediaInputMessage, RtmpError_InvalidStreamResponse, RtmpError_UnsupportedAudio, RtmpError_UnsupportedVideo, StreamKey as StreamKeyPB, TimestampProgramNudge, TsInputEvent, UdpTsInputMessage } from "@norskvideo/norsk-api/lib/media_pb"; import { DeckLinkDisplayModeId, DeckLinkPixelFormat, DeckLinkVideoConnection, FrameRate } from "../types"; import { MediaClient, MediaNodeState, SourceMediaNode, SourceNodeSettings, StreamStatisticsMixin } from "./common"; import { BrowserEvent, ChannelLayout, IceServerSettings, ImageFormat, Interval, PixelFormat, RtmpServerInputStatus, RtpLinearPcmBitDepth, SampleFormat, SampleRate, SrtInputStatus, SrtMode, Wave } from "./types"; /** * @public * Base settings for most input nodes * */ export interface InputSettings extends SourceNodeSettings { /** The source name to set on the stream key on the outgoing stream from this node */ sourceName: string; } /** * @public * Base settings for any input node requiring access to a host:port pair * */ export interface RemoteInputSettings extends InputSettings { /** The IP or hostname of the remote server*/ host: string; /** The port the remote server is listening on*/ port: number; } /** * @public * A description of a LinearPCM stream being delivered via RTP * */ export interface RtpLinearPcm { kind: "linearpcm"; /** The sample rate of the stream */ sampleRate: SampleRate; /** The channel layotu the stream */ channelLayout: ChannelLayout; /** The bit depth of the stream */ bitDepth: RtpLinearPcmBitDepth; } /** * @public * A description of an Eac3 stream being delivered via RTP * */ export interface RtpEac3 { kind: "eac3"; /** The clock rate of the stream */ clockRate: number; /** The language code (this will end up in outgoing metadata). RFC 5646 language tag. */ languageCode?: string; ec3Extension: boolean; complexityIndex: number; } /** * @public * A description of a Mpeg4 Generic Aac stream * */ export interface RtpMpeg4GenericAacHbr { kind: "mpeg4-generic-aac-hbr"; config: string; } /** * @public * A description of an H264 stream delivered over RTP * */ export interface RtpH264 { kind: "h264"; /** The clock rate of the stream */ clockRate: number; } /** * @public * A description of an HEVC stream delivered over RTP * */ export interface RtpHEVC { kind: "hevc"; /** The clock rate of the stream */ clockRate: number; } /** * @public * A description of an incoming RTP stream * */ export interface RtpStreamSettings { /** A streamID to assign to the outgoing stream key */ streamId: number; /** The IP Address to join the RTP stream on */ ip: string; /** The interface to bind to, "loopback" and "any" are special cases * and anything else will be interpreted as the name of a network interface */ interface: string; /** The port to connect to for the RTP stream itself */ rtpPort: number; /** The port to connect to for the associated RTCP stream */ rtcpPort: number; /** A description of the stream being joined */ streamType: RtpLinearPcm | RtpEac3 | RtpMpeg4GenericAacHbr | RtpH264 | RtpHEVC; } /** * @public * Settings for an RTP input * see: {@link NorskInput.rtp} * */ export interface RtpInputSettings extends SourceNodeSettings, StreamStatisticsMixin { sourceName: string; streams: readonly RtpStreamSettings[]; } /** * @public * The stream keys in an RTMP input stream */ export type RtmpServerStreamKeys = { audioStreamKey: StreamKeyPB; videoStreamKey: StreamKeyPB; }[]; /** * @public * see: {@link NorskInput.rtp} */ export declare class RtpInputNode extends SourceMediaNode { /** * @public * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds * */ nudge(nudge: number): void; } /** * @public * Settings to control how RTMP streams can be included as sources in your media workflow * see: {@link NorskInput.rtmpServer} */ export interface RtmpServerInputSettings extends SourceNodeSettings, StreamStatisticsMixin { /** The port the RTMP server should listen on */ port?: number; ssl?: boolean; sslOptions?: { certFile?: string; keyFile?: string; }; /** * On connect callback, use to accept/reject connections given app/url in use * @eventProperty */ onConnection?: ( /** The connection ID, unique to this RtmpServer node */ connectionId: string, /** The RTMP "app" field from the connection string */ app: string, /** The full URL of the RTMP connection string */ url: string) => { accept: true; } | { accept: false; reason?: string; }; /** * On stream callback, set up the stream keys for a given stream or reject the stream * @eventProperty */ onStream?: ( /** The connection ID, unique to this RtmpServer node */ connectionId: string, /** The RTMP "app" field from the connection string */ app: string, /** The full URL of the RTMP connection string */ url: string, /** The Norsk streamId of this media stream */ streamId: number, /** TODO - publishingName */ publishingName: string) => OnStreamResult; /** * Called when the connection status has changed (e.g. when the RTMP connection drops) * @eventProperty */ onConnectionStatusChange?: ( /** The connection ID, unique to this RtmpServer node */ connectionId: string, /** The new connection state */ status: RtmpServerInputStatus, /** The audio and video stream keys that were present in the stream at the time of the status change */ streamKeys: { audioStreamKey: StreamKeyPB; videoStreamKey: StreamKeyPB; }[]) => void; onConnectionError?: ( /** The connection ID, unique to this RtmpServer node */ connectionId: string, /** The error */ error: RtmpError_UnsupportedVideo | RtmpError_UnsupportedAudio | RtmpError_InvalidStreamResponse) => void; onConnectionBytesRead?: ( /** The connection ID, unique to this RtmpServer node */ connectionId: string, /** The number of bytes read, as reported by the peer */ bytesRead: bigint) => void; } /** * @public * Return type to enable control of an RTMP stream once media arrives on it */ export type OnStreamResult = /** Accept the stream */ { accept: true; videoStreamKey: StreamKeyPB | StreamKeySettings; audioStreamKey: StreamKeyPB | StreamKeySettings; } /** Reject the stream */ | { accept: false; reason: string; }; /** @public */ export interface StreamKeySettings { /** Source name. Default: the rtmp app */ sourceName?: string; /** Program number. Default: 1 */ programNumber?: number; /** Stream Id. Default: 1 for audio, 2 for video */ streamId?: number; /** Rendition name. Default: the stream publishing name */ renditionName?: string; } /** * @public * see: {@link NorskInput.rtmpServer} */ export declare class RtmpServerInputNode extends SourceMediaNode { /** * @public * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds * */ nudge(sourceName: string, programNumber: number, nudge: number): void; /** * @public * Close the given connection (i.e. a single client rather than the listeningserver) */ closeConnection(connectionId: string): void; } declare enum TsInputType { TsFile = 0, Srt = 1, Udp = 2, M3u8 = 3 } declare class TsCommonInputNode extends SourceMediaNode { constructor(tsType: TsInputType, client: MediaClient, unregisterNode: (node: MediaNodeState) => void, settings: SourceNodeSettings & StreamStatisticsMixin, nudgeFn: (nudge: TimestampProgramNudge) => SourceMessage, onEof: (() => void) | undefined, grpcStartFn: () => grpc.ClientDuplexStream); /** * @public * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds * */ nudge(programNumber: number, nudge: number): void; } /** * @public * Settings to control SDI capture through a DeckLink card * see: {@link NorskInput.deckLink} */ export interface DeckLinkInputSettings extends InputSettings, StreamStatisticsMixin { /** Which card to use */ cardIndex: number; /** The audio channel layout for the input */ channelLayout: ChannelLayout; /** SDI or HDMI capture */ videoConnection: DeckLinkVideoConnection; /** Typically left undefined, but can be used to force capture for a specific {@link DeckLinkDisplayModeId}. If * the source is not currently in this mode, then no capture will occur. */ displayModeId?: DeckLinkDisplayModeId; pixelFormat?: DeckLinkPixelFormat; } /** * @public * SDI capture through a DeckLink card. * see: {@link NorskInput.deckLink}. */ export declare class DeckLinkInputNode extends SourceMediaNode { /** * @public * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds * */ nudge(nudge: number): void; } /** * @public * Settings to control SDI capture through a Deltacast card * see: {@link NorskInput.deltaCast} */ export interface DeltacastInputSettings extends SourceNodeSettings, StreamStatisticsMixin { /** Which device to use */ deviceId: number; channels: { /** Which channel on the device to use */ channelIndex: number; /** sourceName of this channel **/ sourceName: string; }[]; /** Should video be captured? Defaults to true, but for applications that only require the audio * there is a small efficiency gain by setting to false */ captureVideo?: boolean; /** * An SDI signal can contain up to 16 (3G) or 32 (6G / 12G) audio channels, which are * transmitted as groups of 4. For example, a single stereo signal would typically be * encoded with the left audio on the first channel of the first group, and the right * audio as the second channel of the first group. The remaining 2 channels on the first * group will contain silence. Deltacast input captures all audio channels that are present * in the signal and returns them as mono streams; the audioBuidMultichannel node can be * used to combine these mono streams into stereo, 5.1 etc. * The audioChannelMask is a bit field that indicates which streams should be returned out * of those present in the signal. Taking the stereo signal example from above, a sensible * mask would be 0x3, indicating that channels 0 and 1 should be returned - thus saving * your code from needing to deal with channels 2 and 3, which you know to just be silent. * If you set a bit that is *not* present in the signal, then no stream will be created - * only streams present in the signal will be returned. * If left undefined, then a default of 0xFFFFFFFF is used - i.e., capture all */ audioChannelMask?: number; } /** * @public * SDI capture through a Deltacast card. * see: {@link NorskInput.deltaCast}. */ export declare class DeltacastInputNode extends SourceMediaNode { /** * @public * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds * */ nudge(nudge: number): void; } /** * @public * Settings to control NDI capture * see: {@link NorskInput.ndi} */ export interface NdiInputSettings extends SourceNodeSettings, StreamStatisticsMixin { /** sourceName of this capture */ sourceName: string; /** the NDI source name or url to capture from, which can be found through `ndiDiscovery` */ ndiSource: { url: string; } | { name: string; }; /** The receive name to publish to the source */ ndiReceiveName: string; /** Override the source frame rate - should only be used if you have reason to beleive that the frame rate announced by the source is incorrect. * Selecting a frame rate that differs from the source will lead to undefined behaviour */ sourceFrameRate?: { variable: undefined; } | { fixed: FrameRate; }; /** Called when the receiver is initialised; you could use this to avoid starting other nodes until frame reception is guaranteed */ onInitialised?: () => void; } /** * @public * NDI Capture * see: {@link NorskInput.ndi}. */ export declare class NdiInputNode extends SourceMediaNode { /** * @public * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds * */ nudge(nudge: number): void; } /** @public */ export interface WhipInputSettings extends InputSettings, StreamStatisticsMixin { /** List of ice servers to use as part of session negotiation */ iceServers?: IceServerSettings[]; /** Internal addresses for the ice servers (defaults to iceServers) */ reportedIceServers?: IceServerSettings[]; /** * List of IPs to advertise as your host address - useful e.g. when on a cloud server * so that the public rather than private IP is used. */ hostIps?: string[]; /** * Similar to hostIps, but a list of server reflexive candidates so that ICE negotiations can be * sped up */ serverReflexiveIps?: string[]; } /** * @public * see: {@link NorskInput.whip} */ export declare class WhipInputNode extends SourceMediaNode { /** @public The URL of the local test client */ clientUrl: string; /** @public The URL of the WHIP endpoint */ endpointUrl: string; /** * @public * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds * */ nudge(sourceName: string, programNumber: number, nudge: number): void; } /** * @public * The standard settings for any node reading from a file * */ export interface LocalFileInputSettings extends InputSettings { /** The file to be read from */ fileName: string; /** An optional callback that will be invoked when file end is reached */ onEof?: () => void; } /** * @public * see: {@link NorskInput.fileWebVtt} */ export interface WebVttFileInputSettings extends LocalFileInputSettings { /** Language tag to associate with the stream (optional) */ language?: string; /** Rendition Name to associate with the stream (optional, default "default") */ renditionName?: string; } /** * @public * see: {@link NorskInput.fileWebVtt} */ export declare class FileWebVttInputNode extends SourceMediaNode { } /** * @public * see: {@link NorskInput.streamWebVtt} */ export interface StreamWebVttInputSettings extends InputSettings { /** Language tag to associate with the stream (optional) */ language?: string; /** Rendition Name to associate with the stream (optional, default "default") */ renditionName?: string; } /** * @public * see: {@link NorskInput.streamWebVtt} */ export declare class StreamWebVttInputNode extends SourceMediaNode { sendChunk(chunk: string): void; sendCue(cue: { startTimestamp: Interval; endTimestamp: Interval; text: string; }): void; /** * @public * Applies a nudge to the outgoing stream timestamps by the specified number of milliseconds. * Unlike audio/video inputs this nudge is not gradual but abrupt, as the input is not continuous * */ nudge(nudge: number): void; } /** @public */ export interface FileTsInputSettings extends LocalFileInputSettings, StreamStatisticsMixin { /** Whether to loop back to the start of the file after reaching the end */ loop?: boolean; /** Whether to start paused or already playing (default: playing) */ start?: 'playing' | 'paused'; } /** @public */ export interface FileTsInputSettingsUpdate { /** Whether to loop back to the start of the file after reaching the end */ loop?: boolean; } /** * @public * see: {@link NorskInput.fileTs} */ export declare class FileTsInputNode extends TsCommonInputNode { updateSettings(settings: FileTsInputSettingsUpdate): void; pause(): void; play(): void; } /** * @public * The return value for the {@link SrtInputSettings.onConnection} callback * determining what to do with an incoming stream */ export type SrtConnectionResult = /** Accept the stream */ { accept: true; /** The source name to assign to the connection */ sourceName: string; } /** Reject the stream */ | { accept: false; }; /** * @public * Settings for an SRT Input node * see: {@link NorskInput.srt} */ export interface SrtInputSettings extends InputSettings, StreamStatisticsMixin { /** The IP or hostname of the remote server*/ host: string; /** * The port to listen on in listener mode, or to connect to in caller mode * * In listener mode the port may be given as 0 to bind to an automatically assigned port, which can be retrieved in `onBind`. */ port: number; /** * The mode to act in (caller or listener) */ mode: SrtMode; /** * Passphrase for encryption */ passphrase?: string; /** * Stream ID to set on the socket when acting in caller mode */ streamId?: string; /** * The latency value in the receiving direction of the socket (SRTO_RCVLATENCY) */ receiveLatency?: number; /** * The latency value provided by the sender side as a minimum value for the receiver (SRTO_PEERLATENCY) */ peerLatency?: number; /** * Input bandwidth (SRTO_INPUTBW) */ inputBandwidth?: number; /** * Overhead bandwidth (SRTO_OHEADBW) */ overheadBandwidth?: number; /** * Max bandwidth (SRTO_MAXBW) */ maxBandwidth?: number; /** * Idle timeout after which to disconnect if no data received. If unspecified a default timeout is used */ peerIdleTimeoutMs?: number; /** * Called when a listener-mode SRT input binds to the interface */ onBind?: (info: { port: number; }) => void; /** * On connect callback, notifying that a new caller has connected (in listener mode) and set the source name accordingly * @eventProperty */ onConnection?: ( /** The stream_id sent on the SRT socket (or empty if none was set) */ streamId: string, /** * Identifier indicating which connection this message refers to (for a * listener which may have multiple connections) */ index: number, /** The address of the remote host */ remoteHost: string) => SrtConnectionResult; /** * Called when the connection status has changed (e.g. when the SRT socket is closed) * @eventProperty */ onConnectionStatusChange?: ( /** The new connection state */ status: SrtInputStatus, /** The source name assigned to the connection which changed status */ sourceName: string | undefined) => void; } /** * @public * see: {@link NorskInput.srt} */ export declare class SrtInputNode extends SourceMediaNode { /** * @public * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds * */ nudge(sourceName: string, programNumber: number, nudge: number): void; /** * @public * Closes a connected stream as specified by 'streamIndex' * @param streamIndex - the index of the stream to be terminated * */ closeStream(streamIndex: number): void; } /** * @public * Settings for a UDP Transport Stream input * see: {@link NorskInput.udpTs} * */ export interface UdpTsInputSettings extends RemoteInputSettings { /** Optional interface to bind to */ interface?: string; /** Timeout in milliseconds before determining the input is closed */ timeout?: number; /** Whether to expect the input TS to be encapsulated in RTP via RFC 2250 (default: false) */ rtpDecapsulate?: boolean; } /** * @public * see: {@link NorskInput.udpTs} */ export declare class UdpTsInputNode extends TsCommonInputNode { } /** @public */ export interface M3u8MediaInputSettings extends InputSettings { url: string; } /** * @public * see: {@link NorskInput.m3u8Media} */ export declare class M3u8InputNode extends TsCommonInputNode { } /** * @public * Settings for a Browser Application (Chromium Embedded Framework - CEF). * Multiple browser input nodes will share an underlying CEF instance if * the BrowserAppSettings are the same * */ export interface BrowserAppSettings { /** The path to store the browser cache. Should be unique across instances */ cachePath: string; /** The path for the CEF log file. Should be unique across instances */ logFile: string; /** The logging severity for CEF */ logSeverity: "emergency" | "alert" | "critical" | "error" | "warning" | "notice" | "info" | "debug"; /** Additional Chromium args (as documented in https://peter.sh/experiments/chromium-command-line-switches/). */ additionalArgs: string[]; } /** * @public * Settings for a Browser Input * see: {@link NorskInput.browser} * */ export interface BrowserInputSettings extends SourceNodeSettings, StreamStatisticsMixin { /** The CEF settings to use for this browser input */ appConfig?: BrowserAppSettings; /** The url to load in the browser session */ url: string; /** This is the resolution of the window opened to render the page * This is therefore also output resolution of the generated video */ resolution: { width: number; height: number; }; /** The source name to populate the outgoing stream key with */ sourceName: string; /** The frame rate at which to generate video from the web page * Note: If the web page is static, this will just mean the initial frame * is duplicated at the required frame rate * */ frameRate: FrameRate; /** An optional callback for reacting to events from the embedded browser * At the very least this is useful for logging events (such as a 404) * */ onBrowserEvent?: (event: BrowserEvent) => void; } /** * @public * A settings update for a running browser * see: {@link BrowserInputNode.updateConfig} * */ export interface BrowserInputSettingsUpdate { /** Optionally, a new URL to load within the active session */ url?: string; /** Optionally, a new resolution to use for outgoing video */ resolution?: { width: number; height: number; }; } /** * @public * see: {@link NorskInput.browser} */ export declare class BrowserInputNode extends SourceMediaNode { /** * @public * Supply new config for an active web browser session * */ updateConfig(settings: BrowserInputSettingsUpdate): void; /** * @public * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds * */ nudge(nudge: number): void; } /** * @public * Settings for an Audio Signal Generator * see: {@link NorskInput.audioSignal} * */ export interface AudioSignalGeneratorSettings extends SourceNodeSettings { /** The source name to set in the stream key of the outgoing stream */ sourceName: string; /** The audio channel layout of the generated stream */ channelLayout: ChannelLayout; /** The sample rate of the generated stream */ sampleRate: SampleRate; /** The sample format to use. Default: "fltp" */ sampleFormat?: SampleFormat; /** The language tag to use. Defaults to no language */ language?: string; /** Number of audio samples per frame. Defaults to 1024 */ numSamplesPerFrame?: number; /** Number of frames to output. Defaults to infinite */ numFrames?: number; /** * Waveform - construct a {@link Wave} directoy, or from DMTF digits via {@link mkDtmf} * * If unspecified an arbitrary default signal is generated */ wave?: Wave; } /** * @public * see: {@link NorskInput.audioSignal} */ export interface AudioSignalGeneratorSettingsUpdate { /** * Updated waveform. If unspecified the originally configured waveform is retained */ wave?: Wave; } /** * @public * see: {@link NorskInput.audioSignal} */ export declare class AudioSignalGeneratorNode extends SourceMediaNode { /** @public */ updateConfig(update: AudioSignalGeneratorSettingsUpdate): void; } /** * @public * Settings for an Video Testcard Generator * see: {@link NorskInput.videoTestCard} * */ export interface VideoTestcardGeneratorSettings extends SourceNodeSettings { /** The source name to set in the stream key of the outgoing stream */ sourceName: string; /** The number of frames to send before shutting down */ numberOfFrames?: number; /** Resolution of the test card stream **/ resolution: { width: number; height: number; }; /** Framerate of the produced video stream **/ frameRate: { frames: number; seconds: number; }; /** The pattern to use on the test card (if any) */ pattern: Pattern; /** Optional pixel format of the raw stream **/ pixelFormat?: PixelFormat; /** Optionally make an interlaced source */ interlaced?: boolean; } type Pattern = "black" | "smpte75" | "smpte100"; /** * @public * see: {@link NorskInput.audioSignal} */ export declare class VideoTestcardGeneratorNode extends SourceMediaNode { } /** * @public * Settings for an image file source * see: {@link NorskInput.fileImage} * */ export interface FileImageInputSettings extends SourceNodeSettings, StreamStatisticsMixin { /** The source name to set in the stream key of the outgoing stream */ sourceName: string; /** the filename to read the image from */ fileName: string; /** The file format for the image. Will be inferred from the file name if not specified. */ imageFormat?: ImageFormat; /** Optional hardware acceleration to upload frames in */ hardwareAcceleration?: 'quadra'; } /** * @public * see: {@link NorskInput.fileImage} */ export declare class FileImageInputNode extends SourceMediaNode { } /** * @public * Settings for an File Based Mp4 Input * see: {@link NorskInput.fileMp4} */ export interface FileMp4InputSettings extends SourceNodeSettings, StreamStatisticsMixin { /** The source name to set in the stream key of the outgoing stream */ sourceName: string; /** Path to the MP4 file to read */ fileName: string; /** Callback to be notified when the file ends */ onEof?: () => void; /** Callback to be notified when the file loops on hitting the end */ onLoop?: () => void; /** Callback to be notified when the file reaches the specified stop position */ onStopPosition?: () => void; /** Callback to be notified when the file is initially read */ onInfo?: (info: FileMp4Info) => void; /** Whether to loop back to the start of the file after reaching the end (default false) */ loop?: boolean; /** Whether to start paused or already playing (default: playing) */ start?: 'playing' | 'paused'; } /** * @public * Settings for updating a file-based Mp4 Input * see: {@link FileMp4InputNode.updateSettings} */ export interface FileMp4InputSettingsUpdate { /** Whether to loop back to the start of the file after reaching the end */ loop?: boolean; } /** * @public * Information about an Mp4 File * */ export interface FileMp4Info { /** The duration of the Mp4 file in millseconds (if known) */ durationMs?: number; /** The total length of the mp4 file in bytes, if known */ byteLength?: number; } /** * @public * see: {@link NorskInput.fileMp4} */ export declare class FileMp4InputNode extends SourceMediaNode { /** * @public * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds * */ nudge(nudge: number): void; updateSettings(settings: FileMp4InputSettingsUpdate): void; /** Pause the MP4 playback. This may not take fully immediate effect, frames already in flight within the Mp4Input workflow will still be emitted */ pause(): void; /** Start/resume the MP4 playback */ play(): void; /** Start MP4 playback, pausing once the given offset is reached */ playUntil(offsetMs: number): void; /** Seek to a given point, without starting playback. When the stream is played/resumed, it will start from (about) this offset */ seek(offsetMs: number): void; } /** * @public * Settings for an File Based WAV Input * see: {@link NorskInput.fileWav} */ export interface FileWavInputSettings extends SourceNodeSettings { /** The source name to set in the stream key of the outgoing stream */ sourceName: string; /** Path to the WAV file to read */ fileName: string; } /** * @public * see: {@link NorskInput.fileWav} */ export declare class FileWavInputNode extends SourceMediaNode { } /** * @public * Methods that allow you to ingest media into your application */ export interface NorskInput { /** Create an RTMP Server to receive RTMP streams into your application * @param settings - Configuration for the RTMP server */ rtmpServer(settings: RtmpServerInputSettings): Promise; /** * Read from a Transport Stream file with realtime playback. * @param settings - Configuration for the file input */ fileTs(settings: FileTsInputSettings): Promise; /** * Stream from a SRT source * @param settings - Configuration for the SRT input */ srt(settings: SrtInputSettings): Promise; /** * Receive media via WebRTC via the WHIP standard. * * Here Norsk acts as the Media Server receiving from a remote WHIP client, to act as the * WHIP client sending to a remote media server see {@link NorskOutput.whip}. For a duplex * connection to a browser peer see {@link NorskDuplex.webRtcBrowser}. * * @param settings - Configuration for the WHIP input */ whip(settings: WhipInputSettings): Promise; /** * Pull an m3u8 HLS media stream and output it into Norsk in realtime */ m3u8Media(settings: M3u8MediaInputSettings): Promise; /** * Read from a Transport Stream on the network * This can be multicast/unicast or broadcast * @param settings - Configuration for the UDP input */ udpTs(settings: UdpTsInputSettings): Promise; /** * Read subtitles from a WebVTT file on disk * @param settings - Configuration for the file input */ fileWebVtt(settings: WebVttFileInputSettings): Promise; /** * Stream subtitles in WebVTT format via API calls. Chunks of WebVTT cues can be sent * in an ongoing timeline (as if streaming a fragmented WebVTT file) * @param settings - Configuration for the stream input */ streamWebVtt(settings: StreamWebVttInputSettings): Promise; /** * Read an image from a file. Various image formats are supported, see the * documentation for {@link FileImageInputSettings} for more details. * @param settings - Configuration for the file input * * The image will then be provided into Norsk as a video at 25fps for use * in other operations */ fileImage(settings: FileImageInputSettings): Promise; /** * Read a MP4 (fragmented or not) from a file with realtime playback. * This will not play frames that are written to the file after the node * starts. * @param settings - Configuration for the file input */ fileMp4(settings: FileMp4InputSettings): Promise; /** * Read a WAV file with PCM audio with realtime playback. * @param settings - Configuration for the file input */ fileWav(settings: FileWavInputSettings): Promise; /** * Stream from a remote RTP source * * Note that MPEG-TS sources encapsulated in RTP should use the {@link NorskInput.udpTs} input with appropriate config. * @param settings - Configuration for the RTP input */ rtp(settings: RtpInputSettings): Promise; /** * Generate a test video card with a configurable pattern. * @param settings - Configuration for the video test card */ videoTestCard(settings: VideoTestcardGeneratorSettings): Promise; /** * Generate a test audio signal with a configurable waveform. * @param settings - Configuration for the audio signal */ audioSignal(settings: AudioSignalGeneratorSettings): Promise; /** * Generates a video source by rendering an HTML page * @param settings - Settings for the web page */ browser(settings: BrowserInputSettings): Promise; /** * SDI/HDMI Input using a BlackMagic DeckLink card. * The available cards on the machine can be enumerated using the {@link NorskSystem.hardwareInfo} API. * * Multiple cards and both SDI and HDMI inputs are supported, with all DeckLink-supported * input resolutions and framerates are supported. The capture format is currently 8-bit only, * but 10-bit captures will be supported soon. All supported audio channels can be captured. * At present, additional data such as closed-captions and HDR metadata is not captured. * @param settings - Settings for the SDI capture */ deckLink(settings: DeckLinkInputSettings): Promise; /** * SDI Input using Deltacast SDI capture cards. * The available cards on the machine can be enumerated using the * `HardwareInfo` rpc. * * Multiple cards are supported, with all * Deltacast-supported input resolutions and framerates are supported. The * capture format is currently 8-bit only. All supported audio channels can be captured. At present, * additional data such as closed-captions and HDR metadata is not captured. */ deltaCast(settings: DeltacastInputSettings): Promise; /** * NDI Input. Available NDI sources can be enumerated using the `ndiDiscovery` call * @param settings - Settings for the NDI capture */ ndi(settings: NdiInputSettings): Promise; } export {}; //# sourceMappingURL=input.d.ts.map