diff --git a/docs/README.pod b/docs/README.pod index 5bfb6e2..31f36e3 100644 --- a/docs/README.pod +++ b/docs/README.pod @@ -75,11 +75,12 @@ Change the vertical resolution to I =item B<-30fps> Use 30 fps for streaming. +This is the default configuration for 1080p and higher. =item B<-60fps> Use 60 fps for streaming. -This is the default configuration. +This is the default configuration for 720p. =item B<-fps> [I] diff --git a/src/config.c b/src/config.c index d517069..e843da8 100644 --- a/src/config.c +++ b/src/config.c @@ -290,7 +290,7 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) { config->stream.width = 1280; config->stream.height = 720; - config->stream.fps = 60; + config->stream.fps = -1; config->stream.bitrate = -1; config->stream.packetSize = 1024; config->stream.streamingRemotely = 0; @@ -343,6 +343,9 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) { } } + 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; diff --git a/src/main.c b/src/main.c index c49e586..5a47485 100644 --- a/src/main.c +++ b/src/main.c @@ -138,7 +138,7 @@ static void help() { printf("\t-width \t\tHorizontal resolution (default 1280)\n"); printf("\t-height \tVertical resolution (default 720)\n"); printf("\t-30fps\t\t\tUse 30fps\n"); - printf("\t-60fps\t\t\tUse 60fps [default]\n"); + printf("\t-60fps\t\t\tUse 60fps\n"); printf("\t-bitrate \tSpecify the bitrate in Kbps\n"); printf("\t-packetsize \tSpecify the maximum packetsize in bytes\n"); printf("\t-hevc\t\t\tUse the high efficiency video coding (HEVC)\n");