Fix issue resulting in freezing video-stream on peak bitrate on 1080P
This commit is contained in:
@@ -4,7 +4,7 @@ Requirements:
|
|||||||
Compilation:
|
Compilation:
|
||||||
* git clone <repository> --recurse-submodules
|
* git clone <repository> --recurse-submodules
|
||||||
* mkdir build && cd build
|
* mkdir build && cd build
|
||||||
* cmake -DCMAKE_BUILD_TYPE=Release ..
|
* cmake ..
|
||||||
* make
|
* make
|
||||||
|
|
||||||
|
|
||||||
@@ -31,6 +31,12 @@ Usage:
|
|||||||
|
|
||||||
Note:
|
Note:
|
||||||
* The Windows key is not passed through by Moonlight, therefore Sunshine maps Right-Alt key to the Windows key
|
* 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:
|
Credits:
|
||||||
|
|||||||
@@ -116,10 +116,10 @@ void encodeThread(
|
|||||||
av_dict_set(&options, "tune", config::video.tune.c_str(), 0);
|
av_dict_set(&options, "tune", config::video.tune.c_str(), 0);
|
||||||
|
|
||||||
if(config.bitrate > 500) {
|
if(config.bitrate > 500) {
|
||||||
ctx->rc_max_rate = 2000000;
|
config.bitrate *= 1000;
|
||||||
ctx->rc_buffer_size = 2000000;
|
ctx->rc_max_rate = config.bitrate;
|
||||||
ctx->bit_rate = config.bitrate * 1000;
|
ctx->rc_buffer_size = 100000;
|
||||||
// av_dict_set_int(&options, "qp", config::video.qp, 0);
|
ctx->bit_rate = config.bitrate;
|
||||||
}
|
}
|
||||||
else if(config::video.crf != 0) {
|
else if(config::video.crf != 0) {
|
||||||
av_dict_set_int(&options, "crf", config::video.crf, 0);
|
av_dict_set_int(&options, "crf", config::video.crf, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user