MediaByteSink
Where an output's bytes go instead of a path: the custom I/O door for writing, and the output half of MediaByteSource. An in-memory buffer, encrypted storage, a virtual file system or an upload stream takes the bytes a muxer writes, through MediaSink.open.
Threading and blocking. Every call arrives on the thread that writes the output, one call at a time, never concurrently. A call that blocks holds the muxer, and that is how a slow consumer bounds the buffering: the muxer holds at most 64 KiB it has not handed over. Failures are thrown, not encoded: an exception fails the write that triggered it with an FFmpegException whose cause is that exception, and the sink cannot write again after it.
Lifetime. The MediaSink opened over this owns it: after the last byte it calls flush once, then close once, and the instance must stay valid until then. Closing that MediaSink from inside write or seek is refused, because the muxer is still using it.