I have been experimenting with RTSP/HTTP IP Camera and seem to have the camera online, but none of the links that are generated work and there is no image in the Image item.
I can’t help with this specific device, but I do know that the Image Item will only be populated when the Switch Item linked to the Poll Image Channel is ON.
Anyone else know what I should be doing differently?
The only info I know is:
RTSP link that works in VLC RTSP://admin:xxxxx@10.0.0.217:554/onvif1
username admin
password xxxxx
I am guessing to use port 554 for Port for HTTP, inferred from the working RTSP link.
I am using a random port number for Server Port. Is this right?
I am using the link that works in VLC for FFmpeg Input.
Everything else is default.
In my logs I get:
2021-06-11 17:12:06.178 [DEBUG] [era.internal.handler.IpCameraHandler] - File server for camera at 10.0.0.217 has started on port 45230 for all NIC's.
2021-06-11 17:12:10.184 [DEBUG] [era.internal.handler.IpCameraHandler] - Binding has no snapshot url. Will use your CPU and FFmpeg to create snapshots from the cameras RTSP.
2021-06-11 17:12:10.185 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:-rtsp_transport tcp -threads 1 -skip_frame nokey -hide_banner -loglevel warning -i RTSP://admin:********@10.0.0.217/onvif1 -an -vsync vfr -q:v 2 -update 1 http://127.0.0.1:2100/snapshot.jpg
2021-06-11 17:12:10.450 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - RTSP://admin:xxxxx@10.0.0.217/onvif1: Protocol not found
2021-06-11 17:12:10.451 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Did you mean file:RTSP://admin:xxxxx@10.0.0.217/onvif1?
What happens if you enter this -rtsp_transport udp
into the FFmpeg Input Options config?
If your camera does not have a snapshot URL then it does not matter what you set it to if the cameras stays ONLINE.
correct. Looking at your logs I can see something interesting which may be a bug. It says the port is serving on 45230 and then in the ffmpeg output it shows it will be using 2100 when these two numbers should match. Any ideas why they don’t match, steps to reproduce that?
The line that is repeating is the binding checking the camera is still online.
I’m seeing a few things in the logs that don’t look right.
When I click the widget and start the mjpeg stream I get:
2021-06-13 16:53:40.711 [DEBUG] [pcamera.internal.StreamServerHandler] - Stream Server recieved request GET:/ipcamera.jpg
2021-06-13 16:53:45.234 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://10.0.0.217:554
2021-06-13 16:53:47.901 [DEBUG] [pcamera.internal.StreamServerHandler] - Stream Server recieved request GET:/ipcamera.mjpeg
2021-06-13 16:53:47.903 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:-rtsp_transport udp -hide_banner -loglevel warning -i rtsp://admin:********@10.0.0.217/onvif1 -q:v 5 -r 2 -vf scale=320:-2 -update 1 http://127.0.0.1:45230/ipcamera.jpg
2021-06-13 16:53:48.703 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 0x8f5630] PPS id out of range: 0
2021-06-13 16:53:48.705 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Last message repeated 1 times
2021-06-13 16:53:48.706 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 0x8f5630] Error parsing NAL unit #0.
2021-06-13 16:53:48.707 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 0x8f5630] PPS id out of range: 0
2021-06-13 16:53:48.708 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Last message repeated 1 times
2021-06-13 16:53:48.709 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 0x8f5630] Error parsing NAL unit #0.
2021-06-13 16:53:48.780 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 0x8f5630] PPS id out of range: 0
2021-06-13 16:53:48.782 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Last message repeated 1 times
2021-06-13 16:53:48.783 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 0x8f5630] Error parsing NAL unit #0.
2021-06-13 16:53:48.862 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 0x8f5630] PPS id out of range: 0
2021-06-13 16:53:48.864 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Last message repeated 1 times
2021-06-13 16:53:48.865 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 0x8f5630] Error parsing NAL unit #0.
2021-06-13 16:53:50.683 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Guessed Channel Layout for Input Stream #0.1 : mono
2021-06-13 16:53:50.713 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 0x965780] Could not find ref with POC 70
2021-06-13 16:53:50.802 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [swscaler @ 0xece230] deprecated pixel format used, make sure you did set range correctly
2021-06-13 16:53:51.391 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [rtsp @ 0x8f2260] max delay reached. need to consume packet
2021-06-13 16:53:51.392 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [rtsp @ 0x8f2260] RTP: missed 10 packets
2021-06-13 16:53:51.416 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [rtsp @ 0x8f2260] max delay reached. need to consume packet
2021-06-13 16:53:51.418 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [rtsp @ 0x8f2260] RTP: missed 2 packets
2021-06-13 16:53:55.233 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://10.0.0.217:554
Then it seems to work for a while. Then I get
2021-06-13 16:55:54.784 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - More than 1000 frames duplicated
and the feed stops. When I reload the p[age I can view it again.
I’m also seeing:
2021-06-13 17:10:15.614 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [swscaler @ 0x23e7220] deprecated pixel format used, make sure you did set range correctly
Your camera did not support TCP, so if you see patchy video maybe partly missing picture or the odd green square show up, that will be normal for UDP.
Yes the binding disables that by default as it is not a good idea to do that unless you need a picture that stays on the last motion seen. Use the widgets and the snapshot or mjpeg streams to show a picture. If your only doing a single camera it is not too much of an issue.
If the output comes from FFmpeg, use google to search for the message. There are tons of information out on the problems that can crop up with ffmpeg.
My guess is the camera can not handle more than 1 or two open RTSP streams at the same time. The binding will have one open to create snapshots from. Another open if your watching a mjpeg stream, note that the ‘snapshots.mjpeg’ stream will not open a RTSP stream as it will use the source that is creating the snapshots from.
A http 500 error means the cameras server has crashed or hit an unknown error.
Also your camera is sending “hevc” also known as h265. Whilst HLS can use this, it is far more compatible to use h.264 which most cameras allow you to change between those two formats.