Ubuntu14.04下编译luvcview

首先安装依赖
sudo apt-get install debhelper
sudo apt-get install libsdl1.2-dev
sudo apt-get install libv4l-dev
sudo apt-get install pkg-config

1、解压 tar -zxvf luvcview_0.2.6.orig.tar.gz
2、cd luvcview-0.2.6
3、make clean
4、make

会有报错:
1、uvcvideo.h:5:10: fatal error: linux/videodev.h: No such file or directory #include <linux/videodev.h>
修改:执行 命令sudo ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h

2、出现如下错误:在这里插入图片描述
修改:在luvcview.c和v4l2uvc.h中添加头文件#include <linux/videodev2.h>即可

插入usb摄像头
1、查看支持哪些摄像头命令:
./luvcview -d /dev/video0 -L
支持种类:
luvcview 0.2.6
SDL information:
Video driver: x11
A window manager is available
Device information:
Device path: /dev/video0
/dev/video0 does not support read i/o
{ pixelformat = ‘YUYV’, description = ‘YUYV 4:2:2’ }
{ discrete: width = 400, height = 400 }
Time interval between frame: 1/30,
{ pixelformat = ‘MJPG’, description = ‘Motion-JPEG’ }
{ discrete: width = 400, height = 400 }
Time interval between frame: 1/30,

2、打开看视频
./luvcview -d /dev/video0 -f MJPG -s 400x400 -i 30
其中-f MJPG代表摄像头输出格式
-s 400x400代表输出像素尺寸
-i 30 代表输出帧率

视频画面:
在这里插入图片描述

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值