Open anjelomerte opened 1 month ago
Hi,
Regarding 1, is it simply not possible with the hl2ss plugin or is it inherently not possible to record while also stream? In other words, if I were to implement video recording in Unity/C# while the hl2ss streaming plugin is running, would that cause problems? If I had a HL2 with me I would simply test it but currently I don't, that's why I am asking.
It should be possible to record while streaming with some caveats. For example, if the hl2ss plugin is streaming the PV camera then the Unity/C# code must access the camera in shared mode. Otherwise, the Unity/C# code will take over the camera and streaming will stop (the hl2ss client will be disconnected). Conversely, if the Unity/C# code is using the camera and then some hl2ss client requests the camera stream it must do so in shared mode. Otherwise, hl2ss will take control of the camera and the Unity/C# stream will be closed. So some synchronization between server and client is necessary. For example, the Unity/C# code could initialize the camera to the desired resolution and framerate and keep the camera running for the duration of the app, while the hl2ss client always connects in shared mode (in shared mode, resolution and framerate cannot be changed).
Thank you for your input! Your proposed solution sounds feasible. So would you agree that this is the best approach to preview captured video footage on the HL2? I mean capturing by the client is possible but I see no straightforward way of getting that captured footage back onto the HL2 or am I missing sth?
Yes, I think so. But just to preview the video captured by the client, I would add callbacks to the C++ code to detect when a client connects/disconnects and forward raw frames to the C# code to avoid managing two streams.
You are talking about viewing the video stream in real-time on the server right? What I want to do is capture let's say 1min of the stream and then review that captured 1min footage afterwards. If this is also possible by forwarding frames I am grateful for any further details on how that can be accomplished.
You are talking about viewing the video stream in real-time on the server right?
Yes, on the HoloLens display.
What I want to do is capture let's say 1min of the stream and then review that captured 1min footage afterwards. If this is also possible by forwarding frames I am grateful for any further details on how that can be accomplished.
I think it can be done in this way:
Thank you, I will dig into the various approaches and get back
Hey Juan Carlos, thanks for engaging with the community on your lovely project! Since a lot has changed since the last time I worked with your project, I got two things on my mind:
Best regards!