Bug
In the Video Settings activity, the encoder/resolution dropdown behaves incorrectly for H265-capable cameras (Media2-only H265 detection path):
- Single resolution for H265 — The resolution dropdown shows only one option when H265 is selected, while H264 and JPEG show a full range.
- H265 disappears after switching to H264 — If the user switches the encoder dropdown from H265 → H264 and clicks Apply, the stream correctly switches to H264, but H265 no longer appears in the encoder list on the next load.
Screenshot
(Attach screenshot here — drag Bug-H265.png onto this issue)
The screenshot shows the encoder/resolution combined dropdown (h265 1920x1080 is the only H265 entry, highlighted in blue at the bottom of the list) while H264 entries span multiple resolutions: 1920x1080, 1280x720, 704x576, 640x480, 352x288 — and similarly for JPEG. Title bar confirms app version v2.2.252.15, camera at 192.168.1.190.
Root Cause (preliminary)
H265 support for cameras that only advertise it via ONVIF Media2 (ver20/media/wsdl) was added as an overlay on top of the Media1 path:
effectiveEncoding is overridden to h265 when Media2 reports it, but options (resolution/framerate/bitrate ranges) still comes from GetVideoEncoderConfigurationOptions (Media1). For Media2-only H265 cameras, options.h265 is either null or sparsely populated by the camera, so the resolution list has only one entry.
- When the user applies H264 settings (
isMedia2OnlyH265 = true path), Media1 vec.encoding is written as h264. On the next load(), vec.encoding = h264 and vec.h265 = null, so neither the anyH265 check nor the Media2 override re-detects H265 (the saved config no longer hints at H265). Result: H265 vanishes from the encoder list.
Affected code
odm/odm.ui.activities/VideoSettingsActivity.fs — load() and apply_changes()
odm/odm.ui.views/VideoSettingsView.xaml / view model — encoder dropdown population
Expected behaviour
- H265 should show the full resolution range sourced from Media2 options (not Media1
options.h265).
- Switching back to H264 and applying should not permanently remove H265 from the encoder list — if the camera supports H265 via Media2, it should remain selectable.
Notes
The current implementation detects H265 opportunistically (Media1 vec.h265/vec.any fields + Media2 fallback) but does not properly integrate Media2 encoder options into the VideoSettings UI. A proper fix requires fetching Media2 encoder configuration options (GetVideoEncoderConfigurationOptionsMedia2) and merging them into the model when the camera supports Media2.
Bug
In the Video Settings activity, the encoder/resolution dropdown behaves incorrectly for H265-capable cameras (Media2-only H265 detection path):
Screenshot
The screenshot shows the encoder/resolution combined dropdown (
h265 1920x1080is the only H265 entry, highlighted in blue at the bottom of the list) while H264 entries span multiple resolutions: 1920x1080, 1280x720, 704x576, 640x480, 352x288 — and similarly for JPEG. Title bar confirms app version v2.2.252.15, camera at 192.168.1.190.Root Cause (preliminary)
H265 support for cameras that only advertise it via ONVIF Media2 (
ver20/media/wsdl) was added as an overlay on top of the Media1 path:effectiveEncodingis overridden toh265when Media2 reports it, butoptions(resolution/framerate/bitrate ranges) still comes fromGetVideoEncoderConfigurationOptions(Media1). For Media2-only H265 cameras,options.h265is either null or sparsely populated by the camera, so the resolution list has only one entry.isMedia2OnlyH265 = truepath), Media1vec.encodingis written ash264. On the nextload(),vec.encoding = h264andvec.h265 = null, so neither theanyH265check nor the Media2 override re-detects H265 (the saved config no longer hints at H265). Result: H265 vanishes from the encoder list.Affected code
odm/odm.ui.activities/VideoSettingsActivity.fs—load()andapply_changes()odm/odm.ui.views/VideoSettingsView.xaml/ view model — encoder dropdown populationExpected behaviour
options.h265).Notes
The current implementation detects H265 opportunistically (Media1
vec.h265/vec.anyfields + Media2 fallback) but does not properly integrate Media2 encoder options into the VideoSettings UI. A proper fix requires fetching Media2 encoder configuration options (GetVideoEncoderConfigurationOptionsMedia2) and merging them into the model when the camera supports Media2.