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

Pixel Aspect Ratio not respected when using Media Foundation

Open v2k opened this issue 2 years ago • 10 comments

Videos appear squished with wrong aspect ratio

Setup

  • Unity version: 2019.4.40f1
  • 2.5.0f1-ultra
  • Operating system version: Win 10/11

To Reproduce

  1. Try to play video in Media Player component
  2. Notice aspect ratio is wrong. (width is wrong)

Screenshots image

Squished: image

Videos emailed

v2k avatar Jul 21 '22 18:07 v2k

Email received, we'll check it out, thank you.

Chris-RH avatar Jul 21 '22 18:07 Chris-RH

We have fixed this and the fix will be in the next release.

We're still using the unscaled texture (960x720) but during display using the DisplayUGUI, DisplayIMGUI or ResolveToTexture methods we are rendering the content stretched to the correct DAR (display aspect ratio)

Thanks,

AndrewRH avatar Jul 22 '22 13:07 AndrewRH

Awesome! We will verify in the next release

v2k avatar Jul 25 '22 16:07 v2k

The latest update has just been released. Please let us know if the problem is not fixed :)

Chris-RH avatar Jul 28 '22 16:07 Chris-RH

Thanks for the update, it's fixed for direct show.

But it's not fixed for media foundation, using hap on, when using a hap clip image

drinsley avatar Jul 29 '22 20:07 drinsley

Could you send us a copy of this file you are using please?

Chris-RH avatar Aug 01 '22 09:08 Chris-RH

You can generally take any clip and just run ffmpeg:

ffmpeg -i video.mpg -c:v hap video_hap.mov

v2k avatar Aug 02 '22 16:08 v2k

emailed with a link to the original and hap versions

drinsley avatar Aug 02 '22 18:08 drinsley

Thanks, we've received them, much appreciated :) Its always handy to work with exactly the file that you are having problems with :)

Chris-RH avatar Aug 02 '22 18:08 Chris-RH

A fix has been comitted for the Media Foundation path and will be in the next release.

Cheers,

RichRH avatar Aug 04 '22 17:08 RichRH

This has hopefully been fixed now with the release of version 2.6.0.

Chris-RH avatar Aug 24 '22 12:08 Chris-RH

Thanks it is fixed with the new update

drinsley avatar Aug 31 '22 20:08 drinsley