VLC获取Raspberry Pi使用UV4L HTTP Streaming Server 提供的实时视频流
2015-06-03 16:11
776 查看
如果网络条件允许,建议看原文。
原文地址:
http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=14
http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=16#example11
$ curl http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc | sudo
apt-key add –
把以下内容添加到/etc/apt/sources.list文件中:
deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy
main
安装UV4L。如果已经安装过UV4L,下面的两条命令会把它更新到最新版:
$ sudo apt-get update
$ sudo apt-get install uv4l uv4l-raspicam
如果你想让驱动在开机的时候被加载,那就安装下面的包:
$ sudo apt-get install uv4l-raspicam-extras
为了方便,上面的包提供了以服务的方式去开始和停止驱动:
$ sudo service uv4l_raspicam restart
在服务开启的时候,uv4l会去解析配置文件/etc/uv4l/uv4l-raspicam.conf以获取 驱动选项的默认值。所以,更改这个文件,以改变驱动选线的默认值。
此时,已经安装了UV4L的核心组件和Video4Linux2驱动,如果有错误发生,可以考虑更新固件,运行以下命令:
$ sudo rpi-update
可以使用以下两条命令获取更多的使用信息:
$ man uv4l
$ man uv4l-raspicam
获取命令选项列表:
$ uv4l --help--driver raspicam --driver-help
如果你没有安装可选包uv4l-raspicam-extras,又想要快速测试uv4l,可以手动加载:
$ uv4l --driver raspicam --auto-video_nr --width 640 --height 480 --encoding mjpeg(或者h264、jpeg)
拍一张JPEG的图片:
$ ddif=/dev/video0 of=snapshot.jpeg bs=11M count=1
结束正在运行的uv4l:
$sudo pkill uv4l
安装uv4l-server模块:
$ sudo apt-get install uv4l-server
可以选择安装以下模块:
$ sudo apt-getinstall uv4l-uvc
$ sudo apt-getinstall uv4l-xscreen
$ sudo apt-getinstall uv4l-mjpegstream
http://raspberrypi:8080
从服务器获取HTTP/MJPEG(Video) 视频流:
client ~ $ cvlc http://raspberrypi:8080/stream/video.mjpeg
从服务器获取HTTP/raw H264 视频流:
client ~ $ cvlc http://raspberrypi:8080/stream/video.h264 --demuxh264
从服务器获取HTTP/JPEG从服务器获取:
client ~ $ cvlc http://raspberrypi:8080/stream/video.jpeg
更多的内容请参考原文。
原文地址:
http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=14
http://www.linux-projects.org/modules/sections/index.php?op=viewarticle&artid=16#example11
在Raspberry Pi上安装或更新UV4L
打开终端,输入以下命令:$ curl http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc | sudo
apt-key add –
把以下内容添加到/etc/apt/sources.list文件中:
deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy
main
安装UV4L。如果已经安装过UV4L,下面的两条命令会把它更新到最新版:
$ sudo apt-get update
$ sudo apt-get install uv4l uv4l-raspicam
如果你想让驱动在开机的时候被加载,那就安装下面的包:
$ sudo apt-get install uv4l-raspicam-extras
为了方便,上面的包提供了以服务的方式去开始和停止驱动:
$ sudo service uv4l_raspicam restart
在服务开启的时候,uv4l会去解析配置文件/etc/uv4l/uv4l-raspicam.conf以获取 驱动选项的默认值。所以,更改这个文件,以改变驱动选线的默认值。
此时,已经安装了UV4L的核心组件和Video4Linux2驱动,如果有错误发生,可以考虑更新固件,运行以下命令:
$ sudo rpi-update
可以使用以下两条命令获取更多的使用信息:
$ man uv4l
$ man uv4l-raspicam
获取命令选项列表:
$ uv4l --help--driver raspicam --driver-help
如果你没有安装可选包uv4l-raspicam-extras,又想要快速测试uv4l,可以手动加载:
$ uv4l --driver raspicam --auto-video_nr --width 640 --height 480 --encoding mjpeg(或者h264、jpeg)
拍一张JPEG的图片:
$ ddif=/dev/video0 of=snapshot.jpeg bs=11M count=1
结束正在运行的uv4l:
$sudo pkill uv4l
安装uv4l-server模块:
$ sudo apt-get install uv4l-server
可以选择安装以下模块:
$ sudo apt-getinstall uv4l-uvc
$ sudo apt-getinstall uv4l-xscreen
$ sudo apt-getinstall uv4l-mjpegstream
使用VLC获取实时视频流
使用网页配置UV4L选项:http://raspberrypi:8080
从服务器获取HTTP/MJPEG(Video) 视频流:
client ~ $ cvlc http://raspberrypi:8080/stream/video.mjpeg
从服务器获取HTTP/raw H264 视频流:
client ~ $ cvlc http://raspberrypi:8080/stream/video.h264 --demuxh264
从服务器获取HTTP/JPEG从服务器获取:
client ~ $ cvlc http://raspberrypi:8080/stream/video.jpeg
更多的内容请参考原文。
相关文章推荐
- 大文件的断点续传
- spring security之httpSecurity使用示例
- [FZYZOJ 1031] 无线网络
- Linux 网络编程(epoll)
- Linux 网络编程(多路复用)
- Linux 网络编程(UDP)
- Linux 网络编程(TCP)
- http2
- Java http方式提交短信到短信网关
- 文件服务器Apache http Server的安装步骤与说明
- 边读边计算的如果用计数器则可以指定读取第几行内容第一例(答复:咨询VB读文本文件,文本文件有N行,3列。想得到1、2列相同时。3列的值求和)http://bbs.csdn.net/topics/390
- Windows Socket 最大连接数
- java发送http请求
- java发送http请求
- java发送http请求
- Linux常用网络命令(三)
- JMeter报错:NoHTTPResponseException
- 网络直播电视之M3U8解析篇 (下)
- 网络多线程 ---实现网络加载图片
- tcpdump 命令详解