I´ve got run into a very strange problem with my Dahua cam… For some reason I can no longer get it to work with HLS streaming. The stream is no beeing created at all. And I have no idea why.
HLS stream work fine for my Reolink…
What I did:
I dumped my original setup on my Rpi4, cause it was a test setup running on SD. I wanted it to run from a SSD with the official firmware release for the Rpi4 to boot from USB.
I made a fresh openhabian install directly from SSD. Unfortunaly I forgot to create a copy of my things files, for both my Dahua and Reolink cam. So I had to start all over… No problem, I would say just takes a few minutes more…
Now I have struggled with my Dahua cam for days, and I simply cant get it to create the HLS stream at all… The setup is simular to the Reolink setup, except for the username/pw and ofcouse serverport, but still HLS wont work. FFMPEG I would say work fine, since it works from my Reolink cam. I even tried using the output path for the reolink, in case its a security issue… Still no go.
GIF snapshot works fine. JPG streaming work fine. Motion detection switch work fine. Everything seems to run just fine, except HLS streaming. I simply dont get it
Atm I use the very latest ipcamera binding (installed yesterday).
Any suggestion on how to troubleshoot this one?
EDIT:
Just enabled Debug logging… This is what happens:
2020-07-27 19:38:39.321 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:/usr/bin/ffmpeg -hide_banner -loglevel warning -rtsp_transport tcp -i rtsp://admin:password@10.4.28.194:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy -hls_flags delete_segments -hls_time 2 -hls_list_size 4 /etc/openhab2/html/camera/dahua1/ipcamera.m3u8
2020-07-27 19:38:39.716 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://10.4.28.194/cgi-bin/snapshot.cgi?channel=1
2020-07-27 19:38:39.757 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://10.4.28.194/cgi-bin/snapshot.cgi?channel=1
2020-07-27 19:38:39.757 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [rtsp @ 0x17f8370] method OPTIONS failed: 404 Not Found
2020-07-27 19:38:39.758 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - rtsp://admin:password@10.4.28.194:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif: Server returned 404 Not Found
This is my setup thing file:
Thing ipcamera:DAHUA:DAHUA1 "Front door" @ "Cameras"
[
IPADDRESS="10.4.28.194",
USERNAME="admin",
PASSWORD="password",
PORT=80,
ONVIF_PORT=80,
SERVER_PORT=54318,
IMAGE_UPDATE_EVENTS=1,
UPDATE_IMAGE=false,
GIF_PREROLL=1,
GIF_POSTROLL=5,
IP_WHITELIST="DISABLE",
ONVIF_MEDIA_PROFILE=1,
FFMPEG_LOCATION="/usr/bin/ffmpeg",
FFMPEG_GIF_OUT_ARGUMENTS="-r 2 -filter_complex scale=-2:360:flags=lanczos,setpts=0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse",
FFMPEG_OUTPUT="/etc/openhab2/html/camera/dahua1/",
FFMPEG_HLS_OUT_ARGUMENTS="-strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy -hls_flags delete_segments -hls_time 2 -hls_list_size 4"
]