项目-摄像
树莓派摄像头使用方法 Camera教程
https://www.raspi.cc/index.php?c=read&id=53&page=1
nanopc-t4
https://www.raspi.cc/index.php?c=read&id=53&page=1
摄像头型号
Raspberry Pi Camera Rev 1.3
检测故障
dmesg | grep -i mipi
pi@NanoPC-T4:~$ dmesg | grep -i mipi
[ 2.528023] rockchip-mipi-dphy-rx: No link between dphy and sensor
[ 2.528584] rockchip-mipi-dphy-rx: No link between dphy and sensor
[ 2.530501] rockchip-mipi-dphy-rx: No link between dphy and sensor
[ 2.531073] rockchip-mipi-dphy-rx: No link between dphy and sensor
https://wiki.friendlyelec.com/wiki/index.php/NanoPC-T4/zh#gst-camera.sh_.E5.8F.82.E6.95.B0.E8.AF.B4.E6.98.8E
运行
gst-camera.sh --action preview
报错
gst-launch-1.0: no process found
/usr/bin/gst-camera.sh: line 178: [: =: unary operator expected
====================================================
=== GStreamer 1.1 command:
=== gst-launch-1.0 v4l2src device= io-mode=4 ! videoconvert ! video/x-raw,format=NV12, !
====================================================
/usr/bin/gst-camera.sh: line 194: [: too many arguments
su: must be run from a terminal
运行
sudo gst-camera.sh --action preview
报错
gst-launch-1.0: no process found
/usr/bin/gst-camera.sh: line 178: [: =: unary operator expected
====================================================
=== GStreamer 1.1 command:
=== gst-launch-1.0 v4l2src device= io-mode=4 ! videoconvert ! video/x-raw,format=NV12, !
====================================================
/usr/bin/gst-camera.sh: line 194: [: too many arguments
ERROR: pipeline could not be constructed: could not parse caps "video/x-raw,format=NV12,".
gst - launch - 1.0
是 GStreamer 多媒体框架中的一个命令行工具。GStreamer 是一个用于构建流媒体应用程序的库,它允许开发者创建各种多媒体处理管道,包括音频和视频的播放、录制、编辑以及格式转换等功能。
sudo apt-get update
sudo apt-get install gstreamer1.0-tools
sudo apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
sudo apt-get install gstreamer1.0-tools
gst-launch-1.0(注意,应替换为实际管道)。
查看gst-launch-1.0是否正常,以下命令会播放测试视频
gst-launch-1.0 videotestsrc ! autovideosink
输出没问题,证明gst-launch-1.0正常,接下来排除摄像头驱动的故障
https://cloud.tencent.com/developer/article/1421907