Is G.711 codec a must for a device to work with the ONVIF driver?

ONVIF Specification requires a compliant device to support G.711.

ONVIF Profile S, Media1 service – see https://www.onvif.org/specs/srv/media/ONVIF-Media-Service-Spec-v1706.pdf

Section 5.1

“In order to ensure interoperability between client and device, this standard mandates the following codec profiles:

• An ONVIF compliant device shall support G.711μ Law (Simplex-Camera Microphone Only, 1ch) [ITU-T G.711] if the device supports audio.”

However, the ONVIF driver is not strict on these requirements and can work with devices not supporting G.711.