sudo raspivid -o - -t 0 -w 1920 -h 1080 -fps 20|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8080}' :demux=h264
電腦端用vlc播放視頻,視頻地址:http://樹莓派ip:8080
-t 表示延時;
-w表示圖像寬度;
-h 表示圖像高度;
-o表示輸出
輸出rtsp格式:
sudo raspivid -o - -t 0 -w 1000 -h 576 -fps 20 -b 250000 | cvlc -vvv stream:///dev/stdin --sout '#rtp{access=udp,sdp=rtsp://:8554/stream}' :demux=h264
播放地址:rtsp://192.168.0.109:8554/stream