RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
233 stars 28 forks source link

When using AVproVideo2.7.3 on windows 10, frequent dragging (repeated dragging) of the video progress will cause stuck problems #1506

Closed dabengying closed 1 year ago

dabengying commented 1 year ago

Describe the issue When using AVproVideo2.7.3 on windows 10, frequent dragging (repeated dragging) of the video progress will cause stuck problems。

Your Setup (please complete the following information):

To Reproduce

  1. When using AVproVideo2.7.3 on windows 10, frequent dragging (repeated dragging) of the video progress will cause stuck problems. use AVproVideo2.7.3 demo also have same problem.

Logs 2023_3_28(1).log

Screenshots img_v2_53cd3fba-2f77-4c92-97c0-4beb5538859g

help!!! img_v2_e56d918c-512f-48ae-9690-cc03b82a27eg

Chris-RH commented 1 year ago

I've opened a new project in 2021.3.21 and AVPro Video 2.7.3. Using the mediaplayer demo scene I have tried various lengths of local and streamed videos. I have dragged the seek bar up and down repeatedly, I have also clicked up and down it. I haven't had a crash yet. Is there something else I should be doing?

dabengying commented 1 year ago

Hello, I suspect that the issue occurred only on Windows 10. I tried the same operation multiple times on Windows 7 and Windows 11, but there was no problem. However, on the Windows 10 version of the system, I encountered the same issue on two test devices. Can you check it on Windowns 10?

I provide a list of device tests, including Win10, Win7, and Win11, but only Win10 will have issues. And testing demo apps, error logs, and operation videos. Thank you for helping me check this bug again, Especially for Win10

Demo App: [redacted]

Bug recurrence operation video 1: https://curriculum-us.wntss.com/u3d/download/error-1.mp4

Bug recurrence operation video 2: https://curriculum-us.wntss.com/u3d/download/error-2.mp4

devicesList AVProVideoErrorLog.zip

Chris-RH commented 1 year ago

Hi, I'm using Windows 10 (Home - 22H2) and I still can't reproduce this (not with your file either). I dragged the seek bar for 2 minutes and didn't get any crash. I have tested this several times.

What version are you using?

dabengying commented 1 year ago

Thank you for your help!

We tested on four Win10 version systems and found that not all Win10 version systems will have issues. The problematic versions are: the home version is Win10 2004, and the enterprise version is Win10 21H2。

11

22

Chris-RH commented 1 year ago

Have you tested both d3d11 and d3d12?

dabengying commented 1 year ago

Is it to check if the problem device has d3d11 and d3d12 installed? Look at the running log, it should support d3d11, I can try to manually upgrade the d3d11 library later

Initialize engine version: 2021.3.10f1c1 (fad0948fb939) [Subsystems] Discovering subsystems at path GfxDevice: creating device client; threaded=1; jobified=1 Direct3D: Version: Direct3D 11.0 [level 11.1] Renderer: Intel(R) Iris(R) Xe Graphics (ID=0x9a49) Vendor: Intel VRAM: 3987 MB Driver: 30.0.101.1960

Initializing input. [AVProVideo] Initialising AVPro Video v2.7.3 (native plugin v2.7.0f1-core) on Intel(R) Iris(R) Xe Graphics/Direct3D 11.0 [level 11.1] (MT False) on WindowsPlayer
Chris-RH commented 1 year ago

Could you change it to d3d12 and see if you get the same result please :)

dabengying commented 1 year ago

I have created a new package using d3d12, and the device that previously had problems running the package using d3d12 is currently working fine. image

However, there are currently issues with using the default automatic (d3d11) Considering device compatibility issues, d3d11 should be the most stable version, and I still hope to use d3d11 as the default Direct3D version. Please help check the issue. Thank you.

GfxDevice: creating device client; threaded=1; jobified=1 d3d12: loaded! Direct3D: Version: Direct3D 12 [level 12.1] Renderer: Intel(R) Iris(R) Xe Graphics (ID=0x9a49) Vendor: Intel VRAM: 3987 MB App VRAM Budget: 3588 MB Driver: 30.0.101.1960 Unified Memory Architecture Cache Coherent UMA

Chris-RH commented 1 year ago

OK, that's great thank you, that's useful to know

dabengying commented 1 year ago

Hello, will this issue be resolved in the near future? Thanks

Chris-RH commented 1 year ago

We are a very small team, but it is on our TO DO list.

dabengying commented 1 year ago

Got it, thanks

dabengying commented 1 year ago

AVPro Video v2.8.0 - 26 May 2023 Hello, is this problem fixed in the latest version? I see that the release record seems to have not been modified, right?

Chris-RH commented 1 year ago

Not yet.

songgravel commented 1 year ago

I have the same issue on Windows11 when using MediaFoundation as Video API. Switching to DirectShow or Win RT can solve my problem.

RichRH commented 1 year ago

Hi @dabengying / @songgravel,

Thanks for your patience and reporting this issue - it's proving tricky to replicate, mainly I think due to specific Windows version/hardware combinations.

But, I can tell you we've been working on fixing some render synchronisation issues between native code and Unity which will hopefully help, and should make it into the next version (I'd estimate within a week or two).

A few observations that may help further guide us:

  1. It seems to only be in issue with MediaFoundation and D3D11 - @dabengying, is that correct for you? (I.e. have you tried DirectShow/Win RT?)
  2. With MediaFoundation, have you tried un-ticking 'Hardware Decoding' and does that make a difference?
  3. @dabengying, I notice in your attached log 'MT False' which is unusual for Windows (would expect 'MT True') - are you explicitly setting any command-line flags such as '-force-gfx-st'? And have you tried '-force-gfx-mt'?

