UnityPlugin-AVProVideo icon indicating copy to clipboard operation
UnityPlugin-AVProVideo copied to clipboard

When using MediaFoundation API to play a HAP video, the video proportion is displayed incorrectly

Open moontains opened this issue 1 year ago • 6 comments

When using MediaFoundation API to play a video, the video proportion is displayed incorrectly

Your Setup (please complete the following information):

  • Unity version: Unity: v2019.4.26f1c1 WindowsEditor

  • AVPro Video version (number and edition (trial/core/ultra/enterprise)): v2.6.6 (plugin v2.6.3f1-ultra)

  • Operating system version: Windows 10 (10.0.22621) 64bit

  • Device model:

  • Video specs (resolution, frame-rate, codec, file size): 128*128 ;25;Hap Alpha mov ;1M

To Reproduce

  1. The same video is played on UGUI, and Scale Mode uses Scale To Fit.
  2. When using DirectShow Api to play, the screen ratio is displayed normally; when using MediaFoundation Api to play, the screen ratio is displayed incorrectly.
  3. In the WindowsMediaPlayer - GetTexturePixelAspectRatio method, the two APIs have different return values, which may be the key to this problem.

moontains avatar Dec 22 '23 01:12 moontains

Can you upgrade to the latest version of AVPro Video and retest please.

Chris-RH avatar Dec 22 '23 08:12 Chris-RH

Any luck?

Chris-RH avatar Jan 02 '24 13:01 Chris-RH

Well, I tested the same video on the latest version and the problem persists. Could there be something wrong with my video?

Any luck?

moontains avatar Jan 03 '24 02:01 moontains

Could you see how it works in Directshow? Could you email the video to [email protected] please

Chris-RH avatar Jan 03 '24 11:01 Chris-RH

Could you see how it works in Directshow? Could you email the video to [email protected] please

Chris-RH avatar Jan 15 '24 09:01 Chris-RH

Testing using: BigBuckBunny-360p30-HAP.mov (640x360, 30FPS, 20Mb/s) Cones-2D-1080p60-HAP.mov (1920x1080, 60 FPS, 300Mb/s)

DirectShow: Correct proportion MediaFoundation + Use HAP/NotchLC enabled: Correct proportion MediaFoundation + Use HAP/NotchLC enabled + Use Custom MOV parser enabled: Incorrect proportion

4kHAP.mov (3840x2160, 60FPS, 263Mb/s)

DirectShow: Correct proportion MediaFoundation + Use HAP/NotchLC enabled: Doesn't play MediaFoundation + Use HAP/NotchLC enabled + Use Custom MOV parser enabled: Incorrect proportion

Hap_Alpha_16384x8640.mov (16384x8640, 24FPS, 1 328 Mb/s)

DirectShow: Correct proportion MediaFoundation + Use HAP/NotchLC enabled: Correct proportion MediaFoundation + Use HAP/NotchLC enabled + Use Custom MOV parser enabled: Incorrect proportion

Chris-RH avatar Jan 19 '24 13:01 Chris-RH

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 17 '24 12:03 stale[bot]

I had a look into why the Custom MOV Parser was returning incorrect video aspects and found it was using a pixel aspect ratio (PAR) of 2 by default, instead of 1.

Fixed for the next release.

RichRH avatar Jun 24 '24 14:06 RichRH

AVPro Video version 3.0.5 has been released. Please let us know if it has not fixed your issue.

Chris-RH avatar Jun 28 '24 11:06 Chris-RH