From 56d1fee17b8c60e1b1a419baba1db042ef99c2d1 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 24 Jul 2021 15:40:59 -0500 Subject: [PATCH] Default to 60 FPS at all resolutions The time of most hardware maxing at 1080p30 has long since passed. --- docs/README.pod | 11 +++++------ src/config.c | 5 +---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/README.pod b/docs/README.pod index 75f443f..a6defed 100644 --- a/docs/README.pod +++ b/docs/README.pod @@ -79,16 +79,15 @@ Change the vertical resolution to I =item B<-fps> [I] Change the number of frame per second to I. -Defaults to 60fps for 720p and 30fps for 1080p and higher. -Only 30 and 60 fps are currently supported by Gamestream. +Defaults to 60 FPS. =item B<-bitrate> [I] Change bitrate to I Kbps. -By default the bitrate depends on the selected resolution and fps. -For resolution 1080p and 60 fps and higher 20 Mbps is used. -For resolution 1080p or 60 fps and higher 10 Mbps is used -For other configurations 5 Mbps is used by default. +By default the bitrate depends on the selected resolution and FPS. +For resolution 1080p and 60 FPS and higher, 20 Mbps is used. +For resolution 1080p or 60 FPS and higher, 10 Mbps is used +For other configurations, 5 Mbps is used by default. =item B<-packetsize> [I] diff --git a/src/config.c b/src/config.c index ec57888..ebdb9d3 100644 --- a/src/config.c +++ b/src/config.c @@ -316,7 +316,7 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) { config->stream.width = 1280; config->stream.height = 720; - config->stream.fps = -1; + config->stream.fps = 60; config->stream.bitrate = -1; config->stream.packetSize = 1024; config->stream.streamingRemotely = 0; @@ -374,9 +374,6 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) { sprintf(config->key_dir, "%s" DEFAULT_CACHE_DIR MOONLIGHT_PATH, pw->pw_dir); } - if (config->stream.fps == -1) - config->stream.fps = config->stream.height >= 1080 ? 30 : 60; - if (config->stream.bitrate == -1) { if (config->stream.height >= 1080 && config->stream.fps >= 60) config->stream.bitrate = 20000;