Applies to: FFmpeg project current online manuals read 2026-11-08; generated documentation may be newer than an installed package; check local build options
The useful distinctions
- map chooses output streams.
- c copy avoids decoding and re-encoding selected streams.
- The destination container must support the selected stream formats.
Write the intended contents first
Before a remux, describe the new file in ordinary terms: one main video and one chosen audio track, with no additional streams. That description is the review target for the command. A source can contain commentary, subtitles or attachments that matter to someone else, so preserve the original and make omissions deliberate rather than discovering them after replacing the only copy.
Read selection separately from handling
The example chooses the first video and first audio by type position. Replace those positions only after inspecting your own source. Its copy setting describes how those selected streams are handled, not whether they are the desired ones. Keeping these two decisions separate helps explain why an output can preserve encoded content perfectly yet still contain the wrong language or omit something the viewer expected.
Check structure and suitability
Compare the new inventory with the written target, then inspect a few representative positions using an appropriate player. A changed extension alone does not establish playback suitability on a particular device. If the chosen container rejects a stream, keep the error and revisit that container choice before deciding whether re-encoding is necessary. Do not turn a failed packaging experiment into an unreviewed quality-changing conversion.
A focused way to proceed
- Inventory the input streams first.
- Choose the intended video and audio by their actual indexes or type positions.
- Write to a new destination with explicit maps and streamcopy.
- Inspect the output inventory and check the intended tracks.
Worked example · synthetic
ffmpeg -i workshop-source.mkv -map 0:v:0 -map 0:a:0 -c copy workshop-review.mkvRead the comparison
A successful remux preserves selected encoded streams; it does not add codec support to a client.
When to stop or ask for help
If muxing fails, provide the input inventory, intended output and exact error to FFmpeg support.