NorskInput.fileImage() method

Read an image from a file. Various image formats are supported, see the documentation for FileImageInputSettings for more details.

Signature:

fileImage(settings: FileImageInputSettings): Promise<FileImageInputNode>;

Parameters

Parameter Type Description

settings

FileImageInputSettings

Configuration for the file input

The image will then be provided into Norsk as a video at 25fps for use in other operations

Returns:

Example [14_compose.ts]

Compose multiple sources into a single output and vary how they are arranged

const fileSettings: LocalFileInputSettings = {
  fileName: "/mnt/data/Norsk.png",
  sourceName: "logoInput",
  id: "logoInput"
};

const norsk = await Norsk.connect();
const input1 = await norsk.input.srt(srtSettings);
const input2 = await norsk.input.rtmpServer(rtmpSettings);
const input3 = await norsk.input.fileImage(fileSettings);

Run the following commands together to generate example inputs at urls srt://127.0.0.1:5001?pkt_size=1316, rtmp://127.0.0.1:1935/acme/high:

ffmpeg -v error -re -stream_loop -1 -i data/InkDrop.ts  -vcodec copy -codec copy -f mpegts -flush_packets 0 'srt://127.0.0.1:5001?pkt_size=1316'
ffmpeg -v error -re -stream_loop -1 -i data/Weaving.ts  -vcodec copy -codec copy -f flv 'rtmp://127.0.0.1:1935/acme/high'

Find Examples