aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-06-20 20:31:06 +0200
committerdec05eba <dec05eba@protonmail.com>2023-06-20 20:31:06 +0200
commite158cb2a8b38176db6a187e2f17ddd8fef764c88 (patch)
treece04a81609947b5b76fde7d98e3fb68ae7b3d43b /src
parenta20068e23ca6e6d5834b1ce50aba34f405facd15 (diff)
Translate -c mkv to -c matroska
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5da59ab..29ed7c2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1245,6 +1245,9 @@ int main(int argc, char **argv) {
}
const char *container_format = args["-c"].value();
+ if(container_format && strcmp(container_format, "mkv") == 0)
+ container_format = "matroska";
+
int fps = atoi(args["-f"].value());
if(fps == 0) {
fprintf(stderr, "Invalid fps argument: %s\n", args["-f"].value());
@@ -1498,7 +1501,10 @@ int main(int argc, char **argv) {
// The output format is automatically guessed by the file extension
avformat_alloc_output_context2(&av_format_context, nullptr, container_format, filename);
if (!av_format_context) {
- fprintf(stderr, "Error: Failed to deduce container format from file extension\n");
+ if(container_format)
+ fprintf(stderr, "Error: Container format '%s' (argument -c) is not valid\n", container_format);
+ else
+ fprintf(stderr, "Error: Failed to deduce container format from file extension\n");
_exit(1);
}