Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Question Unity WebRTC without video

Discussion in 'Unity Render Streaming' started by patrickk2, Dec 13, 2020.

  1. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello everyone!

    I am having trouble getting a Linux server build using Unity WebRTC to run properly. For the server build I only need the RTCPeerConnections data channels, but the plugin has a dependency to the libvulkan graphics library.

    On my server I have libvulkan1 with version 1.2.141 installed which should support OpenGL 4.5 API if I am not mistaken, but during startup I still get the following error:

    I found this error in another thread, where it is suggested to check the OpenGL version, which needs to be at least 4.3 for
    glCopyImageSubData
    . My installation should meet this criteria.

    Since I do not really need the video functionality I was hoping that somebody could give me some advice on how to build the native plugin without the dependency to libvulkan. I would also appreciate hints on how to resolve that dependency problem.

    Any tipps or links to appropriate resources would be greatly appreciated!

    Thanks in advance and best regards,
    Patrick

    P.S.: If my post is missing any important information about my setup, I will of course provide it as fast and as best I can.
     
  2. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    I would like to know which version of the WebRTC package are you using.

    The current implementation is sure to initialize the graphics device in the native plugin.
    It might be difficult to change this behavior.
     
  3. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello!

    Thank you for your answer. I am working with the
    development
    branch of com.unity.webrtc, so the version is 2.2.1-preview.

    I am aware that this will be a bit of work, but I am determined. :) Any pointers on where to start would of course be highly appreciated!

    Best regards,
    Patrick
     
  4. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
  5. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    No I did not, but this sounds like it could also solve my problem. Is there maybe an ETA when this will be fixed?

    Thank you for your time and your replies, and best regards,
    Patrick
     
  6. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    It’s a hassle to fix this issue. This will be fixed by version 2.4 which is released in February.
    I recommend checking the progress of this issue periodically.
     
  7. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    I understand, thanks for the update!

    I will still keep trying if I can fix this problem for my project in the meantime. My next try would be to statically link the needed libraries. Unfortunatelly I am having trouble finding a static version of libvulkan1 (I only came across the .so versions).

    If anybody could give me a hint on where to find the appropriate .a file (or pointers on how to compile it myself), it would be highly appreciated!

    Thanks in advance for any feedback, and best regards,
    Patrick
     
  8. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
  9. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello!

    Thank you very much for all your help. You are right, the idea with static linking was a dead end. I got rid of my resolving problems in a very hacky way, I removed the offending OpenGL method calls and replaced them by throwing excepions. Not very elegant, since I don't need video, I can keep working on my project until 2.4 of the Unity WebRTC plugin comes out. :)

    Thanks again and best regards,
    Patrick
     
  10. AXGame5

    AXGame5

    Joined:
    Oct 1, 2019
    Posts:
    8
    Hello, as this issue still exist, is there a known workaround maybe? I do need the video functionality so I can't use the hacky way of removing those functions
     
  11. adam-wang

    adam-wang

    Joined:
    Feb 3, 2015
    Posts:
    2
    I also have these problem, the log file shows:

    Fallback handler could not load library .../Mono/libwebrtc
    Fallback handler could not load library .../Mono/libwebrtc.so
    Fallback handler could not load library .../Mono/webrtc

    Actually there is no Mono folder name in the <app>_data folder. What is the reason and where I can find these files?
     
  12. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    Can I have a log file you mentioned?