Source / Output
ffmpeg.filter.audio_video.output
Return a source with audio and video from a filter's output.
Type:
(?id : string?, ffmpeg.filter.graph, 'b
.{tracks : () -> 'a.{audio : ffmpeg.filter.audio}}, 'd
.{tracks : () -> 'c.{video : ffmpeg.filter.video}}) ->
source(audio=ffmpeg.audio.raw('e), video=ffmpeg.video.raw('f))
Arguments:
id(of typestring?, which defaults tonull)(unlabeled)(of typeffmpeg.filter.graph): Force the value of the source ID.(unlabeled)(of type'b.{tracks : () -> 'a.{audio : ffmpeg.filter.audio}})(unlabeled)(of type'd.{tracks : () -> 'c.{video : ffmpeg.filter.video}})
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.skip(of type() -> unit): Skip to the next track.time(of type() -> float): Get a source's time, based on its assigned clock.
output
Output a stream using the default operator. The input source does not need to be infallible, blank will just be played during failures.
Type:
(?id : string?, ?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?start : bool, source(audio=pcm('A))) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.fallible(of typebool, which defaults totrue): Allow the child source to fail, in which case the output will be (temporarily) stopped.on_start(of type() -> unit, which defaults to{()}): Callback executed when outputting starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when outputting stops.start(of typebool, which defaults totrue): Automatically start outputting whenever possible. Iftrue, an infallible (normal) output will start as soon as it is created, and a fallible output will (re)start as soon as its source becomes available for streaming.(unlabeled)(of typesource(audio=pcm('A))): Source to play.
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.alsa
Output the source's stream to an ALSA output device.
Type:
(?id : string?, ?buffer_size : float?, ?device : string, ?fallible : bool,
?on_start : (() -> unit), ?on_stop : (() -> unit), ?register_telnet : bool,
?self_sync : bool, ?start : bool, source(audio=pcm('a), 'b)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.buffer_size(of typefloat?, which defaults tonull): ALSA buffer size in seconds. Defaults to frame duration whennull.device(of typestring, which defaults to"default"): Alsa device to usefallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.self_sync(of typebool, which defaults totrue): Mark the source as being synchronized by the ALSA driver.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typesource(audio=pcm('a), 'b))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.ao
Output stream to local sound card using libao.
Type:
(?id : string?, ?channels_matrix : string, ?driver : string,
?fallible : bool, ?on_start : (() -> unit), ?on_stop : (() -> unit),
?options : [string * string], ?register_telnet : bool, ?self_sync : bool,
?start : bool, source(audio=pcm('a), 'b)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.channels_matrix(of typestring, which defaults to""): Output channels matrix, "" for AO's default.driver(of typestring, which defaults to""): Driver to be used, "" for AO's default.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.options(of type[string * string], which defaults to[]): List of parameters, depends on the driver.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.self_sync(of typebool, which defaults totrue): Use the dedicated AO clock.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typesource(audio=pcm('a), 'b))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.audio_video
Output a stream with audio and video using the default operator. The input source does not need to be infallible, blank will just be played during failures.
Type:
(?id : string?, ?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?start : bool, source(audio=pcm('A),
video=canvas('a), 'b)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.fallible(of typebool, which defaults totrue): Allow the child source to fail, in which case the output will be (temporarily) stopped.on_start(of type() -> unit, which defaults to{()}): Callback executed when outputting starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when outputting stops.start(of typebool, which defaults totrue): Automatically start outputting whenever possible. Iftrue, an infallible (normal) output will start outputting as soon as it is created, and a fallible output will (re)start as soon as its source becomes available for streaming.(unlabeled)(of typesource(audio=pcm('A), video=canvas('a), 'b)): Source to play.
output.dummy
Dummy output: computes the stream, without actually using it.
Type:
(?id : string?, ?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?register_telnet : bool, ?start : bool, source('a)) ->
unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.external
Send the stream to a process' standard input.
Type:
(?id : string?, ?export_cover_metadata : bool, ?fallible : bool,
?flush : bool, ?on_reopen : (() -> unit), ?on_start : (() -> unit),
?on_stop : (() -> unit), ?register_telnet : bool, ?reopen_delay : {float},
?reopen_on_error : ((error
.{
kind : string,
message : string,
trace : [
{
cstart : int,
cstop : int,
filename : string,
lstart : int,
lstop : int,
to_string : (?prefix : string) -> string
}]
}?) -> float?),
?reopen_on_metadata : (([string * string]) -> bool),
?reopen_when : (() -> bool), ?self_sync : bool, ?start : bool, format('a),
{string}, source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.export_cover_metadata(of typebool, which defaults totrue): Export cover metadata.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.flush(of typebool, which defaults tofalse): Perform a flush after each write.on_reopen(of type() -> unit, which defaults to{()}): Callback executed when the output is reopened.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.reopen_delay(of type{float}, which defaults to120.0): Prevent re-opening within that delay, in seconds. Only applies toreopen_when.reopen_on_error(of type(error .{ kind : string, message : string, trace : [ { cstart : int, cstop : int, filename : string, lstart : int, lstop : int, to_string : (?prefix : string) -> string }] }?) -> float?, which defaults to<fun>): Callback called when there is an error. Error is raised when returningnull. Otherwise, the file is reopened after the returned value, in seconds.reopen_on_metadata(of type([string * string]) -> bool, which defaults tofun (_) -> false): Callback called on metadata. If returned value istrue, the file is reopened.reopen_when(of type() -> bool, which defaults to{false}): Callback called on each frame. If returned value istrue, the file is reopened.self_sync(of typebool, which defaults tofalse): Set totrueif the process is expected to control the output's latency. Typical example:ffmpegwith the-recommand-line option.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typeformat('a)): Process to pipe data to.(unlabeled)(of type{string}): Encoding format.(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reopen(of type() -> unit): Reopen the output pipe. The actual reopening happens the next time the output has some data to output.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.file
Output the source stream to a file.
Type:
(?id : string?, ?append : bool, ?dir_perm : int,
?export_cover_metadata : bool, ?fallible : bool, ?flush : bool,
?on_close : ((string) -> unit), ?on_reopen : (() -> unit),
?on_start : (() -> unit), ?on_stop : (() -> unit), ?perm : int,
?register_telnet : bool, ?reopen_delay : {float},
?reopen_on_error : ((error
.{
kind : string,
message : string,
trace : [
{
cstart : int,
cstop : int,
filename : string,
lstart : int,
lstop : int,
to_string : (?prefix : string) -> string
}]
}?) -> float?),
?reopen_on_metadata : (([string * string]) -> bool),
?reopen_when : (() -> bool), ?start : bool, format('a), {string},
source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.append(of typebool, which defaults tofalse): Do not truncate but append in the file if it exists.dir_perm(of typeint, which defaults to511): Permission of the directories if some have to be created, up to umask. Although you can enter values in octal notation (0oXXX) they will be displayed in decimal (for instance, 0o777 = 7×8^2 + 7×8 + 7 = 511).export_cover_metadata(of typebool, which defaults totrue): Export cover metadata.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.flush(of typebool, which defaults tofalse): Perform a flush after each write.on_close(of type(string) -> unit, which defaults tofun (_) -> ()): This function will be called for each file, after that it is finished and closed. The filename will be passed as argument.on_reopen(of type() -> unit, which defaults to{()}): Callback executed when the output is reopened.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.perm(of typeint, which defaults to438): Permission of the file if it has to be created, up to umask. You can and should write this number in octal notation: 0oXXX. The default value is however displayed in decimal (0o666 = 6×8^2 + 6×8 + 6 = 438).register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.reopen_delay(of type{float}, which defaults to120.0): Prevent re-opening within that delay, in seconds. Only applies toreopen_when.reopen_on_error(of type(error .{ kind : string, message : string, trace : [ { cstart : int, cstop : int, filename : string, lstart : int, lstop : int, to_string : (?prefix : string) -> string }] }?) -> float?, which defaults to<fun>): Callback called when there is an error. Error is raised when returningnull. Otherwise, the file is reopened after the returned value, in seconds.reopen_on_metadata(of type([string * string]) -> bool, which defaults tofun (_) -> false): Callback called on metadata. If returned value istrue, the file is reopened.reopen_when(of type() -> bool, which defaults to{false}): Callback called on each frame. If returned value istrue, the file is reopened.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typeformat('a)): Encoding format.(unlabeled)(of type{string}): Filename where to output the stream.(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reopen(of type() -> unit): Reopen the output pipe. The actual reopening happens the next time the output has some data to output.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.file.hls
Output the source stream to an HTTP live stream served from a local directory.
Type:
(?id : string?, ?dir_perm : int, ?extra_tags : [string], ?fallible : bool,
?on_file_change : ((state : string, string) -> unit),
?on_start : (() -> unit), ?on_stop : (() -> unit), ?perm : int,
?persist_at : string?, ?playlist : string, ?prefix : string,
?register_telnet : bool, ?segment_duration : float,
?segment_name : ((
{
duration : float,
extname : string,
position : int,
stream_name : string,
ticks : int
}) -> string),
?segments : int, ?segments_overhead : int?, ?start : bool,
?strict_persist : bool, ?temp_dir : string?,
?main_playlist_writer : ((extra_tags : [string], prefix : string,
version : int,
[string
.{
bandwidth : int,
codecs : string,
video_size? : int * int
}]) -> string?)?,
string,
[string * format('a)
.{
bandwidth? : int,
codecs? : string,
extname? : string,
extra_tags? : [string],
id3? : bool,
id3_version? : int,
replay_id3? : bool,
video_size? : int * int
}],
source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.dir_perm(of typeint, which defaults to511): Permission of the directories if some have to be created, up to umask.extra_tags(of type[string], which defaults to[]): Extra tags to insert into the main playlist.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.on_file_change(of type(state : string, string) -> unit, which defaults tofun (~state=_,_) -> ()): Callback executed when a file changes.stateis one of:"created","updated"or"deleted", second argument is file path. Typical use: sync file with a CDNon_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.perm(of typeint, which defaults to438): Permission of the created files, up to umask.persist_at(of typestring?, which defaults tonull): Location of the configuration file used to restart the output. Relative paths are assumed to be with regard to the directory for generated file.playlist(of typestring, which defaults to"stream.m3u8"): Playlist name (m3u8 extension is recommended).prefix(of typestring, which defaults to""): Prefix for each files in playlists.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.segment_duration(of typefloat, which defaults to10.0): Segment duration (in seconds).segment_name(of type( { duration : float, extname : string, position : int, stream_name : string, ticks : int }) -> string, which defaults to<fun>): Segment name. Default:fun (metadata) -> "#{metadata.stream_name}_#{metadata.position}.#{metadata.extname}"segments(of typeint, which defaults to10): Number of segments per playlist.segments_overhead(of typeint?, which defaults to5): Number of segments to keep after they have been featured in the live playlist. Set tonullto disable.start(of typebool, which defaults totrue): Start output as soon as it is available.strict_persist(of typebool, which defaults tofalse): Fail if an invalid saved state exists.temp_dir(of typestring?, which defaults tonull): Temporary directory used for writing files. This should be in the same partition or device as the final directory to guarantee atomic file operations. Use the same directory as the HLS files ifnull.main_playlist_writer(of type((extra_tags : [string], prefix : string, version : int, [string.{bandwidth : int, codecs : string, video_size? : int * int}]) -> string?)?, which defaults to<fun>): Main playlist writer. Main playlist writing is disabled whennullor when returningnull.(unlabeled)(of typestring): List of specifications for each stream: (name, format).(unlabeled)(of type[string * format('a) .{ bandwidth? : int, codecs? : string, extname? : string, extra_tags? : [string], id3? : bool, id3_version? : int, replay_id3? : bool, video_size? : int * int }]): Directory for generated files.(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.insert_tag(of type(string) -> unit): Insert the same tag into all the streamsis_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.streams(of type() -> [ { bandwidth : int, codecs : string, discontinuity_count : int, encoder : format('A), extname : string, extra_tags : [string], id3_enabled : bool, insert_tag : (string) -> unit, name : string, replay_id3 : bool, video_size : {height : int, width : int }? }]): Output streamstime(of type() -> float): Get a source's time, based on its assigned clock.
output.harbor
Encode and output the stream using the harbor server.
Type:
(?id : string?, ?auth : ((address : string, string, string) -> bool)?,
?buffer : int, ?burst : int, ?chunk : int, ?dumpfile : string?,
?encoding : string, ?fallible : bool, ?format : string,
?headers : [string * string], ?metaint : int, mount : string,
?on_connect : ((headers : [string * string], uri : string,
protocol : string, string) -> unit),
?on_disconnect : ((string) -> unit), ?on_start : (() -> unit),
?on_stop : (() -> unit), ?password : string?, ?port : int,
?register_telnet : bool, ?start : bool, ?timeout : float,
?transport : http_transport, ?url : string?, ?user : string?, format('a),
source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.auth(of type((address : string, string, string) -> bool)?, which defaults tonull): Authentication function.f(~address,login,password)returnstrueif the user should be granted access for this login. When defined,userandpasswordarguments are not taken in account.buffer(of typeint, which defaults to327675): Maximum buffer per-client.burst(of typeint, which defaults to65534): Initial burst of data sent to the client.chunk(of typeint, which defaults to4096): Send data to clients using chunks of at least this length.dumpfile(of typestring?, which defaults tonull): Dump stream to file, for debugging purpose. Disabled if null.encoding(of typestring, which defaults to""): Encoding used to send metadata. If empty, defaults to "UTF-8"fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.format(of typestring, which defaults to""): Format, e.g. "audio/ogg". When empty, the encoder is used to guess.headers(of type[string * string], which defaults to[]): Additional headers.metaint(of typeint, which defaults to8192): Interval used to send ICY metadatamount(of typestring)on_connect(of type(headers : [string * string], uri : string, protocol : string, string) -> unit, which defaults tofun (~headers=_,~uri=_,~protocol=_,_) -> ()): Callback executed when connection is established (takes headers, connection uri, protocol and client's IP as arguments).on_disconnect(of type(string) -> unit, which defaults tofun (_) -> ()): Callback executed when connection stops (takes client's IP as argument).on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.password(of typestring?, which defaults tonull): Password for client connection. Ausermust also be set. We check for this password is checked unless anauthfunction is defined, which is used in this case.port(of typeint, which defaults to8000)register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.start(of typebool, which defaults totrue): Start output as soon as it is available.timeout(of typefloat, which defaults to30.0): Timeout for network operations (in seconds).transport(of typehttp_transport, which defaults to<unix_transport>): Http transport. Usehttp.transport.sslorhttp.transport.secure_transport, when available, to enable HTTPS outputurl(of typestring?, which defaults tonull)user(of typestring?, which defaults tonull): User for client connection. You also need to setup apassword.(unlabeled)(of typeformat('a)): Encoding format.(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.harbor.hls
Output the source stream to an HTTP live stream served from the harbor HTTP server.
Type:
(?id : string?, ?dir_perm : int, ?extra_tags : [string], ?fallible : bool,
?on_file_change : ((state : string, string) -> unit),
?on_start : (() -> unit), ?on_stop : (() -> unit), ?perm : int,
?persist_at : string?, ?playlist : string, ?prefix : string,
?register_telnet : bool, ?segment_duration : float, ?segments : int,
?segments_overhead : int?, ?start : bool, ?strict_persist : bool,
?temp_dir : string?,
?main_playlist_writer : ((extra_tags : [string], prefix : string,
version : int,
[string
.{
bandwidth : int,
codecs : string,
video_size? : int * int
}]) -> string?)?,
?segment_name : ((
{
duration : float,
extname : string,
position : int,
stream_name : string,
ticks : int
}) -> string),
?headers : [string * string], ?port : int, ?path : string,
?tmpdir : string?, ?transport : http_transport
.{default_port : int, name : string, protocol : string},
[string * format('a)], source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.dir_perm(of typeint, which defaults to511): Permission of the directories if some have to be created, up to umask.extra_tags(of type[string], which defaults to[]): Extra tags to insert into the main playlist.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.on_file_change(of type(state : string, string) -> unit, which defaults tofun (~state=_,_) -> ()): Callback executed when a file changes.stateis one of:"created","updated"or"deleted", second argument is file path. Typical use: sync file with a CDNon_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.perm(of typeint, which defaults to438): Permission of the created files, up to umask.persist_at(of typestring?, which defaults tonull): Location of the configuration file used to restart the output. Relative paths are assumed to be with regard to the directory for generated file.playlist(of typestring, which defaults to"stream.m3u8"): Playlist name (m3u8 extension is recommended).prefix(of typestring, which defaults to""): Prefix for each files in playlists.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.segment_duration(of typefloat, which defaults to10.0): Segment duration (in seconds).segments(of typeint, which defaults to10): Number of segments per playlist.segments_overhead(of typeint?, which defaults to5): Number of segments to keep after they have been featured in the live playlist. Set tonullto disable.start(of typebool, which defaults totrue): Start output as soon as it is available.strict_persist(of typebool, which defaults tofalse): Fail if an invalid saved state exists.temp_dir(of typestring?, which defaults tonull): Temporary directory used for writing files. This should be in the same partition or device as the final directory to guarantee atomic file operations. Use the same directory as the HLS files ifnull.main_playlist_writer(of type((extra_tags : [string], prefix : string, version : int, [string.{bandwidth : int, codecs : string, video_size? : int * int}]) -> string?)?, which defaults to<fun>): Main playlist writer. Main playlist writing is disabled whennullor when returningnull.segment_name(of type( { duration : float, extname : string, position : int, stream_name : string, ticks : int }) -> string, which defaults to<fun>): Segment name. Default:fun (metadata) -> "#{metadata.stream_name}_#{metadata.position}.#{metadata.extname}"headers(of type[string * string], which defaults to[("Access-Control-Allow-Origin", "*")]): Default response headers.port(of typeint, which defaults to8000): Port for incoming harbor (http) connections.path(of typestring, which defaults to"/"): Base path for hls URIs.tmpdir(of typestring?, which defaults tonull): Directory for generated files.transport(of typehttp_transport.{default_port : int, name : string, protocol : string}, which defaults to<unix_transport>.{default_port=80, protocol="http", name="unix"}): Http transport. Usehttp.transport.sslorhttp.transport.secure_transport, when available, to enable HTTPS output(unlabeled)(of type[string * format('a)]): List of specifications for each stream: (name, format).(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.insert_tag(of type(string) -> unit): Insert the same tag into all the streamsis_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.streams(of type() -> [ { bandwidth : int, codecs : string, discontinuity_count : int, encoder : format('A), extname : string, extra_tags : [string], id3_enabled : bool, insert_tag : (string) -> unit, name : string, replay_id3 : bool, video_size : {height : int, width : int }? }]): Output streamstime(of type() -> float): Get a source's time, based on its assigned clock.
output.icecast
Encode and output the stream to an icecast server.
Type:
(?id : string?, ?chunked : bool, ?connection_timeout : float,
?description : string?, ?dumpfile : string?, ?encoding : string?,
?fallible : bool, ?format : string, ?genre : string?,
?headers : [string * string], ?host : string, ?icy_metadata : [string],
?icy_song : (([string * string]) -> string?), ?method : string,
mount : string, ?name : string?, ?on_connect : (() -> unit),
?on_disconnect : (() -> unit), ?on_error : ((string) -> float),
?on_start : (() -> unit), ?on_stop : (() -> unit), ?password : string,
?port : int, ?prefer_address : string?, ?public : bool,
?register_telnet : bool, ?send_icy_metadata : bool?,
?send_last_metadata_on_connect : bool, ?start : bool, ?timeout : float,
?transport : http_transport, ?url : string?, ?user : string?, format('a),
source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.chunked(of typebool, which defaults tofalse): Used chunked transfer with the 'http(s)' protocol.connection_timeout(of typefloat, which defaults to5.0): Timeout for establishing network connections (disabled is negative).description(of typestring?, which defaults tonull)dumpfile(of typestring?, which defaults tonull): Dump stream to file, for debugging purpose. Disabled if null.encoding(of typestring?, which defaults tonull): Encoding used to send metadata and stream info (name, genre and description). If null, defaults to "UTF-8".fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.format(of typestring, which defaults to""): Format, e.g. "audio/ogg". When empty, the encoder is used to guess.genre(of typestring?, which defaults tonull)headers(of type[string * string], which defaults to[("User-Agent", "Liquidsoap/2.3.3 (Unix; OCaml 4.14.2)")]): Additional headers.host(of typestring, which defaults to"localhost")icy_metadata(of type[string], which defaults to["song", "title", "artist", "genre", "date", "album", "tracknum", "comment", "dj", "next"]): List of metadata to send with ICY metadata updateicy_song(of type([string * string]) -> string?, which defaults to<fun>): Function used to generate the default icy "song" metadata. Metadata is not added when returningnull. Default:$(artist) - $(title)if both are defined, otherwiseartistortitleif either is defined ornull.method(of typestring, which defaults to"source"): Method to use with the 'http(s)' protocol. One of: 'source', 'put' or 'post'.mount(of typestring): Source mount point.name(of typestring?, which defaults tonull)on_connect(of type() -> unit, which defaults to{()}): Callback executed when connection is established.on_disconnect(of type() -> unit, which defaults to{()}): Callback executed when connection stops.on_error(of type(string) -> float, which defaults tofun (_) -> 3.0): Callback executed when an error happens. The callback receives a string representation of the error that occurred and returns a float. If returned value is positive, connection will be tried again after this amount of time (in seconds).on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.password(of typestring, which defaults to"hackme")port(of typeint, which defaults to8000)prefer_address(of typestring?, which defaults tonull): Preferred address type when resolving hostnames. One of:"system","ipv4"or"ipv6". Defaults tosettings.icecast.prefer_addresswhennull.public(of typebool, which defaults totrue)register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.send_icy_metadata(of typebool?, which defaults tonull): Send new metadata using the ICY protocol. Guessed whennullsend_last_metadata_on_connect(of typebool, which defaults totrue): Send the source's last metadata when connecting to the remote icecast server.start(of typebool, which defaults totrue): Start output as soon as it is available.timeout(of typefloat, which defaults to30.0): Timeout for network read and write.transport(of typehttp_transport, which defaults to<unix_transport>): Http transport. Usehttp.transport.sslorhttp.transport.secure_transport, when available, to enable HTTPS outputurl(of typestring?, which defaults tonull)user(of typestring?, which defaults tonull): User for shout source connection. Defaults to "source" for icecast connections. Useful only in special cases, like with per-mountpoint users.(unlabeled)(of typeformat('a)): Encoding format.(unlabeled)(of typesource('a)): The source to output
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.jack
Output stream to jack.
Type:
(?id : string?, ?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?register_telnet : bool, ?self_sync : bool,
?server : string, ?start : bool, source(audio=pcm('a), 'b)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.self_sync(of typebool, which defaults totrue): Force the use of the dedicated bjack clock.server(of typestring, which defaults to""): Jack server to connect to.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typesource(audio=pcm('a), 'b))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.ndi
Output stream to NDI
Type:
(?id : string?, ?fallible : bool, ?groups : string?, library_file : string,
?name : string?, ?on_start : (() -> unit), ?on_stop : (() -> unit),
?register_telnet : bool, ?self_sync : bool, ?start : bool, format('a),
source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.groups(of typestring?, which defaults tonull): NDI sender groupslibrary_file(of typestring): Path to the shared library file.name(of typestring?, which defaults tonull): NDI sender nameon_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.self_sync(of typebool, which defaults tofalse): Use the dedicated NDI clock.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typeformat('a)): Encoding format. Only the%ndiencoder is allowed here!(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
This function is experimental.
output.oss
Output the source's stream to an OSS output device.
Type:
(?id : string?, ?device : string, ?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?register_telnet : bool, ?self_sync : bool,
?start : bool, source(audio=pcm('a), 'b)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.device(of typestring, which defaults to"/dev/dsp"): OSS device to use.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.self_sync(of typebool, which defaults totrue): Mark the source as being synchronized by the OSS driver.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typesource(audio=pcm('a), 'b))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.portaudio
Output the source's stream to a portaudio output device.
Type:
(?id : string?, ?buflen : int, ?device_id : int?, ?fallible : bool,
?latency : float?, ?on_start : (() -> unit), ?on_stop : (() -> unit),
?register_telnet : bool, ?self_sync : bool, ?start : bool,
source(audio=pcm('a), 'b)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.buflen(of typeint, which defaults to256): Length of a buffer in samples.device_id(of typeint?, which defaults tonull): Device ID. Uses default device ifnull.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.latency(of typefloat?, which defaults tonull): Device latency. Only used when specifying device ID.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.self_sync(of typebool, which defaults totrue): Mark the source as being synchronized by the portaudio driver.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typesource(audio=pcm('a), 'b))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.pulseaudio
Output the source's stream to a pulseaudio output device.
Type:
(?id : string?, ?client : string, ?device : string?, ?fallible : bool,
?on_error : ((string) -> unit), ?on_start : (() -> unit),
?on_stop : (() -> unit), ?register_telnet : bool, ?retry_delay : float,
?self_sync : bool, ?start : bool, source(audio=pcm('a), 'b)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.client(of typestring, which defaults to"liquidsoap")device(of typestring?, which defaults tonull): Device to use. Uses default if set tonull.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.on_error(of type(string) -> unit, which defaults tofun (_) -> ()): Function executed when an operation with the pulseaudio server returns an error.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.retry_delay(of typefloat, which defaults to1.0): When fallible, time to wait before trying to connect again.self_sync(of typebool, which defaults totrue): Mark the source as being synchronized by the pulseaudio driver.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typesource(audio=pcm('a), 'b))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.sdl
Display a video using SDL.
Type:
(?id : string?, ?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?register_telnet : bool, ?start : bool,
source(video=canvas('a), 'b)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.start(of typebool, which defaults totrue): Start output as soon as it is available.(unlabeled)(of typesource(video=canvas('a), 'b))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.sdl.has_video
Check whether video output is available with SDL.
Type:
() -> bool
output.shoutcast
Encode and output the stream to a shoutcast server.
Type:
(?id : string?, ?chunked : bool, ?connection_timeout : float,
?dumpfile : string?, ?encoding : string?, ?fallible : bool,
?format : string, ?genre : string?, ?headers : [string * string],
?host : string, ?icy_id : int, ?icy_metadata : [string],
?icy_song : (([string * string]) -> string?), ?name : string?,
?on_connect : (() -> unit), ?on_disconnect : (() -> unit),
?on_error : ((string) -> float), ?on_start : (() -> unit),
?on_stop : (() -> unit), ?password : string, ?port : int,
?prefer_address : string?, ?public : bool, ?register_telnet : bool,
?send_icy_metadata : bool?, ?send_last_metadata_on_connect : bool,
?start : bool, ?timeout : float, ?transport : http_transport,
?url : string?, ?user : string?, ?icy_reset : bool, ?dj : (() -> string),
?aim : string, ?icq : string, ?irc : string, format('a), source('a)) -> unit
where 'a is a set of tracks to be muxed into a source
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.chunked(of typebool, which defaults tofalse): Used chunked transfer with the 'http(s)' protocol.connection_timeout(of typefloat, which defaults to5.0): Timeout for establishing network connections (disabled is negative).dumpfile(of typestring?, which defaults tonull): Dump stream to file, for debugging purpose. Disabled if null.encoding(of typestring?, which defaults tonull): Encoding used to send metadata and stream info (name, genre and description). If null, defaults to "UTF-8".fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.format(of typestring, which defaults to""): Format, e.g. "audio/ogg". When empty, the encoder is used to guess.genre(of typestring?, which defaults tonull)headers(of type[string * string], which defaults to[("User-Agent", "Liquidsoap/2.3.3 (Unix; OCaml 4.14.2)")]): Additional headers.host(of typestring, which defaults to"localhost")icy_id(of typeint, which defaults to1): Shoutcast source ID.icy_metadata(of type[string], which defaults to["song", "title", "artist", "genre", "date", "album", "tracknum", "comment", "dj", "next"]): List of metadata to send with ICY metadata updateicy_song(of type([string * string]) -> string?, which defaults to<fun>): Function used to generate the default icy "song" metadata. Metadata is not added when returningnull. Default:$(artist) - $(title)if both are defined, otherwiseartistortitleif either is defined ornull.name(of typestring?, which defaults tonull)on_connect(of type() -> unit, which defaults to{()}): Callback executed when connection is established.on_disconnect(of type() -> unit, which defaults to{()}): Callback executed when connection stops.on_error(of type(string) -> float, which defaults tofun (_) -> 3.0): Callback executed when an error happens. The callback receives a string representation of the error that occurred and returns a float. If returned value is positive, connection will be tried again after this amount of time (in seconds).on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.password(of typestring, which defaults to"hackme")port(of typeint, which defaults to8000)prefer_address(of typestring?, which defaults tonull): Preferred address type when resolving hostnames. One of:"system","ipv4"or"ipv6". Defaults tosettings.icecast.prefer_addresswhennull.public(of typebool, which defaults totrue)register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.send_icy_metadata(of typebool?, which defaults tonull): Send new metadata using the ICY protocol. Guessed whennullsend_last_metadata_on_connect(of typebool, which defaults totrue): Send the source's last metadata when connecting to the remote icecast server.start(of typebool, which defaults totrue): Start output as soon as it is available.timeout(of typefloat, which defaults to30.0): Timeout for network read and write.transport(of typehttp_transport, which defaults to<unix_transport>): Http transport. Usehttp.transport.sslorhttp.transport.secure_transport, when available, to enable HTTPS outputurl(of typestring?, which defaults tonull)user(of typestring?, which defaults tonull): User for shout source connection. Defaults to "source" for icecast connections. Useful only in special cases, like with per-mountpoint users.icy_reset(of typebool, which defaults totrue): Reset shoutcast source buffer upon connecting (necessary for NSV).dj(of type() -> string, which defaults to{""}): Callback to set dj name.aim(of typestring, which defaults to"")icq(of typestring, which defaults to"")irc(of typestring, which defaults to"")(unlabeled)(of typeformat('a) where 'a is a set of tracks to be muxed into a source): Encoding format. Should be mp3 or AAC(+).(unlabeled)(of typesource('a) where 'a is a set of tracks to be muxed into a source): The source to output
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.srt
Send a SRT stream to a distant agent.
Type:
(?id : string?, ?bind_address : string, ?connection_timeout : float?,
?enforced_encryption : bool?, ?fallible : bool, ?host : string,
?ipv6only : bool?,
?listen_callback : ((hs_version : int, peeraddr : string,
streamid : string?, srt_socket) -> bool)?,
?max_clients : int?, ?messageapi : bool, ?mode : string,
?on_connect : (() -> unit), ?on_disconnect : (() -> unit),
?on_socket : ((mode : string, srt_socket) -> unit)?,
?on_start : (() -> unit), ?on_stop : (() -> unit), ?passphrase : string?,
?payload_size : int, ?pbkeylen : int?, ?polling_delay : float, ?port : int,
?prefer_address : string?, ?read_timeout : float?, ?register_telnet : bool,
?start : bool, ?streamid : string?, ?write_timeout : float?, format('a),
source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.bind_address(of typestring, which defaults to"0.0.0.0"): Address to bind on the local machine. Used only in listener modeconnection_timeout(of typefloat?, which defaults tonull): Timeout, in seconds, after which initial connection operations are aborted if no data was received. Uses library's default ifnull. Used only inclientmode.enforced_encryption(of typebool?, which defaults tonull): Enforces that both connection parties have the same passphrase set, or both do not set the passphrase, otherwise the connection is rejected.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.host(of typestring, which defaults to"localhost"): Address to connect to. Used only in caller mode.ipv6only(of typebool?, which defaults tonull): Iftrueandmodeis set tolisten, only ipv6 connections are accepted. Whennull, defaults totruewhen thebind_addressis a ipv6 address and system defaults otherwise.listen_callback(of type((hs_version : int, peeraddr : string, streamid : string?, srt_socket) -> bool)?, which defaults tonull): Callback used to decide whether to accept new incoming connections. Used in listener mode only.max_clients(of typeint?, which defaults tonull): Max number of connected clients (listener mode only)messageapi(of typebool, which defaults totrue): Use message apimode(of typestring, which defaults to"caller"): Mode to operate on. One of:"listener"(waits for connection to come in) or"caller"(initiate connection to a remote server)on_connect(of type() -> unit, which defaults to{()}): Function to execute when connected.on_disconnect(of type() -> unit, which defaults to{()}): Function to execute when disconnectedon_socket(of type((mode : string, srt_socket) -> unit)?, which defaults tonull): Callback executed when a new SRT socket is created to set additional options, add monitoring, etc.modeshould be one of:"connect"(socket created before connecting to a remote address),"listen"(socket created before binding for receiving new incoming connections),"incoming"(socket received as incoming connection) or"close"(socket is about to closed).on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.passphrase(of typestring?, which defaults tonull): When set to a non-empty string, this option enables encryption and sets the passphrase for it. Seelibsrtdocumentation for more details.payload_size(of typeint, which defaults to1316): Payload size.pbkeylen(of typeint?, which defaults tonull): Set encryption key length. Seelibsrtdocumentation for more details.polling_delay(of typefloat, which defaults to2.0): Delay between connection attempts. Used only in caller mode.port(of typeint, which defaults to8000): Port to bind on the local machine (listener mode) or to connect to (caller mode). The termportas used in SRT is occasionally identical to the termUDP port. However SRT offers more flexibility than UDP because it manages ports as its own resources. For example, one port may be shared between various services.prefer_address(of typestring?, which defaults tonull): Preferred address type when resolving hostnames. One of:"system","ipv4"or"ipv6". Defaults to globalsrt.prefer_connectionsettings whennull.read_timeout(of typefloat?, which defaults to1.0): Timeout, in seconds, after which read operations are aborted if no data was received, indefinite ifnull.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.start(of typebool, which defaults totrue): Start output as soon as it is available.streamid(of typestring?, which defaults tonull): Setstreamid. This value can be retrieved by the listener side when connecting to it. Used in caller mode only.write_timeout(of typefloat?, which defaults to1.0): Timeout, in seconds, after which write operations are aborted if no data was received, indefinite ifnull.(unlabeled)(of typeformat('a)): Encoding format.(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockconnect(of type() -> unit): In sender mode, connect to remote server. In listener mode, setup listening socket.disconnect(of type() -> unit): Disconnect all connected socket.duration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.sockets(of type() -> [string * srt_socket]): List of(connected_address, connected_socket)start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.url
Encode and let encoder handle data output. Useful with encoder with no expected output or to encode to files that need full control from the encoder, e.g. %ffmpeg with rtmp output.
Type:
(?id : string?, ?export_cover_metadata : bool, ?fallible : bool,
?on_error : ((error
.{
kind : string,
message : string,
trace : [
{
cstart : int,
cstop : int,
filename : string,
lstart : int,
lstop : int,
to_string : (?prefix : string) -> string
}]
}) -> unit),
?on_start : (() -> unit), ?on_stop : (() -> unit), ?register_telnet : bool,
?restart_delay : float?, ?self_sync : bool, ?start : bool, url : string,
format('a), source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.export_cover_metadata(of typebool, which defaults totrue): Export cover metadata.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be stopped until the source is available again.on_error(of type(error .{ kind : string, message : string, trace : [ { cstart : int, cstop : int, filename : string, lstart : int, lstop : int, to_string : (?prefix : string) -> string }] }) -> unit, which defaults to<fun>): Callback executed when an error occurs.on_start(of type() -> unit, which defaults to{()}): Callback executed when output starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when output stops.register_telnet(of typebool, which defaults totrue): Register telnet commands for this output.restart_delay(of typefloat?, which defaults to2.0): If notnull, restart output on errors after the given delay.self_sync(of typebool, which defaults tofalse): Should the source control its own synchronization? Set totruefor output to e.g.rtmpoutput using%ffmpegand etc.start(of typebool, which defaults totrue): Start output as soon as it is available.url(of typestring): Url to output to.(unlabeled)(of typeformat('a)): Encoding format.(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.
output.video
Output a video stream using the default operator. The input source does not need to be infallible, blank will just be played during failures.
Type:
(?id : string?, ?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?start : bool, source(video=canvas('a), 'b)) ->
unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.fallible(of typebool, which defaults totrue): Allow the child source to fail, in which case the output will be (temporarily) stopped.on_start(of type() -> unit, which defaults to{()}): Callback executed when outputting starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when outputting stops.start(of typebool, which defaults totrue): Automatically start outputting whenever possible. Iftrue, an infallible (normal) output will start outputting as soon as it is created, and a fallible output will (re)start as soon as its source becomes available for streaming.(unlabeled)(of typesource(video=canvas('a), 'b)): Source to play.
output.youtube.live.hls
Stream to youtube using HLS.
Type:
(?id : string?, ?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?segment_duration : float, ?segments : int,
?segments_overhead : int, ?start : bool, ?url : string, key : string,
encoder : format('a)
.{
bandwidth? : int,
codecs? : string,
extname? : string,
extra_tags? : [string],
id3? : bool,
id3_version? : int,
replay_id3? : bool,
video_size? : int * int
}, source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be (temporarily) stopped.on_start(of type() -> unit, which defaults to{()}): Callback executed when outputting starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when outputting stops.segment_duration(of typefloat, which defaults to2.0): Segment duration (in seconds).segments(of typeint, which defaults to4): Number of segments per playlist.segments_overhead(of typeint, which defaults to4): Number of segments to keep after they have been featured in the live playlist.start(of typebool, which defaults totrue): Automatically start outputting whenever possible. If true, an infallible (normal) output will start outputting as soon as it is created, and a fallible output will (re)start as soon as its source becomes available for streaming.url(of typestring, which defaults to"https://a.upload.youtube.com/http_upload_hls"): HLS URL to stream tokey(of typestring): Your secret youtube keyencoder(of typeformat('a) .{ bandwidth? : int, codecs? : string, extname? : string, extra_tags? : [string], id3? : bool, id3_version? : int, replay_id3? : bool, video_size? : int * int }): Encoder to use (most likely a%ffmpegencoder)(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.insert_tag(of type(string) -> unit): Insert the same tag into all the streamsis_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.streams(of type() -> [ { bandwidth : int, codecs : string, discontinuity_count : int, encoder : format('A), extname : string, extra_tags : [string], id3_enabled : bool, insert_tag : (string) -> unit, name : string, replay_id3 : bool, video_size : {height : int, width : int }? }]): Output streamstime(of type() -> float): Get a source's time, based on its assigned clock.
output.youtube.live.rtmp
Stream to youtube using RTMP.
Type:
(?id : string?, ?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?start : bool, ?url : string, key : string,
encoder : format('a), source('a)) -> unit
Arguments:
id(of typestring?, which defaults tonull): Force the value of the source ID.fallible(of typebool, which defaults tofalse): Allow the child source to fail, in which case the output will be (temporarily) stopped.on_start(of type() -> unit, which defaults to{()}): Callback executed when outputting starts.on_stop(of type() -> unit, which defaults to{()}): Callback executed when outputting stops.start(of typebool, which defaults totrue): Automatically start outputting whenever possible. If true, an infallible (normal) output will start outputting as soon as it is created, and a fallible output will (re)start as soon as its source becomes available for streaming.url(of typestring, which defaults to"rtmp://a.rtmp.youtube.com/live2"): RTMP URL to stream tokey(of typestring): Your secret youtube keyencoder(of typeformat('a)): Encoder to use (most likely a%ffmpegencoder)(unlabeled)(of typesource('a))
Methods:
buffered(of type() -> [string * float]): Length of buffered data.clock(of typeclock): The source's clockduration(of type() -> float): Estimation of the duration of the current track.elapsed(of type() -> float): Elapsed time in the current track.fallible(of typebool): Indicate if a source may fail, i.e. may not be ready to stream.id(of type() -> string): Identifier of the source.is_active(of type() -> bool):trueif the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,truefor outputs and sources such asinput.http.is_ready(of type() -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started(of type() -> bool):trueif the output or source is started.is_up(of type() -> bool): Indicate that the source can be asked to produce some data at any time. This istruewhen the source is currently being used or if it could be used at any time, typically inside aswitchorfallback.last_metadata(of type() -> [string * string]?): Return the last metadata from the source.log(of type{level : (() -> int).{set : (int) -> unit}}): Get or set the source's log level, from1to5.on_metadata(of type((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.on_shutdown(of type((() -> unit)) -> unit): Register a function to be called when source shuts down.on_track(of type((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.on_wake_up(of type((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source's final ID is set.register_command(of type(?usage : string?, description : string, string, ((string) -> string)) -> unit): Register a server command for this source. Command is registered under the source's id namespace when it gets up and de-registered when it gets down.remaining(of type() -> float): Estimation of remaining time in the current track.reset_last_metadata_on_track(of type(() -> bool).{set : (bool) -> unit}): Iftrue, the source'slast_metadatais reset on each new track. If a metadata is present along with the track mark, then it becomes the newlast_metadata, otherwise,last_metadata becomesnull`.seek(of type(float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync(of type() -> bool): Is the source currently controlling its own real-time loop.shutdown(of type() -> unit): Shutdown the output or source.skip(of type() -> unit): Skip to the next track.start(of type() -> unit): Ask the source or output to start.stop(of type() -> unit): Ask the source or output to stop.time(of type() -> float): Get a source's time, based on its assigned clock.