homebridge-camera-ffmpeg
homebridge-camera-ffmpeg copied to clipboard
FFmpeg exited with code: 1 and signal: null (Error)
With new Yi cameras with the custom firmware I have problems accessing them on HomeKit.
I can access them with their IP and on YiHome app but not on HomeKit. I searched a lot and did some additional configuration for the cameras but fail to access them. Here I copy all the relevant logs.
[03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] Stream command: /usr/local/lib/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg -i rtsp://192.168.1.43/ch0_0.h264 -an -sn -dn -codec:v libx264 -pix_fmt yuv420p -color_range mpeg -r 30 -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(800,iw)':'min(600,ih)':force_original_aspect_ratio=decrease,scale=trunc(iw/2)*2:trunc(ih/2)*2 -b:v 299k -payload_type 99 -ssrc 14287403 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params 7KF+UpIAncu/+y6UaVPqnjv7g0+V931qns+zW4jm srtp://192.168.1.53:63173?rtcpport=63173&pkt_size=1316 -vn -sn -dn -codec:a libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 12122410 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params CVoD0OHZ2ZXNHhVQ/+l5wo+5a2EvQ0ry5Le0iyjd srtp://192.168.1.53:56033?rtcpport=56033&pkt_size=188 -loglevel level+verbose -progress pipe:1 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-omx-rpi --enable-mmal --enable-indev=alsa --enable-outdev=alsa [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] libavutil 57. 17.100 / 57. 17.100 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] libavcodec 59. 18.100 / 59. 18.100 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] libavformat 59. 16.100 / 59. 16.100 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] libavdevice 59. 4.100 / 59. 4.100 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] libavfilter 8. 24.100 / 8. 24.100 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] libswscale 6. 4.100 / 6. 4.100 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] libswresample 4. 3.100 / 4. 3.100 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [info] libpostproc 56. 3.100 / 56. 3.100 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [tcp @ 0x4257500] [verbose] Starting connection attempt to 192.168.1.43 port 554 [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [tcp @ 0x4257500] [verbose] Connection attempt to 192.168.1.43 port 554 failed: Connection refused [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [tcp @ 0x4257500] [error] Connection to tcp://192.168.1.43:554?timeout=0 failed: Connection refused [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] [error] rtsp://192.168.1.43/ch0_0.h264: Connection refused [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] FFmpeg exited with code: 1 and signal: null (Error) [03/09/2022, 13:45:50] [Camera FFmpeg] [Baby Camera] Stopped video stream.
You’re getting connection refused, make sure the URL for your camera is correct,
My code looks like this. Anything wrong?
{ "name": "Baby Camera", "unbridge": true, "videoConfig": { "source": "-i rtsp://192.168.1.43/ch0_0.h264", "stillImageSource": "http://192.168.1.43:8080/cgi-bin/snapshot.sh?res=low&watermark=yes", "maxStreams": 2, "maxWidth": 800, "maxHeight": 600, "forceMax": false, "vcodec": "libx264", "audio": true, "debug": true }
Coming back to you on this.
I started to get at least screenshot of cameras but still live stream fails on homekit. Do I have any alternatives for the video source to enter at ffmpeg? My current code is: -i rtsp://192.168.1.43/ch0_0.h264
force_original_aspect_ratio=decrease,scale=trunc(iw/2)*2:trunc(ih/2)*2 is not enclosed in ' and crashes the shell command
Here : https://github.com/Sunoo/homebridge-camera-ffmpeg/blob/a3d2f7ecaf5505855cb880ce77bdad9989c597ca/src/streamingDelegate.ts#L160
Oh, anything I can do?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Good afternoon. Apparently something has changed in the plugin? I noticed that the cameras are not shown in Homekit. Just see the snapshot real once a minute.
Setting up RTSP looks like this in the plugin. Is there a mistake here now? (everything used to work).
Video source: -rtsp_transport tcp -i rtsp://admin:********@192.168.1.30:554/cam/realmonitor?channel=1&subtype=0
{ "name": "Cam2", "videoConfig": { "source": "-rtsp_transport tcp -i rtsp://admin:******@192.168.1.30:554/cam/realmonitor?channel=1&subtype=0", "maxStreams": 2, "maxWidth": 1920, "maxHeight": 1080, "maxFPS": 30, "maxBitrate": 1600, "vcodec": "h264_omx", "audio": false }
Try a different vcodec setting, maybe libx264.
The fact is that the cameras worked with such settings for a very long time. The settings have not changed. Perhaps something has changed in the plugin....
Indeed, changing the codec helped. Thank you! )))
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.