Ffmpeg - Output Format - Matroska: Difference between revisions
From PiRho Knowledgebase
Jump to navigationJump to search
No edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
[[Category:Ffmpeg]] | [[Category:Ffmpeg]] | ||
The Matroska container format (`.mkv`) is one of the most flexible and widely‑supported multimedia containers available. Ffmpeg fully supports reading and writing Matroska files — but users frequently encounter the error: | The Matroska container format (`.mkv`) is one of the most flexible and widely‑supported multimedia containers available. Ffmpeg fully supports reading and writing Matroska files — but users frequently encounter the error: | ||
Latest revision as of 15:53, 14 March 2026
The Matroska container format (`.mkv`) is one of the most flexible and widely‑supported multimedia containers available. Ffmpeg fully supports reading and writing Matroska files — but users frequently encounter the error:
> "'.mkv' is not a suitable output format"
This error is rarely caused by Matroska itself. Instead, it almost always indicates a mismatch between the output container, the selected codecs, and Ffmpeg’s muxer capabilities.
Overview
Matroska (MKV) can hold video, audio, subtitles, chapter data, and attachments.
Why the Error Appears
- Incorrect output arguments
- Codec and container mismatch
- Incorrect parameter ordering
Correct Usage Examples
``` ffmpeg -i input.mp4 -c:v libx264 -c:a aac output.mkv ffmpeg -i input -c copy output.mkv ffmpeg -i input -f matroska -c copy output.mkv ```
Troubleshooting
- Force muxer: `-f matroska`
- Re-encode to compatible codecs
- Remove unsupported streams
- Fix timestamps: `-fflags +genpts`