Opens the R2 (or other) source stream; invoked at most once per session.
Source byte length from object HEAD metadata.
MIME type of the source object (preserved on output).
Metadata atoms to inject into the output container.
Returns an upload stream reading from the shared metadata-injected output file. The first call stages the source and runs ffmpeg; later calls reuse the same output.
Optionalsignal: AbortSignalOptional abort signal for staging and ffmpeg.
Upload stream and content length. Call dispose after all uploads finish.
Removes temp staging files. Safe to call after all uploads finish or on job teardown.
Runs ffmpeg metadata injection once per distribution job and fans the same output file to multiple backup upload streams (Drive, SFTP, SMB).