mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 09:25:49 +00:00
Warn when streaming above 4K with H.264 or 8K with HEVC
This commit is contained in:
parent
4f9d45fbb5
commit
0cda408d3c
@ -211,11 +211,21 @@ int LiStartConnection(PSERVER_INFORMATION serverInfo, PSTREAM_CONFIGURATION stre
|
|||||||
|
|
||||||
// Height must not be odd or NVENC will fail to initialize
|
// Height must not be odd or NVENC will fail to initialize
|
||||||
if (StreamConfig.height & 0x1) {
|
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,
|
||||||
StreamConfig.height & ~0x1);
|
StreamConfig.height & ~0x1);
|
||||||
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
|
// Extract the appversion from the supplied string
|
||||||
if (extractVersionQuadFromString(serverInfo->serverInfoAppVersion,
|
if (extractVersionQuadFromString(serverInfo->serverInfoAppVersion,
|
||||||
|
@ -718,6 +718,11 @@ int performRtspHandshake(void) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
NegotiatedVideoFormat = VIDEO_FORMAT_H264;
|
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.
|
// Parse the Opus surround parameters out of the RTSP DESCRIBE response.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user