Skip to content

Commit

Permalink
Tweak video rendering parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed Sep 3, 2023
1 parent f64361a commit 40c1d59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ffmpeg_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 40c1d59

Please sign in to comment.