I run a web service which muxes multiple elementary streams (e.g., H.264 + FLAC) into a single matroska container/wrapper/file. There is no transcoding as I only copy the streams, using a process like
ffmpeg -i i.mkv -i i.flac -map 0:0 -c:0 copy -map 1:0 -c:1 copy out.mkv.
The problem is that the service must provide the total file size (in bytes) of the file (
out.mkv) resulting from the mux up front (i.e., before the actual muxing completes). Is it possible to calculate it?