Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
build/
cmake-*/
docs/doxyconfig*
_deps/
assets/
CMakeFiles/
tests/
latex/
html/
third-party/ffmpeg-*
third-party/miniupnp

# npm
node_modules/
Expand Down
23 changes: 23 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,29 @@ editing the `conf` file in a text editor. Use the examples as reference.
</tr>
</table>

### max_bitrate

<table>
<tr>
<td>Description</td>
<td colspan="2">
The maximum bitrate (in Kbps) that Sunshine will encode the stream at. If set to 0, it will always use the bitrate requested by Moonlight.
</td>
</tr>
<tr>
<td>Default</td>
<td colspan="2">@code{}
0
@endcode</td>
</tr>
<tr>
<td>Example</td>
<td colspan="2">@code{}
max_bitrate = 5000
@endcode</td>
</tr>
</table>

### min_fps_factor

<table>
Expand Down
1 change: 0 additions & 1 deletion src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,6 @@ namespace config {
platf::get_host_name(), // sunshine_name,
"sunshine_state.json"s, // file_state
{}, // external_ip
0, // max bitrate
};

input_t input {
Expand Down
3 changes: 0 additions & 3 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,9 @@ namespace config {
std::string file_state;

std::string external_ip;
<<<<<<< HEAD
std::vector<std::string> resolutions;
std::vector<int> fps;
int max_bitrate;
=======
>>>>>>> upstream/master
};

struct input_t {
Expand Down
6 changes: 1 addition & 5 deletions src/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1686,12 +1686,8 @@ namespace video {
}
}

<<<<<<< HEAD
if (video_format[encoder_t::CBR]) {
auto bitrate = ((config::nvhttp.max_bitrate != 0) ? std::min(config.bitrate, config::nvhttp.max_bitrate) : config.bitrate) * 1000;
=======
auto bitrate = config.bitrate * 1000;
>>>>>>> upstream/master
BOOST_LOG(info) << "Max bitrate is " << config::nvhttp.max_bitrate;
ctx->rc_max_rate = bitrate;
ctx->bit_rate = bitrate;

Expand Down
Loading