3DStreamingToolkit / 3DStreamingToolkit

A toolkit for building powerful stereoscopic 3D experiences that run on the cloud and stream to devices.
MIT License
362 stars 99 forks source link

Bad rendering quality using samples server and client #321

Open ofer-sin opened 5 years ago

ofer-sin commented 5 years ago

Report

Environment

Issues and Steps to Reproduce

  1. Downloaded and compiled the toolkit.
  2. Downloaded the signaling server code
  3. Changed the webrtcConfig.json files of the server and client to connect to local host
  4. Ran the signaling server (without docker) by "node index.js" after changing index.js to listen to port 3000: app.listen(process.env.PORT || 3000)
  5. Ran SpinningCubeServerOpenGL.exe and StreamingDirectxClient.exe They both detected the signaling server. Connected the server and client: Client shows the spinning cube in a VERY pixelated image, with FPS ~ 63

Expected Behavior

Client and server should both display a smooth rotating cube.

Actual Behavior

Client shows the spinning cube in a VERY pixelated image. Server shown NO image at all.

PixelatedRendering :

A side comment: My knowledge in web programming is not deep, so it may very much be my fault, only I don't know what may be the reason. I ran the hardware testing program: ./NativeServer.Tests.exe --gtest_also_run_disabled_tests At some time it crashes with Segmentation Fault and outputs the following: $ ./NativeServer.Tests.exe --gtest_also_run_disabled_tests [==========] Running 16 tests from 4 test cases. [----------] Global test environment set-up. [----------] 4 tests from EncoderTests [ RUN ] EncoderTests.CanInitializeWithDefaultParameters [ OK ] EncoderTests.CanInitializeWithDefaultParameters (78 ms) [ RUN ] EncoderTests.DISABLED_HasCompatibleGPUAndDriver [ OK ] EncoderTests.DISABLED_HasCompatibleGPUAndDriver (35 ms) [ RUN ] EncoderTests.DISABLED_HardwareEncodingIsEnabled c:\3dstreamingtoolkit\samples\server\nativeserver.tests\nativeserverstests.cpp(234): error: Value of: encoder Actual: false Expected: true [ FAILED ] EncoderTests.DISABLED_HardwareEncodingIsEnabled (2 ms) [ RUN ] EncoderTests.CanEncodeCorrectly [ OK ] EncoderTests.CanEncodeCorrectly (50 ms) [----------] 4 tests from EncoderTests (165 ms total)

[----------] 6 tests from BufferCapturerTests [ RUN ] BufferCapturerTests.InitializeBufferCapturer [ OK ] BufferCapturerTests.InitializeBufferCapturer (1 ms) [ RUN ] BufferCapturerTests.InitializeDirectXDeviceResources [ OK ] BufferCapturerTests.InitializeDirectXDeviceResources (37 ms) [ RUN ] BufferCapturerTests.InitializeDirectXBufferCapturer [ OK ] BufferCapturerTests.InitializeDirectXBufferCapturer (20 ms) [ RUN ] BufferCapturerTests.InitializeOpenGLBufferCapturer [ OK ] BufferCapturerTests.InitializeOpenGLBufferCapturer (0 ms) [ RUN ] BufferCapturerTests.CaptureFrameUsingDirectXBufferCapturer [ OK ] BufferCapturerTests.CaptureFrameUsingDirectXBufferCapturer (50 ms) [ RUN ] BufferCapturerTests.CaptureFrameStereoUsingDirectXBufferCapturer [ OK ] BufferCapturerTests.CaptureFrameStereoUsingDirectXBufferCapturer (73 ms) [----------] 6 tests from BufferCapturerTests (181 ms total)

[----------] 1 test from RtpHeaderFramePredictionTest [ RUN ] RtpHeaderFramePredictionTest.SendReceiveFramePredictionTimestamps [ OK ] RtpHeaderFramePredictionTest.SendReceiveFramePredictionTimestamps (25 ms) [----------] 1 test from RtpHeaderFramePredictionTest (25 ms total)

[----------] 5 tests from EndToEndTests [ RUN ] EndToEndTests.DISABLED_ServerConnectToSignalingServer c:\3dstreamingtoolkit\samples\server\nativeserver.tests\nativeserverstests.cpp(613): error: Value of: false Actual: false Expected: true unknown file: error: SEH exception with code 0xc0000005 thrown in the test body. [ FAILED ] EndToEndTests.DISABLED_ServerConnectToSignalingServer (5198 ms) [ RUN ] EndToEndTests.DISABLED_ClientConnectToSignalingServer unknown file: error: SEH exception with code 0xc0000005 thrown in the test body. [ FAILED ] EndToEndTests.DISABLED_ClientConnectToSignalingServer (1 ms) [ RUN ] EndToEndTests.DISABLED_ServerClientConnectToSignalingServer Segmentation fault

Link to Code

webrtcConfig.json in server and client folders

{ "iceConfiguration": "none", "turnServer": { "uri": "turn:turnserveruri:5349", "username": "username", "password": "password" }, "serverUri": "http://localhost", "port": 3000, "heartbeat": 5000, "authentication": { "authorityUri": "https://aadauthorityuri", "resource": "00000000-0000-0000-0000-000000000000", "clientId": "00000000-0000-0000-0000-000000000000", "clientSecret": "aadsecretstring" } }

tylergibson commented 5 years ago

It looks like you are falling back to software rendering mode because you do not have an nvidia GPU on your system. 3dstreaming toolkit requires an nvidia gpu to operate. We have a software fallback mode for debugging, but as you can see the quality is very very poor.

If you are on a laptop with nvidia graphics, you need to configure the laptop to ONLY use the nvidia gpu. Switchable graphics are not supported.

ofer-sin commented 5 years ago

It looks like you are falling back to software rendering mode because you do not have an nvidia GPU on your system. 3dstreaming toolkit requires an nvidia gpu to operate. We have a software fallback mode for debugging, but as you can see the quality is very very poor.

If you are on a laptop with nvidia graphics, you need to configure the laptop to ONLY use the nvidia gpu. Switchable graphics are not supported.

Yes, you are right, it did fall back to software encoding, thanks. I still need to check why because there is an nvidia gpu on the machine.