From 42c9030665ef94e5ed27da83e2f37a6b17031024 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Fri, 23 Feb 2018 17:02:24 +0100 Subject: correct video size --- sv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sv.c') 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(¤t_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; } -- cgit v1.2.3