open

expect fun open(path: String, format: String? = null, options: Map<String, String> = emptyMap()): MediaSink

Open a sink writing to path.

Parameters

format

container short name (mp4, matroska, mpegts, …). Null infers the format from the path extension.

options

muxer private options applied before the header is written, such as "movflags" to "+faststart" (mp4 web-ready) or "movie_timescale"


expect fun open(sink: MediaByteSink, format: String, options: Map<String, String> = emptyMap()): MediaSink

Open a sink writing into sink, application-owned bytes, instead of a path.

The returned MediaSink owns sink and closes it. A container that has to seek on a sink that cannot is refused when the header is written, with FFmpegError.InvalidArgument.

Parameters

format

container short name (mp4, matroska, mpegts, …). There is no path to infer it from, so it is required.

options

muxer private options, as for the path variant

actual fun open(path: String, format: String?, options: Map<String, String>): MediaSink

Open a sink writing to path.

Parameters

format

container short name (mp4, matroska, mpegts, …). Null infers the format from the path extension.

options

muxer private options applied before the header is written, such as "movflags" to "+faststart" (mp4 web-ready) or "movie_timescale"


actual fun open(sink: MediaByteSink, format: String, options: Map<String, String>): MediaSink

Open a sink writing into sink, application-owned bytes, instead of a path.

The returned MediaSink owns sink and closes it. A container that has to seek on a sink that cannot is refused when the header is written, with FFmpegError.InvalidArgument.

Parameters

format

container short name (mp4, matroska, mpegts, …). There is no path to infer it from, so it is required.

options

muxer private options, as for the path variant

actual fun open(path: String, format: String?, options: Map<String, String>): MediaSink

Open a sink writing to path.

Parameters

format

container short name (mp4, matroska, mpegts, …). Null infers the format from the path extension.

options

muxer private options applied before the header is written, such as "movflags" to "+faststart" (mp4 web-ready) or "movie_timescale"


actual fun open(sink: MediaByteSink, format: String, options: Map<String, String>): MediaSink

Open a sink writing into sink, application-owned bytes, instead of a path.

The returned MediaSink owns sink and closes it. A container that has to seek on a sink that cannot is refused when the header is written, with FFmpegError.InvalidArgument.

Parameters

format

container short name (mp4, matroska, mpegts, …). There is no path to infer it from, so it is required.

options

muxer private options, as for the path variant

actual fun open(path: String, format: String?, options: Map<String, String>): MediaSink

Open a sink writing to path.

Parameters

format

container short name (mp4, matroska, mpegts, …). Null infers the format from the path extension.

options

muxer private options applied before the header is written, such as "movflags" to "+faststart" (mp4 web-ready) or "movie_timescale"


actual fun open(sink: MediaByteSink, format: String, options: Map<String, String>): MediaSink

Open a sink writing into sink, application-owned bytes, instead of a path.

The returned MediaSink owns sink and closes it. A container that has to seek on a sink that cannot is refused when the header is written, with FFmpegError.InvalidArgument.

Parameters

format

container short name (mp4, matroska, mpegts, …). There is no path to infer it from, so it is required.

options

muxer private options, as for the path variant