FileMp4InputSettings interface

Settings for an File Based Mp4 Input see: NorskInput.fileMp4()

Signature:

export interface FileMp4InputSettings extends SourceNodeSettings<FileMp4InputNode>, StreamStatisticsMixin

Properties

Property Type Description

eofWarningMs?

number

(Optional) If set, fire onApproachingEof when playback is within this many ms of the end of the file

fileName

string

Path to the MP4 file to read

loop?

boolean

(Optional) Whether to loop back to the start of the file after reaching the end (default false)

mediaSpeed?

number

(Optional) Trick-play media-speed multiplier. Defaults to normal (1). Values greater than 1 fast-forward and values less than 1 slow-motion the media timeline (the frames' PTS/DTS are rewritten), unlike FileMp4InputSettings.playbackRate which only changes wall-clock pacing. Must be greater than 0. Pair with a downstream frame-rate-conversion node for clean constant-rate output; audio is dropped whenever the speed is not 1.

Not supported together with loop (the loop restart is a backward media-time jump, which trick-play retiming does not currently rebase); use a single non-looping pass at mediaSpeed != 1.

onApproachingEof?

() ⇒ void

(Optional) Callback to be notified when playback is approaching the end of the file. Requires eofWarningMs to be set.

onEof?

() ⇒ void

(Optional) Callback to be notified when the file ends

onInfo?

(info: FileMp4Info) ⇒ void

(Optional) Callback to be notified when the file is initially read

onLoop?

() ⇒ void

(Optional) Callback to be notified when the file loops on hitting the end

onStopPosition?

() ⇒ void

(Optional) Callback to be notified when the file reaches the specified stop position

playbackRate?

number

(Optional) Playback rate multiplier. Defaults to realtime (1). Values greater than 1 play the file faster than realtime - useful for speeding up file-based tests and VOD-style fast transcode. Only meaningful for file inputs; has no effect on live/network sources.

sourceName

string

The source name to set in the stream key of the outgoing stream

start?

'playing' | 'paused'

(Optional) Whether to start paused or already playing (default: playing)

timeDomain?

TimeDomain

(Optional) Optional time-domain configuration. When set, the input is placed into a named coordinator and is timestamp-aligned with all other inputs sharing the same domain id within this Norsk instance. Omit for the default (uncoordinated) behaviour.