我的树莓派Zero的摄像头安装MotionEysOS系统后,可以通过http://192.168.1.102:8081 的方式访问正常。通过mjpeg的形式接入了HA,在HA里面也可以正常播放视频。目前想接入到Homekit里,通过Homebradge的
Homebridge Camera FFmpeg插件,遇到的问题是Home APP总是显示“此摄像头未响应”。请教一下大家这个问题大概出在什么地方,谢谢!
Homebridge Camera FFmpeg插件的配置如下:
{
"name": "Camera FFmpeg",
"videoProcessor": "/usr/local/bin/ffmpeg",
"cameras": [
{
"name": "MotionEyeOS",
"manufacturer": "Raspberrypi",
"model": "Pi NoIR Camera V2",
"serialNumber": "1234567890",
"firmwareRevision": "1.0",
"motion": false,
"unbridge": false,
"videoConfig": {
"source": "-re -i http://192.168.1.102:8081",
"maxStreams": 2,
"maxWidth": 640,
"maxHeight": 480,
"maxFPS": 10,
"audio": false,
"debug": true
}
}
],
"platform": "Camera-ffmpeg"
}
复制代码
安装Homebridge的机器上访问摄像头也是正常的:
pi@homebridge:~ $ ffmpeg -re -i http://192.168.1.102:8081 -an -f null -
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --
pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/buil
d/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shar
ed --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-
nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-lib
theora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac -
-enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --e
nable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxe
r=rtsp --enable-omx-rpi --enable-mmal --enable-indev=alsa --enable-outdev=alsa
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, mpjpeg, from 'http://192.168.1.102:8081':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 640x480 [S
AR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
encoder : Lavf58.45.100
Stream #0:0: Video: wrapped_avframe, yuvj420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 k
b/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc58.91.100 wrapped_avframe
frame= 1321 fps= 25 q=-0.0 Lsize=N/A time=00:00:52.84 bitrate=N/A speed= 1x
video:526kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: un
known
Exiting normally, received signal 2.
复制代码