What port should I use for ONVIF?
Because the ONVIF protocol uses HTTP, the RTSP port and ONVIF port cannot be the same.
The ports numbers depend on the camera manufacturer, go to the network setting panel of the camera and write down the RTSP port (used for rtsp://… URLs), the HTTP port and eventually ONVIF port if different from HTTP (used for onvif://… URLs
Usually, by default the RTSP port is usually 554, the HTTP/ONVIF port is 80, and the HTTPS/ONVIF port is 443.
(Although some brands of cameras use the same HTTP port for administration and ONVIF, other brands may use a different port for ONVIF and HTTP administration).
The ONVIF connection can be established through HTTP or HTTPS (depending on the camera settings/capabilities):
onvif://192.168.1.20 corresponds to HTTP, therefore if not specified, the port 80 is used by default
onvifs:// 192.168.1.20 corresponds to HTTPS, therefore if not specified, the port 443 is used by default