You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
moq-mux H.265 importer puts the VUI sample aspect ratio in the catalog's displayAspectWidth/Height (1:1 SAR shows 16:9 video as square) #6536
VuiData::new fills those values from sar_width/sar_height, or from the
predefined aspect_ratio_idc table (Square → 1:1). That is the sample
(pixel) aspect ratio. The catalog field is documented as the display aspect
ratio (rs/hang/src/catalog/video/mod.rs). @moq/watch passes it to WebCodecs as displayAspectWidth/displayAspectHeight.
Result
A standard 1280×720 HEVC stream that explicitly signals square pixels
(aspect_ratio_idc = 1) ends up in the catalog as displayAspectWidth: 1, displayAspectHeight: 1. The player then shows it as a square: 16:9 content is
squeezed horizontally. Any non-square SAR (e.g. 16:11, 40:33) is also misread as
a display ratio.
The H.264 path skips the SAR, so it is not affected.
Expected
Either:
compute the display aspect from the SAR and the (cropped) picture size, width × sar_w : height × sar_h (1280×720 with SAR 1:1 gives 16:9); or
leave the field unset when the SAR is 1:1 or unspecified, so players use the
coded size.
Reproduce
Publish any HEVC stream whose SPS VUI has aspect_ratio_info_present_flag = 1
with aspect_ratio_idc = 1 through the libmoq H.265 importer. The catalog then
shows displayAspectWidth/Height = 1/1, and @moq/watch renders the video square.
Our workaround: our encoder no longer signals aspect information for square pixels,
so the field stays absent and players use the coded size.
Thanks for the detailed report. This is fixed on main by #5574 (the H.265 importer now derives the display aspect from SAR and the cropped size, and leaves it unset for square pixels), but that never reached the release line libmoq 0.6.x ships from. Decision: backport #5574 to release rather than wait for the next cut.
Planned in #6580 as quest/m0/h265-aspect-backport.md.
Activity
kixelated commentedon Oct 23, 2026
Thanks for the detailed report. This is fixed on
mainby #5574 (the H.265 importer now derives the display aspect from SAR and the cropped size, and leaves it unset for square pixels), but that never reached thereleaseline libmoq 0.6.x ships from. Decision: backport #5574 toreleaserather than wait for the next cut.Planned in #6580 as
quest/m0/h265-aspect-backport.md.(Written by Claude Opus 5.5)