summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sv.c b/sv.c
index a7c01cd..ec554e5 100644
--- a/sv.c
+++ b/sv.c
@@ -211,9 +211,8 @@ void *readMidi() {
time_t current_time = time(NULL);
char output_file[25];
strftime(output_file, 25, "%Y-%m-%d_%H%M%S.mp4", localtime(&current_time));
- const char* cmd = "ffmpeg -r 60 -f rawvideo -pix_fmt rgba -s 1918x1078 -i - "
- "-threads 0 -preset veryfast -y -pix_fmt yuv420p -c:v libx264 -crf 18 -vf vflip output.mp4";
-
+ char cmd[250];
+ sprintf(cmd, "ffmpeg -r 60 -f rawvideo -pix_fmt rgba -s %ix%i -i - -threads 0 -preset veryfast -y -pix_fmt yuv420p -c:v libx264 -crf 18 -vf vflip %s",width,height,output_file);
ffmpeg = popen(cmd, "w");
recording = 1;
}