Closed nicx closed 2 years ago
the channel is wrong, it shouldn't be 103, but 101 or 102 Do you use an NVR too?
@mrMiimo no, its directly configured. but its the same error message in the log with 101 and 102, too.
if you open this rtsp://***:***@192.168.1.10:554/Streaming/Channels/103/
with VLC does it work?
@mrMiimo yes this works, but only when using /101 or /102. As I said before, in the logfile I have the same error for all 3 streams. (video1, video2 and video3).
As I said before… if you look at the 1st line of your log, channel is setting /103… I don't know if you can change it. i use docker and i can set the channel as i like
@mrMiimo I am using docker compose. So how do you change this?
in the command:
don’t use hikvision option, use rtsp
ok. that for sure working. but with rstp I dont have the other features like motion etc. so that is not a solution, and thats why I opened this bug report for the hikvision integration ;)
Try adding --substream 2 when using the hikvision implementation to use 102 as the source for the lower profile stream rather than 103
ok. that for sure working. but with rstp I dont have the other features like motion etc. so that is not a solution, and thats why I opened this bug report for the hikvision integration ;)
yes i know, i just need to record. for the movements I integrated the cameras with Homekit secure video
Try adding --substream 2 when using the hikvision implementation to use 102 as the source for the lower profile stream rather than 103
Ohhh, --substream 2
in command:
?
@keshavdv great hint, thanks. that works! "bug" closed 👍 @mrMiimo yes exactly
@keshavdv it didn't work for me, maybe because I have an NVR in between.
For streaming only this url works: rtsp://admin:XXXXXXXXX@192.168.1.244:554/Streaming/Unicast/channels/401
or 101, 102, 201, 202, 301, 302, 401, 402 (I have 4 cameras)
Logs:
2022-02-23T20:47:14 2022-02-23 20:47:14 4ab2a23ce1ae HikvisionCam[1] INFO Spawning ffmpeg for video3 (5Pkn78Fw9XecMziq): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://admin:XXXXXXXX@192.167.1.244:554/Streaming/Channels/101/" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=5Pkn78Fw9XecMziq -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 192.168.1.1 7550
2022-02-23T20:47:14 2022-02-23 20:47:14 4ab2a23ce1ae HikvisionCam[1] INFO Processing [GetSystemStats] message
2022-02-23T20:47:14 2022-02-23 20:47:14 4ab2a23ce1ae HikvisionCam[1] ERROR Motion API request failed, retrying
2022-02-23T20:47:14 2022-02-23 20:47:14 4ab2a23ce1ae HikvisionCam[1] INFO Connecting to motion events API
2022-02-23T20:47:16 2022-02-23 20:47:16 4ab2a23ce1ae HikvisionCam[1] ERROR Motion API request failed, retrying
2022-02-23T20:47:16 2022-02-23 20:47:16 4ab2a23ce1ae HikvisionCam[1] INFO Connecting to motion events API
2022-02-23T20:47:18 2022-02-23 20:47:18 4ab2a23ce1ae HikvisionCam[1] INFO Processing [NetworkStatus] message
2022-02-23T20:47:19 2022-02-23 20:47:19 4ab2a23ce1ae HikvisionCam[1] INFO Processing [GetSystemStats] message
2022-02-23T20:47:19 2022-02-23 20:47:19 4ab2a23ce1ae HikvisionCam[1] ERROR Motion API request failed, retrying
2022-02-23T20:47:19 2022-02-23 20:47:19 4ab2a23ce1ae HikvisionCam[1] INFO Connecting to motion events API
2022-02-23T20:47:21 2022-02-23 20:47:21 4ab2a23ce1ae HikvisionCam[1] ERROR Motion API request failed, retrying
2022-02-23T20:47:21 2022-02-23 20:47:21 4ab2a23ce1ae HikvisionCam[1] INFO Connecting to motion events API
2022-02-23T20:47:24 2022-02-23 20:47:24 4ab2a23ce1ae HikvisionCam[1] INFO Processing [ChangeVideoSettings] message
2022-02-23T20:47:24 2022-02-23 20:47:24 4ab2a23ce1ae HikvisionCam[1] INFO Processing [ChangeVideoSettings] message
2022-02-23T20:47:24 2022-02-23 20:47:24 4ab2a23ce1ae HikvisionCam[1] ERROR Motion API request failed, retrying
2022-02-23T20:47:24 2022-02-23 20:47:24 4ab2a23ce1ae HikvisionCam[1] INFO Connecting to motion events API
2022-02-23T20:47:26 2022-02-23 20:47:26 4ab2a23ce1ae HikvisionCam[1] ERROR Motion API request failed, retrying
2022-02-23T20:47:26 2022-02-23 20:47:26 4ab2a23ce1ae HikvisionCam[1] INFO Connecting to motion events API
2022-02-23T20:47:28 2022-02-23 20:47:28 4ab2a23ce1ae HikvisionCam[1] INFO Processing [NetworkStatus] message
2022-02-23T20:47:28 2022-02-23 20:47:28 4ab2a23ce1ae HikvisionCam[1] INFO Processing [GetRequest] message
2022-02-23T20:47:29 [tcp @ 0x76b38560] Connection to tcp://192.167.1.244:554?timeout=15000000 failed: Operation timed out
2022-02-23T20:47:29 rtsp://admin:XXXXXXXX@192.167.1.244:554/Streaming/Channels/101/: Operation timed out
2022-02-23T20:47:29 [tcp @ 0x76b6d560] Connection to tcp://192.167.1.244:554?timeout=15000000 failed: Operation timed out
2022-02-23T20:47:29 rtsp://admin:XXXXXXXX@192.167.1.244:554/Streaming/Channels/101/: Operation timed out
2022-02-23T20:47:29 2022-02-23 20:47:29 4ab2a23ce1ae HikvisionCam[1] ERROR Motion API request failed, retrying
If you're using an NVR, use --channel 4 to select streams 401 and 403 or a combination of --channel and --substream to select the appropriate streams.
@keshavdv I tried and it works! I can set the channel and streams I need. But streaming video and API don't work.. In the logs I can see that a URL is used that doesn't work if I try to open it in VLC. Is there any way to change the URL like with the rtsp setting?
Log:
2022-02-24T08:05:16 2022-02-24 08:05:16 97a4feba2ba6 HikvisionCam[1] INFO Connecting to motion events API
2022-02-24T08:05:19 [tcp @ 0x76bbf560] Connection to tcp://192.167.1.244:554?timeout=15000000 failed: Operation timed out
2022-02-24T08:05:19 rtsp://admin:XXXXXXXX@192.167.1.244:554/Streaming/Channels/401/: Operation timed out
2022-02-24T08:05:19 [tcp @ 0x76b09560] Connection to tcp://192.167.1.244:554?timeout=15000000 failed: Operation timed out
2022-02-24T08:05:19 rtsp://admin:XXXXXXXX@192.167.1.244:554/Streaming/Channels/402/: Operation timed out
2022-02-24T08:05:19 [tcp @ 0x76b4b560] Connection to tcp://192.167.1.244:554?timeout=15000000 failed: Operation timed out
2022-02-24T08:05:19 rtsp://admin:XXXXXXXX@192.167.1.244:554/Streaming/Channels/402/: Operation timed out
2022-02-24T08:05:20 2022-02-24 08:05:20 97a4feba2ba6 HikvisionCam[1] ERROR Motion API request failed, retrying
2022-02-24T08:05:20 2022-02-24 08:05:20 97a4feba2ba6 HikvisionCam[1] INFO Connecting to motion events API
2022-02-24T08:05:20 2022-02-24 08:05:20 97a4feba2ba6 HikvisionCam[1] INFO Processing [NetworkStatus] message
2022-02-24T08:05:20 2022-02-24 08:05:20 97a4feba2ba6 HikvisionCam[1] INFO Processing [GetSystemStats] message
2022-02-24T08:05:22 2022-02-24 08:05:22 97a4feba2ba6 HikvisionCam[1] ERROR Motion API request failed, retrying
2022-02-24T08:05:22 2022-02-24 08:05:22 97a4feba2ba6 HikvisionCam[1] INFO Connecting to motion events API
2022-02-24T08:05:25 2022-02-24 08:05:25 97a4feba2ba6 HikvisionCam[1] ERROR Motion API request failed, retrying
2022-02-24T08:05:25 2022-02-24 08:05:25 97a4feba2ba6 HikvisionCam[1] INFO Connecting to motion events API
2022-02-24T08:05:25 2022-02-24 08:05:25 97a4feba2ba6 HikvisionCam[1] INFO Processing [ChangeVideoSettings] message
I want to use hikvision integration with this command:
unifi-cam-proxy --host 192.168.0.250 -i 192.168.1.10 --cert /client.pem --token *** hikvision -u *** -p ***
Video is not working, screenshots are. It is a DS-2CD2542FWD-IWS Hikvision dome cam.
This is the log output: