mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Warn when streaming above 4K with H.264 or 8K with HEVC
This commit is contained in:
parent
4f9d45fbb5
commit
0cda408d3c
@ -211,12 +211,22 @@ int LiStartConnection(PSERVER_INFORMATION serverInfo, PSTREAM_CONFIGURATION stre
|
||||
|
||||
// Height must not be odd or NVENC will fail to initialize
|
||||
if (StreamConfig.height & 0x1) {
|
||||
Limelog("Encoder height must not be odd. Rounding %d to %d",
|
||||
Limelog("Encoder height must not be odd. Rounding %d to %d\n",
|
||||
StreamConfig.height,
|
||||
StreamConfig.height & ~0x1);
|
||||
StreamConfig.height = StreamConfig.height & ~0x1;
|
||||
}
|
||||
|
||||
// Dimensions over 4096 are only supported with HEVC on NVENC
|
||||
if (!StreamConfig.supportsHevc &&
|
||||
(StreamConfig.width > 4096 || StreamConfig.height > 4096)) {
|
||||
Limelog("WARNING: Streaming at resolutions above 4K using H.264 will likely fail! Trying anyway!\n");
|
||||
}
|
||||
// Dimensions over 8192 aren't supported at all (even on Turing)
|
||||
else if (StreamConfig.width > 8192 || StreamConfig.height > 8192) {
|
||||
Limelog("WARNING: Streaming at resolutions above 8K will likely fail! Trying anyway!\n");
|
||||
}
|
||||
|
||||
// Extract the appversion from the supplied string
|
||||
if (extractVersionQuadFromString(serverInfo->serverInfoAppVersion,
|
||||
AppVersionQuad) < 0) {
|
||||
|
@ -718,6 +718,11 @@ int performRtspHandshake(void) {
|
||||
}
|
||||
else {
|
||||
NegotiatedVideoFormat = VIDEO_FORMAT_H264;
|
||||
|
||||
// Dimensions over 4096 are only supported with HEVC on NVENC
|
||||
if (StreamConfig.width > 4096 || StreamConfig.height > 4096) {
|
||||
Limelog("WARNING: Host PC doesn't support HEVC. Streaming at resolutions above 4K using H.264 will likely fail!\n");
|
||||
}
|
||||
}
|
||||
|
||||
// Parse the Opus surround parameters out of the RTSP DESCRIBE response.
|
||||
|
Loading…
x
Reference in New Issue
Block a user