-
Notifications
You must be signed in to change notification settings - Fork 9
CSI camera
Tested with RasPi Cam V2 which connects to the MIPI CSI-2 interface on connector J3.
(Picture: adafruit.com)
Documentation: https://www.raspberrypi.org/documentation/hardware/camera/README.md
Power off and connect camera module connect to CSI connector.
When (re-)booting, config.txt must contain a line
start_x=1
otherwise, the camera cannot be used and you get a ENOMEM error.
These tools are RasPi specific and closer to the hardware. See source code: https://github.com/raspberrypi/userland/tree/master/host_applications/linux/apps/raspicam
pi@raspberrypi:~ $ raspistill -o raspistill.jpg
pi@raspberrypi:~ $ file raspistill.jpg
pi@raspberrypi:~ $ raspivid -o raspivid.h264
pi@raspberrypi:~ $ file raspivid.h264
Many options are possible, like sending the stream to stdout and pipe it to gstreamer or nc
("netcat") for streaming. See raspivid.
see video for linux
gstreamer can use /dev/video0
, the video for linux driver must be loaded.
this is a command line version of VideoLAN vlc video player, the swiss army knive among video players. Can also be used for RTSP streaming. cvlc is a command line tool, but it comes together with vlc which requires a lot of graphics stuff. (There maybe a "no X" version vlc-nox, but no bitbake recipe.)
pi@raspberrypi:~ $ raspivid -t 0 -o - | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
Works with VLC player and many more. Enter stream URI rtsp://192.168.2.105:8554/
where 192.168.2.105 must be replaced by the IPv4 address of your RasPi.
See OpenCV.
Closed source - neither recommended, nor tested. Claims to support WebRTC https://www.linux-projects.org/uv4l/
http://elinux.org/RPi-Cam-Web-Interface
http://robotblogging.blogspot.de/2013/10/gpu-accelerated-camera-processing-on.html
https://www.rs-online.com/designspark/building-a-raspberry-pi-2-webrtc-camera
display a chronometer clock like http://tft.vanity.dk/inputlag.html on a screen. Start a video live capture loop and place the output window next to the chronometer clock. Take a picture showing both windows and calculate the time differences of the time stamps shown. Repeat several times to get statically relevant results. The difference is the "glass to glass" delay of your video loop.