PLAY RTSP STREAM FROM WEB CAMERA ON HOLOLENS 2

Posted on 2022-05-31,2 min read
封面图

Development Experience Sharing

We are trying to play some video streams from web cameras to the HoloLens 2 these days, and we think it's easy but it's actually not THAT easy. So we mark down what we've done.

  1. Firstly, we followed the guide here to play some videos on Hololens 2 with the Unity component of Video Player. It is quite easy and the result is also good.
  2. We also tried to play some web videos with URLs by the Video Player, and it performed also well. Howerver, it can not play stream in **RTSP ** protocol which is used by our web cameras.
  3. So we tried another player AVPro Video with some guides here.
  4. According to here, it actually supports RTSP streaming protocol. Howerver, it still can't play our web cam stream with some errors showed here.
  5. Someone discussed the similar issue at here and it says that the AVPro Video can play RTSP stream with the url format like rtsp://77.208.177.183:55556/live.sdp, while our url is in the format of rtsp://username:password@url.
  6. Since we don't know how to remove the "username:password" part in the url, we decide to transfer the original RTSP stream from the web camera into a new one but without authorization.
  7. The RTSP server we build is rtsp-simple-server and we use FFMPEG to pull the stream from the web camera and push it to the server.
  8. Finally, the player shows the video stream we want, but we still don't figure out how to play the stream with authorization.

下一篇: REAL-TIME OBJECT DETECTION ON HOLOLENS 2→