By the wiki for Pixel Aspect Ratio:
DAR = SAR x PAR
(Display Aspect Ratio, Storage Aspect Ratio, Pixel Aspect Ratio)
I have a wmv video with 2048x1080(256:135) resolution. Window Media Player (WMP) can extract the PAR, 15:16, so that WMP can render this clip as 16:9(= 256:135 * 15:16).
Currently I can only get dwPictAspectRatioX/dwPictAspectRatioY from VIDEOINFOHEADER2 as 256/135. This value looks like a SAR by the resolution or the DAR ignore the PAR.
How can I get the PAR information from DShow graph?
p.s
I'm using [ASF Reader]-[DMO]-[VMR7] as filter components in Graph.
PotPlayer cannot read the PAR either, so that it renders this clip with aspect ratio 256:135 instead of 16:9.
Updated,
I found out that ASF_Reader_Filter::IWMHeaderInfo::GetAttributeByName::Atrributes.
There is a attribute AspectRatio X (Y) with the following meaning:
The AspectRatioX attribute contains the width component of the pixel aspect ratio for a video stream.
I am trying to queryInterface or queryService via IServiceProvider from ASF reader filter, but it always return E_NOINTERFACE.
Still need more investigation.
VIDEOINFOHEADER2::dwPictAspectRatiogets you ratio, which is adjustment for non-square pixels in the encoded image. That is, if you enforcedwPictAspectRatiowhen you present video and you assume that monitor itself has square pixels, you get proper physical aspect ratio.biWidth,biHeight,rcSourcehave pixel dimension values (720x576) - SARdwPictAspectRatioinstructs to show 4:3 - DAR