树莓派+官方摄像头模块+VLC串流实时输出网络视频流

来源:互联网 发布:粒粒贷网络借贷 编辑:程序博客网 时间:2024/05/16 09:42

sudo apt-get updatesudo apt-get install vlcsudo 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客户端打开网络串流就行了。

[0xd604f0] packetizer_h264 demux packetizer debug: found NAL_PPS (pps_id=0 sps_id=0)[0xce6458] main input debug: selecting program id=0[0xd522f8] main decoder debug: looking for packetizer module: 21 candidates[0xd522f8] main decoder debug: using packetizer module "packetizer_h264"[0xd522f8] main decoder debug: TIMER module_need() : 0.912 ms - Total 0.912 ms / 1 intvls)[0xce6458] main input error: Invalid PCR value in ES_OUT_SET_(GROUP_)PCR ![0xce6458] main input debug: switching to sync mode[0xce6458] main input debug: Buffering 0%[0xd522f8] packetizer_h264 decoder debug: found NAL_SPS (sps_id=0)[0xd522f8] packetizer_h264 decoder debug: found NAL_PPS (pps_id=0 sps_id=0)[0xce6458] main input debug: Buffering 13%[0xd5ac40] main stream output debug: adding a new sout input (sout_input:0xcee4d8)[0xd5d270] main mux debug: adding a new input[0xd5d270] mux_ts mux debug: adding input codec=h264 pid=68[0xd5d270] mux_ts mux debug: new PCR PID is 68[0xce6458] main input debug: Buffering 26%[0xce6458] main input debug: Buffering 40%[0xce6458] main input debug: Buffering 53%[0xce6458] main input debug: Buffering 66%[0xce6458] main input debug: Buffering 80%[0xce6458] main input debug: Buffering 93%[0xce6458] main input debug: Stream buffering done (320 ms in 22 ms)[0xce6458] main input debug: Decoder buffering done in 0 ms[0xd5d270] main mux warning: late buffer for mux input (30138)[0xd5d270] mux_ts mux warning: packet with too strange dts (dts=5834500483,old=5837242731)[0xd5d270] mux_ts mux warning: packet with too strange dts (dts=5834706185,old=5834740483)


参考:http://bbs.ickey.cn/group-topic-id-14728.html




0 0
原创粉丝点击