1

I want to stream the video that is being recorded by Pi-camera to my Remote computer for monitoring. There are lot of tutorials Online which deal with this topic. I was able to make one way work, that is using Netcat + Mplayer. But there are few issues.
1. There is too much delay in display. How can I decrease latency?
2. Currently only streaming using raspivid is working. But I want to record simultaneously too. How do I record and stream at the same time?
3. Through VNC I can remotely login into pi. But can't stream the video being record. Is there any way to stream video over VNC?

My pi model is Raspberry pi 2 and camera is Pi Noir.

Coderaemon
  • 465
  • 1
  • 11
  • 21
  • This question has been answered extensively and updated every so often (by me) the U4VL driver will works as you want it. (Given you have Pi2) but still other options on Pi 1 http://raspberrypi.stackexchange.com/a/7657/894 – Piotr Kula May 12 '15 at 13:50

2 Answers2

1

A couple of thoughts.

  1. If are are accessing you Pi remotely, try running it headless vs. running the GUI and access via VNC. There's no need for the overhead of the desktop if all you want to do is stream the camera. It will be much more efficient then trying to view video via VNC.

  2. There are a few options to stream the camera. The easiest (IMHO) is just to use motion software as a daemon. There are tons of guides online that tell you how to do it. Just google raspberry pi security camera. Make sure you are updated / upgraded. I have had some stability problems with motion and the pi camera on my pi 2, but nothing too bad.

  3. If you go the headless / motion route, also install and configure watchdog. It will save you lots of time having to run to the pi and manually reboot if there are issues.

  4. You can also stream video using raspvid - there are guides out there for this as well. Less functionality vs. motion and not as simple (IMHO), but probably more stable.

Hope that helps.

ifermon
  • 674
  • 5
  • 11
  • Welcome to the Pi Exchange! You may want to read this http://raspberrypi.stackexchange.com/a/7657/894 - With your Pi 2 WebRTC works a million times better than your suggestions... dont worry, I have been down this road for a VERY long time and tried tons of things. – Piotr Kula May 12 '15 at 13:56
  • ppumkin- Can't find uv4l-webrtc. Went here and added sources as specified on top but still did not find package. Suggestions? – ifermon May 12 '15 at 14:16
  • Did you follow the very first steps, adding the key, then repository, then apt-get update, then only install? – Piotr Kula May 12 '15 at 14:17
  • 1
    Ha - did not do the update. That fixed it. Trying it out now. – ifermon May 12 '15 at 14:18
  • Yea after you add a new repository you need to do apt-get update so it can cache the packages on the repository, then you can install them – Piotr Kula May 12 '15 at 14:21
  • @ppumkin ok. so what is the best method? the link you provided? Is it browser specific? Does it only work for .h264? I might want to stream uncompressed, yuv format and that too for multiple cameras? – Coderaemon May 13 '15 at 07:17
  • yuv is also available. Please read the documentation on the site on the configuration. Then extract the src in the HTML and that will be your feed. – Piotr Kula May 13 '15 at 08:18
0

If it helps, with UV4L you can also live stream the Desktop to the browser (other than the camera directly). this should answer your question #3.

strumpet
  • 98
  • 4
  • I want only to see what the camera is recording. For desktop I can use vnc why does vnc doesn't show the camera stream. If I connect pi to a monitor I can see the camera stream but when I remotely connect to pi GUI I can't see the camera stream. Why? – Coderaemon May 15 '15 at 09:56
  • because the camera image is overlaid onto the hdmi monitor but is not part of the desktop itself – strumpet May 15 '15 at 10:27
  • Is there a way to get the output of camera to my remote desktop? I know the long way. Through remote login i am asking can I force the camera stream to remote desktop? – Coderaemon May 15 '15 at 10:28