Skip to main content

build_remux_args

Function build_remux_args 

Source
pub fn build_remux_args(
    config: &EncoderConfig,
    intermediate: &Path,
    audio_scratch: &Path,
    has_video: bool,
    has_audio: bool,
) -> Vec<String>
Expand description

Build the gst-launch-1.0 argv for the finalize remux (M-QUAL.1). The live video intermediate is stream-copied (no re-encode) and the raw F32LE audio_scratch is encoded to the container’s audio codec, both muxed into config.output_path.

has_video / has_audio gate the legs. In the normal recording case both are true; a video-only recording skips this entirely (the intermediate is moved into place by finalize), so the !has_video arm only exists for the (unusual) audio-only case.

Shape (video + audio): -q -e <mux> name=mux ! filesink location=<output> filesrc location=<intermediate> ! <demux> ! <parser> ! mux. filesrc location=<audio> ! rawaudioparse … ! audioconvert ! audioresample ! <audio-encoder> ! mux.