I am trying to get the HLS stream working on my Hikvision camera. I configured ffmpeg in the IP camera binding, but the stream doesn’t seem to work. I don’t know exactly what is going wrong, but if try it at a command prompt then it does work in VLC.
The debug log shows the following:
2021-12-05 12:38:44.951 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.m3u8, received from 192.168.178.69
2021-12-05 12:38:44.953 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:-hide_banner -loglevel warning -rtsp_transport tcp -i rtsp://admin:********@192.168.178.65:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy -hls_flags delete_segments -hls_time 2 -hls_list_size 4 c:\ffmpegout\ipcamera.m3u8
2021-12-05 12:38:44.958 [WARN ] [hab.binding.ipcamera.internal.Ffmpeg] - An error occured trying to process the messages from FFmpeg.
I don’t see any files being created in the output folder. When I use ffmpeg with the following settings then the files are being created and I can view them with vlc:
ffmpeg -hide_banner -loglevel warning -rtsp_transport tcp -i rtsp://admin:password@192.168.178.65:554/Streaming/Channels/101 -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy -hls_flags delete_segments -hls_time 2 -hls_list_size 4 c:\ffmpegout\ipcamera.m3u8
The changes I made are little, I removed the part below from the original URL.
?transportmode=unicast&profile=Profile_1
On the command prompt I get some warning messages, maybe they are related?
[rtsp @ 0000025487f8c3c0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[hls @ 000002548864da40] Non-monotonous DTS in output stream 0:0; previous: 0, current: -22500; changing to 1. This may result in incorrect timestamps in the output file.
[hls @ 000002548864da40] Non-monotonous DTS in output stream 0:0; previous: 1, current: -18000; changing to 2. This may result in incorrect timestamps in the output file.
[hls @ 000002548864da40] Non-monotonous DTS in output stream 0:0; previous: 2, current: -13500; changing to 3. This may result in incorrect timestamps in the output file.
[hls @ 000002548864da40] Non-monotonous DTS in output stream 0:0; previous: 3, current: -9000; changing to 4. This may result in incorrect timestamps in the output file.
[hls @ 000002548864da40] Non-monotonous DTS in output stream 0:0; previous: 4, current: -4500; changing to 5. This may result in incorrect timestamps in the output file.
[hls @ 000002548864da40] Non-monotonous DTS in output stream 0:0; previous: 5, current: 0; changing to 6. This may result in incorrect timestamps in the output file.
I am running everything on Windows 10, all on the same machine.