Friday, January 1, 2021

Raspberry Pi stream camera video using raspivid in rtsp protocol, view in Android using VLC app.

Work on Raspberry Pi 4B/8G running Raspberry Pi OS (32 bit), stream video from Camera Module to port 8000 in rtsp protocol, enter the command:

$ raspivid -o - -t 0 -n -w 800 -h 600 -fps 30| cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8000/}' :demux=h264

where:
-w 800 : width=800
-h 600 : height=600
-fps 30 : 30 frame per second
8000 : the port to stream video

Open VLC App, Open Network Stream
rtsp://<Raspberry Pi IP>:8000/
e.g. rtsp://192.168.1.30:8000/

No comments: