I can get video stream and save it as m38u with ffmpeg:
VIDSOURCE="rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=0"
AUDIO_OPTS="-c:a aac -b:a 160000 -ac 2"
VIDEO_OPTS="-s 854*480 -c:v libx264 -b:v 800000"
OUTPUT_HLS="-hls_time 10 -hls_list_size 10 -start_number 1"
ffmpeg -i "$VIDSOURCE" -y $AUDIO_OPTS $VIDEO_OPTS $OUTPUT_HLS /tmp/mystream.m3u8
Now add it to homeassistant:
vim configuration.yaml
camera:
- platform: ffmpeg
name: dahua
input: -rtsp_transport tcp -i rtsp://admin:password@http://192.168.31.97/cam/realmonitor?channel=1&subtype=0
Reboot hass
and
How can get the id for my dahua camera and add it ,so can watch the video on homeassistant ?