树莓派+官方摄像头+vlc 远程实时监控

sudo apt-get update  
sudo apt-get install vlc  
sudo raspivid -o - -t 0 -w 640 -h 360 -fps 25|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264 

在电脑端,无论是Windows,Linux还是OSX,或者安卓机器,只要能安装VLC,现在就可以打开VLC,然后打开媒体-》网络串流-》输入http://PI的IP地址:8090查看实时不卡的网络监控了。

第一行是更新软件数据库

第二行是安装vlc

第三行是使用PI官方的raspivid捕获视频工具把视频流输出到vlc,通过vlc转码成h264网络视频流通过http协议以ts的形式封装,然后输出到8090端口,用这个当监控只要网络稳定绝对不卡。

看到以下内容就说明开始正常输出内容了。然后在其它VLC客户端打开网络串流就行了。

[html]  view plain  copy
  1. [0xd604f0] packetizer_h264 demux packetizer debug: found NAL_PPS (pps_id=0 sps_id=0)  
  2. [0xce6458] main input debug: selecting program id=0  
  3. [0xd522f8] main decoder debug: looking for packetizer module: 21 candidates  
  4. [0xd522f8] main decoder debug: using packetizer module "packetizer_h264"  
  5. [0xd522f8] main decoder debug: TIMER module_need() : 0.912 ms - Total 0.912 ms / 1 intvls)  
  6. [0xce6458] main input error: Invalid PCR value in ES_OUT_SET_(GROUP_)PCR !  
  7. [0xce6458] main input debug: switching to sync mode  
  8. [0xce6458] main input debug: Buffering 0%  
  9. [0xd522f8] packetizer_h264 decoder debug: found NAL_SPS (sps_id=0)  
  10. [0xd522f8] packetizer_h264 decoder debug: found NAL_PPS (pps_id=0 sps_id=0)  
  11. [0xce6458] main input debug: Buffering 13%  
  12. [0xd5ac40] main stream output debug: adding a new sout input (sout_input:0xcee4d8)  
  13. [0xd5d270] main mux debug: adding a new input  
  14. [0xd5d270] mux_ts mux debug: adding input codec=h264 pid=68  
  15. [0xd5d270] mux_ts mux debug: new PCR PID is 68  
  16. [0xce6458] main input debug: Buffering 26%  
  17. [0xce6458] main input debug: Buffering 40%  
  18. [0xce6458] main input debug: Buffering 53%  
  19. [0xce6458] main input debug: Buffering 66%  
  20. [0xce6458] main input debug: Buffering 80%  
  21. [0xce6458] main input debug: Buffering 93%  
  22. [0xce6458] main input debug: Stream buffering done (320 ms in 22 ms)  
  23. [0xce6458] main input debug: Decoder buffering done in 0 ms  
  24. [0xd5d270] main mux warning: late buffer for mux input (30138)  
  25. [0xd5d270] mux_ts mux warning: packet with too strange dts (dts=5834500483,old=5837242731)  
  26. [0xd5d270] mux_ts mux warning: packet with too strange dts (dts=5834706185,old=5834740483)  


猜你喜欢

转载自blog.csdn.net/xia0_ba1/article/details/79600543