diff --git a/README.txt b/README.txt index f7428265..6566dd53 100644 --- a/README.txt +++ b/README.txt @@ -4,7 +4,7 @@ Requirements: Compilation: * git clone --recurse-submodules * mkdir build && cd build - * cmake -DCMAKE_BUILD_TYPE=Release .. + * cmake .. * make @@ -31,6 +31,12 @@ Usage: Note: * The Windows key is not passed through by Moonlight, therefore Sunshine maps Right-Alt key to the Windows key + * If you set Video Bitrate to 0.5Mb/s: + * Sunshine will use CRF or QP to controll the quality of the stream. (See example configuration file for more details) + * This is less CPU intensive and it has lower average bandwith requirements compared to manually setting bitrate to acceptable quality + * However, it has higher peak bitrates, forcing Sunshine to drop entire frames when streaming 1080P due to their size. + * When this happens, the video portion of the stream appears to be frozen. + * This is rare enough that using this for the desktop environment is tolerable (in my opinion), however for gaming not so much. Credits: diff --git a/sunshine/video.cpp b/sunshine/video.cpp index 049b5ac7..ec365482 100644 --- a/sunshine/video.cpp +++ b/sunshine/video.cpp @@ -116,10 +116,10 @@ void encodeThread( av_dict_set(&options, "tune", config::video.tune.c_str(), 0); if(config.bitrate > 500) { - ctx->rc_max_rate = 2000000; - ctx->rc_buffer_size = 2000000; - ctx->bit_rate = config.bitrate * 1000; -// av_dict_set_int(&options, "qp", config::video.qp, 0); + config.bitrate *= 1000; + ctx->rc_max_rate = config.bitrate; + ctx->rc_buffer_size = 100000; + ctx->bit_rate = config.bitrate; } else if(config::video.crf != 0) { av_dict_set_int(&options, "crf", config::video.crf, 0);