Stages the source stream to a short-lived temp file, runs ffmpeg with seekable input to write a
metadata-injected MP4 or MOV (+faststart, -codec copy), then returns the output file as a web
ReadableStream for backup upload. MP4/MOV sources usually place moov at the end of the file, so
piping into ffmpeg stdin cannot demux the full media; a seekable temp copy is required for reliable
metadata injection without re-encoding.
Stages the source stream to a short-lived temp file, runs ffmpeg with seekable input to write a metadata-injected MP4 or MOV (
+faststart,-codec copy), then returns the output file as a web ReadableStream for backup upload. MP4/MOV sources usually placemoovat the end of the file, so piping into ffmpeg stdin cannot demux the full media; a seekable temp copy is required for reliable metadata injection without re-encoding.