Expand description
“Convert To…”: transcode a media file to another container/format with ffmpeg (no compositor): video ↔ gif, mp4 ↔ mov/mkv/webm, audio extraction (mp3/wav/m4a/flac), optional rescale with a chosen scaler. Runs on a background thread, reports through engine::export::Progress, never writes the destination until done (temp + rename, same as exports), never touches the source.
Structs§
Constants§
- AUDIO_
BPS 🔒 - Audio allowance subtracted from a size target, bits per second. Matches
codec_args’ AAC default. - TARGETS
- Output extensions offered by the converter UI.
Functions§
- probe_
duration 🔒 - Container duration in seconds via ffprobe.
- probe_
seconds - Container duration in seconds via ffprobe (used by the Compress window to size a bitrate).
- run_
convert 🔒 - start_
convert - Start a conversion; progress 0..1 by parsing ffmpeg
-progress pipe:1(out_time_us) against the input duration from ffprobe.codec_args(ext, ...)from export.rs picks the codecs; gif getsfps=<gif_fps>[,scale=...:flags=<scaler>],split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse. - strip_
quality 🔒 - Remove
-crf N/-qp N/-cq Npairs so an explicit bitrate is not fighting a quality target. - target_
bitrate - Video bitrate (bits/s) that lands
targetbytes overdurseconds, leaving room for the audio. None when the numbers make no sense (no duration, or the target is smaller than the audio track).