Browse Source

Signed-off-by: caner <5658514@qq.com>

caner 3 years ago
parent
commit
db0e031500
2 changed files with 24 additions and 1 deletions
  1. 23 0
      README.md
  2. 1 1
      index.js

+ 23 - 0
README.md

@@ -21,4 +21,27 @@
 ```
 ```
 1. 电调需自行找中位可参考:[sensor] (https://git.caner.top/Caner/sensor)
 1. 电调需自行找中位可参考:[sensor] (https://git.caner.top/Caner/sensor)
 2. 注意摇杆间的中位误差
 2. 注意摇杆间的中位误差
+3. yuyv 格式查询 gstream 根据最低分辨率填写
+    * sudo apt install v4l-utils
+    * v4l2-ctl --list-devices // 查看所有设备
+    * v4l2-ctl -d /dev/video0 --list-formats-ext --all // 查看图像格式
+    * sudo v4l2-ctl -d /dev/video0 --list-formats //查看当前摄像头支持的视频压缩格式
+    * sudo v4l2-ctl --list-framesizes=MJPG -d /dev/video0 //查看摄像头所支持的分辨率
+```
+## 服务启动
+```
+[Unit]
+Description=Car-server
+After=network.target
+
+[Service]
+Type=simple
+User=root
+ExecStart=/usr/bin/node /var/www/socket/index.js &
+Restart=always
+RestartSec=3s
+
+[Install]
+WantedBy=multi-user.target
+
 ```
 ```

+ 1 - 1
index.js

@@ -79,7 +79,7 @@ class CarServer {
 
 
             const args = [
             const args = [
                 "libcamerasrc",
                 "libcamerasrc",
-                "video/x-raw,width=320,height=240",
+                "video/x-raw,width=640,height=480",
                 "videoconvert",
                 "videoconvert",
                 "queue",
                 "queue",
                 "x264enc tune=zerolatency bitrate=1000 key-int-max=30",
                 "x264enc tune=zerolatency bitrate=1000 key-int-max=30",