the methods of live streaming from PC to HoloLens 2 - c#

I want to stream real-time video from the PC's screen capture or the webcam connected on PC to the HoloLens 2. I have tried to use obs-studio to capture video on PC and use vlc to receive and play the stream on HoloLens 2. But the delay is more than two seconds. Are there some other more effective methods to achieve this?
Thank you very much!

You can use MR-WebRTC for that. Just follow the tuts here.

Regular low latency video streaing methods result in subsecond latency. Effectively the end-to-end latency can be well under 100 ms, however this requires that you use proper mix of technologies including: screen capture, video codecs, hardware acceleraton, networking, Unity integration. The technologies you mentioned are far from optimal stack and hence the result you are observing.

Related

HoloLens - Capturing photo when locatable camera is in VideoMode (streaming)

I am trying to create a HoloLens application, which uses the built in WebCam to take photos and sends them to a rest interface for further face recognition. This is working well so far. To capture photos from the WebCam it needs to be in the PhotoMode.
The problem:
If I want now to present my application via live stream, the WebCam is set automatically to the VideoMode and capturing photos is not possible.
The locatable camera description https://developer.microsoft.com/en-us/windows/mixed-reality/locatable_camera_in_unity says:
"Only a single operation can occur with the camera at a time."
Since the application has to be presented to a great number of people it is absolutely essential to show it via live stream.
Does somebody have any general idea how to solve this problem, or maybe some hack to access the WebCam in PhotoMode simultaneously to the streaming?
Many thanks in advance!
This is possible if you can live with Preview Frames from the MediaCapture streams. Just start the video capture (layer on holograms if you need to), and then use the PreviewFrames as your 'photos'. This limits you to the resolution of the camera stream of course.
I was able to get this plugin working on a HoloLens. Had to use .Net instead of IL2CPP and I used 2017.4.22f1. At the very least the code shows how use MediaCapture and PreviewFrames to get a video feed from the camera for which you can grab the current frame to save as a photo. The sample doesn't do that last bit, but the bytes for the frames are being passed around, just need to make them available for your need. =)
https://github.com/VulcanTechnologies/HoloLensCameraStream

Delivering video stream from IP cameras

I have several IP cameras. I want to get their streaming video but using an additional server to centralize the cameras. This server should get the video stream from 2-5 cameras and then, deliver it again through a different url. thereby many streaming users wouldn't overload the IP cameras which can not hold a high number of viewers.
It the first time I'm facing video streaming that's why I'm a bit lost and I don't know where should I begin from. I've any restrictions about which protocol use, rtsp, http... I'm quite free about that.
I've found this project which looks like pretty similiar to my problem. Anyway, before going deeper in it, I would like to have the opinion of someone who has develop anything similar before. Any tip would be apreciated.

Record video from camcorder in C#

I need to be able to record video from an external camera in a C# application.
Unfortunately a webcam is pretty much out of the question as the application will record outside and during the evening/night. That is why I was thinking of a camcorder since it also has manual control over exposure and focus, lower noise and better sensor.
So far I would use the AV/S-Video output from the camcorder and send the signal to a USB capture card (the computer is a laptop so no PCI-E cards).
How would I be able to access the video stream from the C# application, now that it comes from the capture card ?
Does my proposed system seem feasible (achievable, good video quality, good fps)? Does anybody have another working solution?
Thanks
This Code Project Article could be of a good starting point.
The Author mentions :
The main goal of the application was to make it flexible and
extensible. The application itself can communicate with any video
source – it may be an IP video camera or a server, it may be a local
camera attached to USB, it may be an MMS stream from a remote server,
or it may be any other video source. And more of it, the application
can work with all these video sources simultaneously, displaying them
all on a single screen.
The solution I used in the end was Microsoft Expression Encoder.

Whats the best C# Way to stream a H.264 Video to another computer/device on a network? Is there a library/API For this? File Sharing?

I am experimenting with C#, and I wanted to create a fun/useful network program. I've programmed for most of my years using C++, C# seems a lot cleaner and easier to program in. I mostly programmed data structures and algorithms. I haven't really touched networking much.
I have video files on my computer that I would like to be able to share/stream/send to other computers on my network. I'm going to eventually expand on it and add a lot of features, but I want to conquer the hardest part first.
Is there a library out that helps with the data management for this?
I see accomplishing this three ways, Idk what's easiest and best.
Maybe using Windows File Sharing (Like how other computers on a network can open videos in a shared folder?)
Streaming the video data to the client computer? Then having their native video program open the data stream? (Buffer-like on youtube?)
Silverlight or some other Library. I can use the built in video player, etc to run it
Features:
I want to allow the client to be able to copy the video tutorial file to their own computer eventually if necessary, so idk. Maybe buffering is the best solution.
Want to allow the client to pause/download the video.
Hopefully I can learn a lot in this project.
You can use Microsoft Expression Encoder SDK to push video stream to a local port, or publish it in Windows or IIS Media Services. Windows Media Player, Silverlight or player-based application can be used for playback on another computer. Also, the are some options for playback on Apple devices. For H.264 support, you would need Pro version of the encoder.
For more information see the SDK documentation on MSDN, and articles Getting started with IIS Live Smooth Streaming and Apple HTTP Live Streaming with IIS Media Services.
You should be able to use vlc to transcode the file (or just stream it) then connect to the stream it produces. I know you're experimenting with C#, but it seems odd to re-invent the wheel, especially when it's such a good one!
I'm sure you'd have some fun automating vlc.

Smooth Streaming Player for Multiple Smooth Streaming Media Elements

Does current version of Silverlight Media Framework provides streaming with multiple smooth streaming media elements? For example, I would like to have a player that could play for a screen capture and another one for human just like this example Microsoft PDC . Is it possible to do with SMF?
Are there any solutions/examples available which allow me to simultaneously stream multiple videos in on player?
Thanks for suggestion.
There is a multi-cam demo sample in the IIS showcase, which is similar to the effect you are looking for...
IIS Showcase Demos
However, I must say I have not actually seen anyone use this yet, nor any code samples in how to achieve it.
It's worth noting, though - that in the case of Microsoft PDC, what you are watching is, in fact, a single stream. The camera and screen capture sources are simply combined into that layout pre-encoding (via either a video switcher or perhaps a software encoder like Wirecast). It requires a little more work on the "production" side, but makes your deployment a lot easier, and you don't need 2x the encoding power.

Categories

Resources