使用UV4L驱动程序将视频从Raspberry Pi相机流式传输到Android手机


8

你好覆盆子的人!

我发布了一个新问题,因为我在raspberrypi.stackexchange上没有足够的代表才能对此帖子发表评论:https : //raspberrypi.stackexchange.com/questions/15000/stream-video-from-rpi-cam -to-android-phone可以解决我的问题,只有我无法使它起作用:(

简而言之,我想通过我的Android控制机器人,机器人内部是带有树莓派相机的树莓派。因此,对于初学者来说,我只想将视频从机器人流式传输到手机上的Java应用程序。

关于上述问题的第一条评论链接到该帖子该帖子显示了如何使用PS眼睛作为摄像头将视频从Raspberry流式传输到Android手机。

“ alex”的第四个评论说,关于使用树莓派pi摄像头而不是PS摄像头摄像头:

I've found the solution: I had to install the uv4l driver 
to use the RaspiCam as /dev/video0 and I had to modify the gst-server.sh : 
inserted videoscale !\ after ffmpegcolorspace !\ and it works :)

因此, 我按照本指南在树莓派上安装uv4l驱动程序:http : //www.linux-projects.org/modules/sections/index.php? op=viewarticle&artid =14

我认为正在运行这些终端命令:

wget http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc && sudo apt-key add ./lrkey.asc
Adding line to apt sources -->> deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy main
sudo apt-get update
sudo apt-get install uv4l uv4l-raspicam
sudo apt-get install uv4l-raspicam-extras

现在,如果我快速测试UV4L驱动程序

dd if=/dev/video0 of=snapshot.jpeg bs=11M count=1

我得到的只是一张全黑的快照。

另外,如果我尝试重新启动驱动程序:

sudo service uv4l_raspicam restart

我收到此警告:

pi@raspberrypi /etc/uv4l $ sudo service uv4l_raspicam restart
[....] Starting UV4L Raspberry CSI Camera Driver: uv4l
<notice> [core] Trying built-in driver 'raspicam'
<warning> [core] Driver 'raspicam' not found
<notice> [core] Trying driver plug-in 'raspicam'
<notice> [driver] Raspicam Video4Linux2 Driver v1.9.19 built Jul 12 2014
<notice> [driver] Selected format: 1920x1080, encoding: mjpeg, JPEG Video Capture
<notice> [driver] Framerate max. 30 fps
<notice> [driver] ROI: 0, 0, 1, 1
<notice> [core] Device detected!
<notice> [core] Loading the CUSE kernel module
<notice> [core] Registering device node /dev/video0

任何见解都将不胜感激!而且,对冗长的帖子很抱歉:(

非常感谢!

Answers:


4

对我来说,我可以通过运行以下命令来使其工作:

sudo apt-get install uv4l-server
sudo apt-get install uv4l-uvc
sudo apt-get install uv4l-xscreen
sudo apt-get install uv4l-mjpegstream

连结网址


3

现在,UV4L支持带有的音频/视频流WebRTC,使您可以将实时流传输到Android手机和/或其他浏览器。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.