Cheers,

archain commented 1 year ago

Hi, MorrisRH, I notice that you've marked this issue to 'Fixed', will it be released soon?

Ste-RH commented 1 year ago

@archain This should be fixed in the last release (v2.8.1). Do let us know so we can close this issue accordingly.

dabengying commented 1 year ago

Hi Ste-RH,May I ask when the new version(v2.8.1) will be released?

Ste-RH commented 1 year ago

It has already been released @dabengying

https://github.com/RenderHeads/UnityPlugin-AVProVideo/releases

archain commented 1 year ago

@Ste-RH Ok, we will check it right now and give you a feedback later

archain commented 1 year ago

@Ste-RH Unfortunely, it still cause stuck problem on Windows7, The main information is as follows:

2023-07-06T09:43:54: [AVProVideo] Initialising AVPro Video v2.8.1 (native plugin v2.8.0f1-trial) on Intel(R) HD Graphics/Direct3D 11.0 [level 11.0] (MT False) on WindowsPlayer 2023-07-06T09:43:54: [AVProVideo] Opening [url] (offset 0) with API MediaFoundation 2023-07-06T09:43:55: [AVProVideo] Using playback path: DirectShow (848x478@30.00)

On this machine, even if I do not use hardward decoding, the playback is always DirectShow

I click the progress bar back and forward about 10 minutes, it stuck again!

Chris-RH commented 1 year ago

Sorry, there has been some confusion. The fix is in the next version, which has not been released yet. Unfortunately we don't have a Windows 7 machine to test on. I don't believe they are supported at all by Microsoft anymore.

archain commented 1 year ago

@Chris-RH It seems Windows7 will fallback to DirectShow? MediaFoundation is not supported on windows7? And DirectShow will cause this issue.

By saying "Fixed", it means you fixed issue on windows10, right? I just want to know! thanks!

archain commented 1 year ago

@Chris-RH I've found that when I use 'DirectShow' on windows 10, or "DirectShow" on windows7, GetSeekableTimes always return min=0,max=0, is this mean that I can not do seek under "DirectShow" I've tested on windows7(2GB memory), when I play a remote video, when I seek forward and back, it will cause the app to freeze. and on windows10, it will take a lot of time to recover.

So is it "DirectShow" implementation's bug?

Ste-RH commented 1 year ago

We are hoping to release v2.8.2 later today. This has some improvements in that might help address the original issue. But as we have been unable to reproduce the issue here, we cannot say 100% whether it will be fixed.

archain commented 1 year ago

@Ste-RH OK!Thanks a lot!

Chris-RH commented 1 year ago

AVPro Video version 2.8.2 has been released. Please let us know if this is still an issue.

archain commented 1 year ago

@Chris-RH I can reproduct the issue by using windows 10, and I use your demo scene "Demo_MediaPlayer" 1、Open scene "Demo_MediaPlayer" 2、Select "MediaPlayer" at Hierarchy panel 3、On the right Inspector, change Media Source to "Path" 4、Copy url "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" to the "Absolute Path Or URL" 5、Choose render api to "DirectShow" 6、Run unity 3d and do seek operation of the video player, it will freeze the unity3d editor

Why I'm using "DirectShow" on windows 10, it is because we use windows 7, and it will fallback to "DirectShow", the same result will be caused.

Chris-RH commented 1 year ago

So is it still not fixed using AVPro video version 2.8.2 in Windows 10?

archain commented 1 year ago

Using "DirectShow" api and play online video source, seek causes freeze, which can be reproduced I've tried it by using your demo scene

Chris-RH commented 1 year ago

@dabengying is it working for you?

dabengying commented 1 year ago

@Chris-RH It doesn't work. Soft decoding may get stuck on Win7, but the problem was resolved on previous Win10

RichRH commented 1 year ago

Hi @archain,

Thanks for providing these steps - I believe I have managed to reproduce this issue and possibly found a cause. It seems to be a combination of DirectShow, LAV filters (even latest) and your remote/URL MP4 source.

I'm looking into a possible fix (with your video the MS File Source (URL) filter seems to be favoured over the LAV Splitter Source, which aren't very compatible) but my assumptions currently are:

Cheers,

archain commented 1 year ago

Great! @RichRH 1、I do not set LAV filters(At least I have not set it on the inspector or in the script) 2、yes,when use local file, there is no problem

RichRH commented 1 year ago

Hi @archain,

Thanks for your feedback - after some more investigation I've managed to reproduce the issue without LAV filters being used. This must mean it's using the included GDCL demuxer as for DirectShow MP4 playback a 3rd party splitter has to be used.

It does appear to be the same issue though; MS File Source (URL) filter, your remote/URL MP4 source and a 3rd party demuxer - I'm looking into a fix but a few supplementary notes:

Cheers,

Chris-RH commented 1 year ago

AVPro version 2.8.3 has been released. Please let us know if this has not fixed your issue.

archain commented 1 year ago

@Chris-RH Yes, It is solved on windows 10 but on windows 7, there's no graphic, only stall image can be seen, it is not freeze any more

Chris-RH commented 1 year ago

One the issues that we are having with this is that we don't have any machines that have Windows 7 and it is no longer supported by Microsoft.

Chris-RH commented 1 year ago

We've managed to install Win7 and aren't seeing these issues. What hardware are you using? It is most likely to be the cause.

Please also note:

unity_windows7_720