From 40c1d59da68ed30d5bc8d3cb4eb3365956d6efde Mon Sep 17 00:00:00 2001 From: rexim Date: Sun, 3 Sep 2023 22:23:02 +0700 Subject: [PATCH] Tweak video rendering parameters --- src/ffmpeg_windows.c | 2 +- src/plug.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ffmpeg_windows.c b/src/ffmpeg_windows.c index 877e63f..50e0e03 100644 --- a/src/ffmpeg_windows.c +++ b/src/ffmpeg_windows.c @@ -90,7 +90,7 @@ FFMPEG *ffmpeg_start_rendering(size_t width, size_t height, size_t fps, const ch // TODO: use String_Builder in here // TODO: sanitize user input through sound_file_path char cmd_buffer[1024*2]; - snprintf(cmd_buffer, sizeof(cmd_buffer), "ffmpeg.exe -loglevel verbose -y -f rawvideo -pix_fmt rgba -s %dx%d -r %d -i - -i \"%s\" -c:v libx264 -c:a aac -pix_fmt yuv420p output.mp4", (int)width, (int)height, (int)fps, sound_file_path); + snprintf(cmd_buffer, sizeof(cmd_buffer), "ffmpeg.exe -loglevel verbose -y -f rawvideo -pix_fmt rgba -s %dx%d -r %d -i - -i \"%s\" -c:v libx264 -vb 2500k -c:a aac -ab 200k -pix_fmt yuv420p output.mp4", (int)width, (int)height, (int)fps, sound_file_path); if (!CreateProcess(NULL, cmd_buffer, NULL, NULL, TRUE, 0, NULL, NULL, &siStartInfo, &piProcInfo)) { TraceLog(LOG_ERROR, "FFMPEG: Could not create child process. System Error Code: %d", GetLastError()); diff --git a/src/plug.c b/src/plug.c index ebe39f3..8411914 100644 --- a/src/plug.c +++ b/src/plug.c @@ -17,7 +17,7 @@ #define FONT_SIZE 69 #define RENDER_FPS 30 -#define RENDER_FACTOR 60 +#define RENDER_FACTOR 100 #define RENDER_WIDTH (16*RENDER_FACTOR) #define RENDER_HEIGHT (9*RENDER_FACTOR)