『瀚思彼岸』» 智能家居技术论坛
标题:
树莓派HA接入萤石C6H的问题求助
[打印本页]
作者:
flyinsea
时间:
2018-10-29 18:31
标题:
树莓派HA接入萤石C6H的问题求助
本帖最后由 flyinsea 于 2018-10-29 18:31 编辑
先按照这个帖子
树莓派编译安装FFmpeg(添加H.264硬件编解码器支持)
安装ffmpeg ,安装的3.3.4版本,最新的4.0版本编译反而有问题,而且不支持ffserver了,所以用了3.0的最新版本3.3.4.
按照这位大大的帖子
[进阶教程] homebridge homeassistant 配置萤石C6H摄像头
接入萤石C6H。
配置参数如下
camera:
- platform: ffmpeg
input: -rtsp_transport tcp -i
rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream
name: ezviz
extra_arguments: -pred 1 -q:v 2 -s 1280x720
ffmpeg:
ffmpeg_bin: /usr/local/bin/ffmpeg
一开始按照上面帖子里编译参数,安装ffmpeg后发现没有enable image2和image2pipe导致出不来图像
后来加上 --enable-muxer=image2pipe 重新编译安装后,图像能出来了。但是还有个问题
预览图能出来,链接 url为
http://192.168.xxx.xxx:8123/api/ ... 37aa6fd4aabfab9e31c
大概是10s左右更新一次画面
点击该预览图进入实时画面,对应图片显示不出来,url链接 为
http://192.168.xxx.xxx:8123/api/ ... 37aa6fd4aabfab9e31c
就是说camera_proxy_stream 无法显示,camera_proxy 正常处理。如附图所示
log里也看不出什么来,摘取部分log如下,请问这个该从哪方面去解决?
[attach]10584[/attach]
2018-10-29 17:38:24 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Received {'entity_id': 'camera.ezviz', 'id': 343, 'type': 'camera_thumbnail'}
2018-10-29 17:38:24 DEBUG (MainThread) [haffmpeg.core] Start FFmpeg with ['/usr/local/bin/ffmpeg', '-rtsp_transport', 'tcp', '-i', 'rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream', '-an', '-frames:v', '1', '-c:v', 'mjpeg', '-pred', '1', '-q:v', '2', '-s', '1280x720', '-f', 'image2pipe', '-']
2018-10-29 17:38:27 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Sending {'result': {'content_type': 'image/jpeg', 'content': '....(这里是图像数据base64值)'}, 'success': True, 'id': 343, 'type': 'result'}
2018-10-29 17:38:30 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state sun.sun=below_horizon; azimuth=256.26, next_dawn=2018-10-29T22:12:41+00:00, next_midnight=2018-10-29T15:58:06+00:00, next_dusk=2018-10-29T09:44:42+00:00, next_noon=2018-10-30T03:58:05+00:00, next_rising=2018-10-29T22:40:36+00:00, friendly_name=Sun, next_setting=2018-10-30T09:15:36+00:00, elevation=-4.76 @ 2018-10-29T17:16:52.019921+08:00>, new_state=<state sun.sun=below_horizon; azimuth=256.42, next_dawn=2018-10-29T22:12:41+00:00, next_midnight=2018-10-29T15:58:06+00:00, next_dusk=2018-10-29T09:44:42+00:00, next_noon=2018-10-30T03:58:05+00:00, next_rising=2018-10-29T22:40:36+00:00, friendly_name=Sun, next_setting=2018-10-30T09:15:36+00:00, elevation=-4.95 @ 2018-10-29T17:16:52.019921+08:00>, entity_id=sun.sun>
2018-10-29 17:38:32 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Received {'entity_id': 'camera.ezviz', 'id': 344, 'type': 'camera_thumbnail'}
2018-10-29 17:38:32 DEBUG (MainThread) [haffmpeg.core] Start FFmpeg with ['/usr/local/bin/ffmpeg', '-rtsp_transport', 'tcp', '-i', 'rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream', '-an', '-frames:v', '1', '-c:v', 'mjpeg', '-pred', '1', '-q:v', '2', '-s', '1280x720', '-f', 'image2pipe', '-']
2018-10-29 17:38:35 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Sending {'result': {'content_type': 'image/jpeg', 'content': '....(这里是图像数据base64值)'}, 'success': True, 'id': 344, 'type': 'result'}
2018-10-29 17:38:42 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Received {'entity_id': 'camera.ezviz', 'id': 345, 'type': 'camera_thumbnail'}
2018-10-29 17:38:42 DEBUG (MainThread) [haffmpeg.core] Start FFmpeg with ['/usr/local/bin/ffmpeg', '-rtsp_transport', 'tcp', '-i', 'rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream', '-an', '-frames:v', '1', '-c:v', 'mjpeg', '-pred', '1', '-q:v', '2', '-s', '1280x720', '-f', 'image2pipe', '-']
2018-10-29 17:38:45 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Sending {'result': {'content_type': 'image/jpeg', 'content': '....(这里是图像数据base64值)'}, 'success': True, 'id': 345, 'type': 'result'}
2018-10-29 17:38:52 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Received {'entity_id': 'camera.ezviz', 'id': 346, 'type': 'camera_thumbnail'}
2018-10-29 17:38:52 DEBUG (MainThread) [haffmpeg.core] Start FFmpeg with ['/usr/local/bin/ffmpeg', '-rtsp_transport', 'tcp', '-i', 'rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream', '-an', '-frames:v', '1', '-c:v', 'mjpeg', '-pred', '1', '-q:v', '2', '-s', '1280x720', '-f', 'image2pipe', '-']
2018-10-29 17:38:55 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Sending {'result': {'content_type': 'image/jpeg', 'content': '....(这里是图像数据base64值)'}, 'success': True, 'id': 346, 'type': 'result'}
2018-10-29 17:39:02 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Received {'entity_id': 'camera.ezviz', 'id': 347, 'type': 'camera_thumbnail'}
2018-10-29 17:39:02 DEBUG (MainThread) [haffmpeg.core] Start FFmpeg with ['/usr/local/bin/ffmpeg', '-rtsp_transport', 'tcp', '-i', 'rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream', '-an', '-frames:v', '1', '-c:v', 'mjpeg', '-pred', '1', '-q:v', '2', '-s', '1280x720', '-f', 'image2pipe', '-']
2018-10-29 17:39:05 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Sending {'result': {'content_type': 'image/jpeg', 'content': '....(这里是图像数据base64值)'}, 'success': True, 'id': 347, 'type': 'result'}
2018-10-29 17:39:12 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Received {'entity_id': 'camera.ezviz', 'id': 348, 'type': 'camera_thumbnail'}
2018-10-29 17:39:12 DEBUG (MainThread) [haffmpeg.core] Start FFmpeg with ['/usr/local/bin/ffmpeg', '-rtsp_transport', 'tcp', '-i', 'rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream', '-an', '-frames:v', '1', '-c:v', 'mjpeg', '-pred', '1', '-q:v', '2', '-s', '1280x720', '-f', 'image2pipe', '-']
2018-10-29 17:39:15 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Sending {'result': {'content_type': 'image/jpeg', 'content': '....(这里是图像数据base64值)'}, 'success': True, 'id': 348, 'type': 'result'}
2018-10-29 17:39:18 INFO (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy_stream/camera.ezviz to 192.168.xxx.xxx (auth: True)
2018-10-29 17:39:18 DEBUG (MainThread) [haffmpeg.core] Start FFmpeg with ['/usr/local/bin/ffmpeg', '-rtsp_transport', 'tcp', '-i', 'rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream', '-an', '-c:v', 'mjpeg', '-pred', '1', '-q:v', '2', '-s', '1280x720', '-f', 'mpjpeg', '-']
2018-10-29 17:39:20 DEBUG (MainThread) [haffmpeg.core] Close FFmpeg process
2018-10-29 17:39:22 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Received {'entity_id': 'camera.ezviz', 'id': 349, 'type': 'camera_thumbnail'}
2018-10-29 17:39:22 DEBUG (MainThread) [haffmpeg.core] Start FFmpeg with ['/usr/local/bin/ffmpeg', '-rtsp_transport', 'tcp', '-i', 'rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream', '-an', '-frames:v', '1', '-c:v', 'mjpeg', '-pred', '1', '-q:v', '2', '-s', '1280x720', '-f', 'image2pipe', '-']
2018-10-29 17:39:25 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1558682928: Sending {'result': {'content_type': 'image/jpeg', 'content': '....(这里是图像数据base64值)'}, 'success': True, 'id': 349, 'type': 'result'}
2018-10-29 17:39:25 INFO (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy_stream/camera.ezviz to 192.168.xxx.xxx (auth: True)
2018-10-29 17:39:25 DEBUG (MainThread) [haffmpeg.core] Start FFmpeg with ['/usr/local/bin/ffmpeg', '-rtsp_transport', 'tcp', '-i', 'rtsp://admin:
[email protected]
:554/h264/ch1/main/av_stream', '-an', '-c:v', 'mjpeg', '-pred', '1', '-q:v', '2', '-s', '1280x720', '-f', 'mpjpeg', '-']
2018-10-29 17:39:28 DEBUG (MainThread) [haffmpeg.core] Close FFmpeg process
复制代码
作者:
xieahui
时间:
2018-10-30 12:44
本帖最后由 xieahui 于 2018-10-30 12:49 编辑
我用的这个一切正常
海康的室内半球
- platform: ffmpeg
name: camera1
input: -rtsp_transport tcp -i rtsp://admin:
[email protected]
/Streaming/Channels/1
ffmpeg_bin: /usr/bin/avconv
复制代码
欢迎光临 『瀚思彼岸』» 智能家居技术论坛 (https://bbs.hassbian.com/)
Powered by Discuz! X3.5