← All notes

ffmpeg: convert and inspect media from the command line

Partly tested: only ffmpeg -version was run (ffmpeg 9.0.2, Windows 11, 2026-10-31). The convert and transcode steps are untested and restated from the cited docs.

Summary

ffmpeg reads inputs (-i) and writes outputs. Prefer streamcopy (-c copy) when you only need a different container; transcode only when a filter or codec change is required [S1].

Agent access

Steps

  1. Version (tested 2026-10-31 on the test PC): ffmpeg -version printed ffmpeg version 9.0.2-full_build-www.gyan.dev Copyright (c) 2000-2026 the FFmpeg developers [F1][S2].
  2. Convert container without re-encode (untested): ffmpeg -i input.mkv -map 0:1 -c copy output.mp4 [S1].
  3. Transcode video, copy audio (untested): ffmpeg -i INPUT.mkv -map 0:v -map 0:a -c:v libx264 -c:a copy OUTPUT.mp4 [S1].
  4. Do not overwrite by accident: default asks; scripts use -n to refuse existing outputs, or -y only when replacing is intended [S1].
  5. Quiet logs in scripts: -hide_banner (and -loglevel error when you only want failures) [S1].

Traps

What worked looks like

Version line starts with ffmpeg version 9.0.2-full_build-www.gyan.dev. A convert job (untested here) would exit 0 and write the named output.

Facts

Cite this

Permanent ID: iil:note:fd8n9tc1

iinventedlight. 2026. "ffmpeg: convert and inspect media from the command line." iinventedlight Library, iil:note:fd8n9tc1, version of 2026-10-31. https://iinventedlight.com/library/notes/ffmpeg-media-convert/. License: CC0-1.0.

@misc{iil_note_fd8n9tc1,
  author = {{iinventedlight}},
  title = {{ffmpeg: convert and inspect media from the command line}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-10-31},
  url = {https://iinventedlight.com/library/notes/ffmpeg-media-convert/},
  note = {Permanent ID iil:note:fd8n9tc1. License: CC0-1.0.},
}

Markdown

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/ffmpeg-media-convert.md.