Search Unity

[Release] FMETP STREAM: All-in-One GameView + Audio Stream + Remote Desktop Control(UDP/TCP/Web)

Discussion in 'Assets and Asset Store' started by thelghome, Apr 30, 2019.

  1. longvann1912

    longvann1912

    Joined:
    Aug 22, 2020
    Posts:
    3
    it mean user 1 stream video to server, while user 2 also do that. Is that?
     
  2. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    You can set different label ID for each stream. They should work as a pair, and there will be two decoders with different label IDs in your case.
     
    longvann1912 likes this.
  3. unity_mdyhqdCZoBWiAA

    unity_mdyhqdCZoBWiAA

    Joined:
    Feb 1, 2020
    Posts:
    8
    Hello! I want to use your package to stream oculus go view in another pc build,but how it works for cameras? Because if I assign just my central eye rig cameraq the view is not actually the same of the oculus quest 2, it's like flat. How to resolve this?
     
  4. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    Two options in general cases:
    1) main cam mode, and choose your central eye. and enable the toggle of "Match Screen Aspect".
    2) render cam mode, duplicated and parent a camera to your head position group, with default fov(or with "TargetProjectionMatrix" referring to your main cam). and please choose target eyes to none if applicable, under camera settings.

    If you can attach any screenshots, it may help us understand your problem too.
     
  5. unity_mdyhqdCZoBWiAA

    unity_mdyhqdCZoBWiAA

    Joined:
    Feb 1, 2020
    Posts:
    8
    Thanks for your reply! This is what i currently have in my server scene
     

    Attached Files:

    • 1.JPG
      1.JPG
      File size:
      258.5 KB
      Views:
      347
  6. unity_mdyhqdCZoBWiAA

    unity_mdyhqdCZoBWiAA

    Joined:
    Feb 1, 2020
    Posts:
    8
    Now I can see correct view in the build client, but the problem is that in unity part(server) it displays no camera rendering and inside oculus image is tilting
     

    Attached Files:

    • 2.JPG
      2.JPG
      File size:
      105.3 KB
      Views:
      343
    • 3.JPG
      3.JPG
      File size:
      154.6 KB
      Views:
      341
  7. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    According to your scene's setup, your main cam was used as render cam.
    In this case, it occupied your main cam when it's capturing the view.
    Thus, my suggestion is, please duplicated that camera for render cam usage. and in your duplicated camera, choose "Target Eye" to none in your camera component.
     
  8. unity_mdyhqdCZoBWiAA

    unity_mdyhqdCZoBWiAA

    Joined:
    Feb 1, 2020
    Posts:
    8
    Ok now it works! Added a copy of the center eye camera, then parent it to the center eye camera, renamed it as "Render Cam" and assigned to Game View Encoder with MAtchScreenAspectEnabled. Thanks for your help!! Awesome Asset!
     
    thelghome likes this.
  9. unity_mdyhqdCZoBWiAA

    unity_mdyhqdCZoBWiAA

    Joined:
    Feb 1, 2020
    Posts:
    8
    Anyone know why the stream works on PC- desktop but not on PC - laptop?
     
  10. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    May I have further info for your troubleshooting?
    It should be compatible in both platforms.
     
  11. unity_mdyhqdCZoBWiAA

    unity_mdyhqdCZoBWiAA

    Joined:
    Feb 1, 2020
    Posts:
    8
    Actually disabled firewall in both devices desktop and notebook, but stil does not work
     
  12. unity_mdyhqdCZoBWiAA

    unity_mdyhqdCZoBWiAA

    Joined:
    Feb 1, 2020
    Posts:
    8
    same user as yesterday!
     
  13. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    Beside firewall, you have to turn on your network discovery feature in windows settings. For testing, please try turning it on for public and private network too.
    turn-on-or-off-network-discovery.png
     
  14. Chuddubs

    Chuddubs

    Joined:
    Jun 30, 2020
    Posts:
    7
    Hello, i'm making a VR application on the Oculus Quest 2. I need to be able to stream the video and audio from several HMDs that are running this vr app simultaneously to a single desktop (Windows 10) application. Can this be done using FMETP Stream ? Thanks in advance
     
  15. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    Yes, it's capable. You can setup a desktop server, and decode multi streams from vr app with unique label ID pairing..etc

    one of common use is monitoring VR headsets for exhibitions & events.
     
  16. Chuddubs

    Chuddubs

    Joined:
    Jun 30, 2020
    Posts:
    7
    @thelghome Fantastic, thank you for the reply!
     
  17. danielesuppo

    danielesuppo

    Joined:
    Oct 20, 2015
    Posts:
    331
    Hello, we are using Socket.io for both our Unity application and our web app.
    We have some issues related to the "room" management of Socket.io, that shoul be solved in 4.x version.
    Do you plan to update your asset for Socket.io 4.x ?
    Many thanks!
     
  18. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    We will investigate socket.io v4 soon, but can't guarantee how much time it needs. It depends on our progress.
    At the moment, we mainly tested with socket.io v3.1, and v2.x.
     
  19. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    [v1.350] updates
    encoder improvement on HoloLens(UWP) and mobile platforms
     
  20. andrewflangas

    andrewflangas

    Joined:
    Mar 16, 2021
    Posts:
    1
    Hi,

    So I am currently working on a project that stitches four web cam live streams together into a single frame. I have successfully been able to load the single result frame from stitching the other four together onto a local web host. I am now trying to use the FMETP websocket IO Manager to load the result stream into Unity using the URL from the local web host. My goal is to be able to put on a VR headset and look around at the stitched live stream as a panorama in Unity. I am currently having issues loading the result frame into Unity using the websocket IO Manager, if you can offer any advice of how I can load the result frame in from the URL I would greatly appreciate it. Thanks!
     
  21. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    If you have a customised web host for sending the jpeg based image, you have to match our meta data format.
    as we added some simple meta data in our default stream, which you have to refer to GameViewEncoder/Decoder..etc.
     
  22. garamanx

    garamanx

    Joined:
    Apr 3, 2019
    Posts:
    11
    Hi, I just made an Android APK of your asset and try now to connect my Win10/Unity Editor with my Android. First thing, the FMNetwork Basic on Android says it's local IP address is 127.0.0.1 which is not. It has a static IP and the device itself says it's 192.168.1.4. Being a server, the Android has the PC as client connected, but I can't send anything. I already successfully sent UDP packages between the two devices with the given ports via wifi. Can you tell me what's wrong?
     
  23. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    Could you please send us more detail via email?
    -Android Version
    -Android Phone spes..etc
    -Unity Version

    It seems likely a bug on your Android phone, we will try to investigate and reproduce it on our side. If you are in urgent, you can still type your Server IP in your client app, and disable the network discovery toggle in FMNetworkManager's Settings.
    our tech support: thelghome@gmail.com

    Edit 2021/03/21: or we can also provide you the beta version, which might be related to your issue.
     
    Last edited: Mar 20, 2021
  24. garamanx

    garamanx

    Joined:
    Apr 3, 2019
    Posts:
    11
    Thanks for your quick reply! This is my setup:
    • Unity 2020.1.13f1
    • Sony Xperia XZ1 Compact (G8441) with Android 9
     
  25. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    Couldyou please write us an email with your invoice number, we may send you a beta version for test.
     
  26. garamanx

    garamanx

    Joined:
    Apr 3, 2019
    Posts:
    11
    I copied the whole project to my 2015 MacBookPro with Big Sur. Turns out connections work fine between MacBook and Android, the culprit is the Windows machine. Remaining problems:
    • Windows as client can be seen by others ("connected ip"), shares packages, BUT can't send/receive content ("A" etc.)
    • Windows as server is invisible & can't send/receive "A" etc.
    • local IP address is still wrong on Android, but it's a small problem atm
     
  27. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    For Windows as local network server, it requires firewall off, and network discovery "On" under your Windows OS settings.

    you may also refer to my previous answer:
    https://forum.unity.com/threads/rel...cp-websockets-html.670270/page-9#post-6912545

    for Android issue, we've submitted an update for the fix, and exclude 127.0.0.1 detection.
    It should be available for download soon early next week.
     
  28. phil-R

    phil-R

    Joined:
    Nov 20, 2020
    Posts:
    9
    Hello, thanks for the great asset!

    I am having an issue in 2021.1.0f1 where my Client is showing as connected, but the Game View Decoder is not showing a texture. The Game View Encoder texture appears correctly.

    I am streaming from MacOS Big Sur to localhost, and to iOS, Any ideas?

    upload_2021-3-30_0-17-47.png
    upload_2021-3-30_0-17-21.png

    upload_2021-3-30_0-16-23.png
     

    Attached Files:

    Last edited: Mar 30, 2021
  29. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    Do you have screenshot of your GameViewEncoder's inspector?
    And please make sure their Label ID match (encoder/decoder).

    For troubleshooting, could you test our demo scene and see if it works?
     
  30. phil-R

    phil-R

    Joined:
    Nov 20, 2020
    Posts:
    9
    upload_2021-3-30_0-27-38.png

    My Render Cam ("Virtual Camera") is looking at a Canvas with a single RawImage. While in play mode, I updated the texture of the RawImage and it updated on the clients. If I exit play mode and restart, it will not show anything until update that RawImage. I am also not seeing Encoded Size(byte) value changing on the Game View Encoder.

    Encoder and Decoder pairs are both default 1001.
     
  31. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    In GameViewEncoder -> Networking -> ignore similar texture, please disable this toggle for your case.
    This option will ignore similar image(for saving bandwidth).
     
  32. phil-R

    phil-R

    Joined:
    Nov 20, 2020
    Posts:
    9
    Thank you. This has solved the issue (and is also a very nice feature!)
     
    thelghome likes this.
  33. czdanowitz

    czdanowitz

    Joined:
    Nov 13, 2017
    Posts:
    3
    Hello, I'm thinking about purchasing this asset. Has there since been any verified solution for the Hololens 2 WebCamTexture issue (streaming Hololens 2's camera feed)?
     
  34. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    We haven't verified the solution yet, but customers mentioned that the webcam texture works in newer version of unity build. Thus, we can't guarantee you at this moment.

    but we will try to investigate and verify it asap.
     
    Last edited: Apr 9, 2021
  35. blevok

    blevok

    Joined:
    Feb 16, 2017
    Posts:
    75
    Hello, i'm using the windows desktop streaming feature to stream to an android VR app, and a user has reported an issue with using monitors in portrait orientation. I've done testing on my own and i was able to easily replicate the issue.
    When streaming a 1920x1080 monitor in landscape orientation, the android app receives the 1920x1080 image and it looks normal. But when rotating to portrait, the android app receives a 1080x1920 image as expected, but the image content does not rotate.
    Any idea how to correct this issue? Here is a pic:
     

    Attached Files:

  36. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    We don't have auto rotation adjustment at the moment.
    But you can still access the rotation angle of current monitor via below script:
    Code (CSharp):
    1. FMDesktop.Manager.GetMonitor(GameViewEncoder.FMDesktopMonitorID).rotation;
    Meanwhile, we've been investigating the issue and we will try to add an option of auto rotation correction feature soon.
     
    blevok likes this.
  37. Lordmin

    Lordmin

    Joined:
    Mar 9, 2017
    Posts:
    62
    I want to send and receive simple 'struct' or 'class'.

    How can I send and receive?

    I would appreciate it if you could show me the sample code.
     
  38. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    The easiest way is converting your class into json string, and convert it back to class again on receiver.
    Code (CSharp):
    1. //Sender, convert your class to json string
    2. public yourClassData data = new yourClassData();
    3. string sendData = JsonUtility.ToJson(data);
    4. FMNetworkManager.instance.SendToOthers(sendData);
    5.  
    6. //On receiver, decode your raw json string
    7. void Action_ProcessReceivedString(string value)
    8. {
    9.     yourClassData data = JsonUtility.FromJson<CalibrationMetadata>(value);
    10. }
     
  39. sergin3d2d

    sergin3d2d

    Joined:
    Jun 4, 2013
    Posts:
    1
    Hello! I'm trying to stream from desktop to Hololens 2. Everything works fine, but Hololens stops receiving stream when message is bigger than 10kb. Basically, when I use low resolution 512x512 and strong compression it works, but at the moment when I improve quality and message size hits 10kb it stops working. I found that Windows.Networking.Sockets has MessageWebSocketControl.MaxMessageSize Property. Maybe it can cause such problem, but I don't know how to edit it in Unity.
     
  40. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    What's your current networking setup, via FMNetworkUDP / FMWebSocket?
    Or are you using your own network system like someone mentioned in stackoverflow?
    https://stackoverflow.com/questions/53836313/
     
  41. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    FYI, We've submitted an update(v1.360) with auto orientation fix, as a default option.
    It should be available to download via store very soon. (within 1~2 days usually)
     
    blevok likes this.
  42. blevok

    blevok

    Joined:
    Feb 16, 2017
    Posts:
    75
    Excellent, thank you.
     
  43. Lordmin

    Lordmin

    Joined:
    Mar 9, 2017
    Posts:
    62
    Is it possible even if Korean language is included among the values of the variables inside the class?

    We have confirmed that this asset cannot communicate with Korean strings.
     
  44. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    It's because our default string streaming is based on ascii, for better bandwidth.
    In your case, we suggest that you can stream your class via byte streaming instead.

    You can encode your string as "Unicode" format, or "UT8". Both should work.

    Code (CSharp):
    1.  
    2. public class yourClassData
    3. {
    4.     public string test = "조";
    5. }
    6.  
    7. //Sender, convert your class to json string
    8. public yourClassData data = new yourClassData();
    9. string sendData = JsonUtility.ToJson(data);
    10. string sendBytes = System.Text.Encoding.Unicode.GetBytes(sendData);
    11.  
    12. FMNetworkManager.instance.SendToOthers(sendBytes);
    13.  
    14. //On receiver, decode your raw bytes to json first, then json to class.
    15. void Action_ProcessReceivedBytes(byte[] receivedBytes)
    16. {
    17.     string jsonString = System.Text.Encoding.Unicode.GetString(receivedBytes);
    18.     yourClassData data = JsonUtility.FromJson<CalibrationMetadata>(jsonString);
    19. }
    If you still prefer sending as string commands, you can also convert above byte[] into Based64 String, and decode them on the receiver.
    Code (CSharp):
    1.  
    2. public yourClassData data = new yourClassData();
    3. string sendData = JsonUtility.ToJson(data);
    4. string sendBytes = System.Text.Encoding.Unicode.GetBytes(sendData);
    5.  
    6. string Based64Data = Convert.ToBase64String(sendBytes);
    7. FMNetworkManager.instance.SendToOthers(Based64Data);
    8.  
    9. //And convert the Based64String -> Byte[] -> JsonString -> yourClass
    10. void Action_ProcessReceivedString(string receivedBased64)
    11. {
    12.     byte[] receivedBytes = Convert.FromBase64String(receivedBased64);
    13.     string jsonString = System.Text.Encoding.Unicode.GetString(receivedBytes);
    14.     yourClassData data = JsonUtility.FromJson<CalibrationMetadata>(jsonString);
    15. }
    16.  
     
    Last edited: Apr 13, 2021
  45. Twyy_Ztn

    Twyy_Ztn

    Joined:
    Aug 5, 2019
    Posts:
    9
    Hi i'm tring to connect to a local webserveur, but currently it's not working.
    upload_2021-4-14_11-47-10.png
    upload_2021-4-14_11-47-25.png

    The documentation is very poor. Can you explain me how can i connect why my local webServ ?
     
  46. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    We have video tutorials on YouTube.
    You may refer to this step-by-step tutorial to setup your local node.js server(not web server). Please feel free to email us if you need further assistance. Technical support: thelghome@gmail.com
     
  47. tefrt

    tefrt

    Joined:
    Sep 10, 2019
    Posts:
    3
    Lordmin, Hi
    Did you succeed in procasting Hololens' camera view? I am trying to implement this too.
     
  48. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    According to previous feedback from customers, the webcam texture class works again in HL2 with newer versions of Unity.
    But we haven't verified this yet.
     
    tefrt likes this.
  49. Lordmin

    Lordmin

    Joined:
    Mar 9, 2017
    Posts:
    62

    hello!

    I have two questions

    1. FMNetworkManager.instance.Send()
    Is there a sample code that converts a json file to byte using this function and sends it?

    2. LargeFileEncoder.cs => Action_SendLargeByte(byte[] _data)
    When using this function to send a json file, can I enter a specific target IP like SendToTarget() and send it to that IP only?
     
  50. thelghome

    thelghome

    Joined:
    Jul 23, 2016
    Posts:
    741
    We've provided the sample codes for you in previous reply.
    https://forum.unity.com/threads/rel...cp-websockets-html.670270/page-9#post-7033771

    Q2: Yes, we have function of FMNetworkManager.instance.SendToTarget(data, ip);