mediaforge - v2.2.0
    Preparing search index...

    Function splitExtension

    • Split a path into its stem and final extension.

      The extension is preserved on the temp path on purpose: ffmpeg infers the container from it, so writing to out.mp4.tmp would select the wrong muxer (or none) and fail, and it would fail after the encode rather than before.

      Uses path.basename/path.extname rather than splitting on / by hand. A hand-rolled split finds no separator in C:\out\video.mp4, so stem came back as the whole path and the temp file was built from it — which is not a valid filename, making every atomic write fail on Windows.

      Parameters

      • path: string

      Returns { stem: string; ext: string }