之前我已经将开发板配置好了,下面就要做一些实质性的内容。
连接摄像头
1、输入指令查看设备
cd /dev
ls
2、将摄像头插入开发板中,再次输入指令查看设备,会新增一个数据流(我的是video0),记住该数据流
3、进入项目根目录,便可以找到config.yaml文件,我的路径是/home/pi/webrtc-remote-control-device
cd /home/pi/webrtc-rmote-control-device
4、输入指令
vim config.yaml
便能编辑该文件
5、修改示例如下:
---
ICEServers:
- URLs: 'stun:118.89.111.54:3478'
- URLs: 'turn:118.89.111.54:3478'
Username: 'leizhh'
Credential: 'leizhh'
DeviceId: 'pi-ea0a55da'
Password: '111111'
ServerAddr: '118.89.111.54:8080'
AudioSrc: 'v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480 framerate=30/1 ! videoconvert ! queue'
VideoSrc: 'videotestsrc'
SSHHost: '127.0.0.1'
其中AudioSrc一行中的video0要改成之前看到的摄像头的数据