Default to 30 fps for 1080p and higher

This commit is contained in:
Iwan Timmer 2017-05-27 16:53:40 +02:00
parent fe41e04607
commit 1d47b9205e
3 changed files with 7 additions and 3 deletions

View File

@ -75,11 +75,12 @@ Change the vertical resolution to I<HEIGHT>
=item B<-30fps> =item B<-30fps>
Use 30 fps for streaming. Use 30 fps for streaming.
This is the default configuration for 1080p and higher.
=item B<-60fps> =item B<-60fps>
Use 60 fps for streaming. Use 60 fps for streaming.
This is the default configuration. This is the default configuration for 720p.
=item B<-fps> [I<FPS>] =item B<-fps> [I<FPS>]

View File

@ -290,7 +290,7 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) {
config->stream.width = 1280; config->stream.width = 1280;
config->stream.height = 720; config->stream.height = 720;
config->stream.fps = 60; config->stream.fps = -1;
config->stream.bitrate = -1; config->stream.bitrate = -1;
config->stream.packetSize = 1024; config->stream.packetSize = 1024;
config->stream.streamingRemotely = 0; 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.bitrate == -1) {
if (config->stream.height >= 1080 && config->stream.fps >= 60) if (config->stream.height >= 1080 && config->stream.fps >= 60)
config->stream.bitrate = 20000; config->stream.bitrate = 20000;

View File

@ -138,7 +138,7 @@ static void help() {
printf("\t-width <width>\t\tHorizontal resolution (default 1280)\n"); printf("\t-width <width>\t\tHorizontal resolution (default 1280)\n");
printf("\t-height <height>\tVertical resolution (default 720)\n"); printf("\t-height <height>\tVertical resolution (default 720)\n");
printf("\t-30fps\t\t\tUse 30fps\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 <bitrate>\tSpecify the bitrate in Kbps\n"); printf("\t-bitrate <bitrate>\tSpecify the bitrate in Kbps\n");
printf("\t-packetsize <size>\tSpecify the maximum packetsize in bytes\n"); printf("\t-packetsize <size>\tSpecify the maximum packetsize in bytes\n");
printf("\t-hevc\t\t\tUse the high efficiency video coding (HEVC)\n"); printf("\t-hevc\t\t\tUse the high efficiency video coding (HEVC)\n");