UnityPlugin-AVProVideo
UnityPlugin-AVProVideo copied to clipboard
Videos played in a square resolution except the first one
Describe the issue Videos played in a square resolution except the first one
Your Setup: Unity version: 2021.3 AVPro Video version: AVPro Video - Core Edition - 2.9.1 Operating system version: Windows Device model: Windows 11 and Android Video specs (resolution, frame-rate, codec, file size): 16:9
To Reproduce
-
Load a video by url
_mediaPlayer.OpenMedia(MediaPathType.AbsolutePathOrURL, videoURL, autoPlay: false);The video is properly displayed. -
On the same UI, call the _mediaPlayer.OpenMedia function again with the same or another video link again
-
Notice the video is now displayed in square resolution
I tried to call _mediaPlayer.CloseMedia, _mediaPlayer.Stop and _mediaPlayer.Cache.RemoveMediaFromCache before creating another media but I still have this issue.
My functions:
void SetVideo(string videoURL)
{
if (videoURL != "")
{
//Put the url in the video player component
_mediaPlayer.OpenMedia(MediaPathType.AbsolutePathOrURL, videoURL, autoPlay: false);
_mediaPlayer.AudioMuted = true;
//changing the media hints for content loaded via Path
MediaHints hints = _mediaPlayer.FallbackMediaHints;
hints.stereoPacking = StereoPacking.TopBottom;
_mediaPlayer.FallbackMediaHints = hints;
}
}
and later i call:
public void DisplayVideo()
{
gameObject.SetActive(true);
_videoImage.gameObject.SetActive(true);
_mediaPlayer.Play();
_mediaPlayer.AudioMuted = false;
}
Any help would be welcomed, thank you
- Can you reproduce this using a new project and our demo scenes?
- Does this only occur in portrait videos, or landscape too?
- Does it stay square or does it display properly after some time?
- Are you using our Display IMGUI or Display UGUI?
I'll try in the beginning of next week and post here the result for 1 and 2 For the 3rd point, it stays square. For the 4th point, I use uGUI.
Before I already encoutered the same issue when I would call 2 times in the same frame OpenMedia( ), (link: https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1728) but this time I checked and it's only called once
Is that Unity UGUI or our Display UGUI component? https://renderheads.com/content/docs/AVProVideo/articles/component-display-ugui.html
Which settings are you using? What shader are you using?
Could you please send a simple, reproducible project to [email protected]
Could you please send a simple, reproducible project to [email protected]