Start Raspberry Pi® 3B+ Video Feed
You need the following Scenome® modules to complete all exercises involving the Raspberry Pi® 3B+: Scenome® Platform Binaries, Scenome® Video Module, Scenome® Raspberry Pi® 3B+ Export Module
This section assumes you have completed the previous exercise.
If you haven’t already set up your Raspberry Pi® 3B+ Camera please refer to the following link for reference information on this:
- Raspivid Basic Use (Legacy - Raspberry Pi 3B Plus and earlier)
- Raspberry Pi Cameras (Newer - Raspberry Pi 4 and beyond)
Start Video Stream On Raspberry Pi® 3B+
If you know how to access the Raspberry Pi® 3B; terminal ( via Tera Term for Windows® or similar ), and if you have the raspivid utility installed, then you can start a video stream by running the following command.
- Using RealVNC, or your favorite terminal application, connect to your Raspberry Pi® 3B+ desktop.
- Open a terminal window on the Raspberry Pi® 3B+.
-
Copy the following command to the Windows® clipboard.
raspivid -o - -e -n -w 1280 -h 720 -fps 30 -g 30 -ih -pf high -md 4 -k -b 2000000 | cvlc -A-vvv -v stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/video}' :demux=h264
Note that you can set the resolution and frames-per-second of the video stream using the -w, -h, and -fps parameters respectively.
-
Use CTRL + V or right click to paste the command into the terminal window.
The RTSP address of the video stream is then as follows:
rtsp://<RASP_PI_IP_ADDRESS>:8554/video, where RASP_PI_IP_ADDRESS is the IP address shown or specified during the connection process or on top of the terminal window.
For example: rtsp://192.168.1.30:8554/video
- Write down the RTSP stream address.
Verify Video Playback
Use VLC to verify that your Raspberry Pi® 3B+ is streaming video from its camera.
- Open VLC Media Player.
- Select Open Network Stream from the main menu.
VLC displays the following dialog:
- Find the text entry field named Please enter a network URL:.
- Enter the previously saved address for the Raspberry Pi® 3B+ RTSP video stream.
For example: rtsp://192.168.1.30:8554/video
- Click Play.
In a few moments the Raspberry Pi® 3B+ video (delayed by a few seconds) will appear within VLC.
This exercise is complete. Return to tutorials or proceed to the next exercise in this series.