unosquare / ffmediaelement

FFME: The Advanced WPF MediaElement (based on FFmpeg)
https://unosquare.github.io/ffmediaelement/
Other
1.17k stars 240 forks source link

Video stuck at first frame at device equip with intel (Gen11) iris xe graphic card #531

Open hengway opened 3 years ago

hengway commented 3 years ago

Video stcuk at first frame at device equal with intel (Gen11) iris xe graphic card

Please enter a general description for the issue. Delete sections that are not relevant and provide additional sections if necessary.

Issue Categories

Version Information

Steps to Reproduce

  1. Open the Unosquare.FFME.Windows.Sample in pc with using iris xe graphic card
  2. Add a video to the program (video link: https://player.vimeo.com/external/482608362.hd.mp4?s=44c18f5f21bd522f64cd9d438144931843480614&profile_id=174)
  3. Video stcuk at first frame, and sound play as usual
  4. triel same program and video in other pc, can play as usual

Expected Results

  1. Video should be able to play without issue

Sample Code

Unosquare.FFME.Windows.Sample

Command line ffplay

ffplay "https://player.vimeo.com/external/482608362.hd.mp4?s=44c18f5f21bd522f64cd9d438144931843480614&profile_id=174"

When play using ffplay command, CAN play as usual, issue happen when using windows.sample project
mariodivece commented 3 years ago

I tested your scenario (minus the XE card) and the video played fine on my GTX 1060 - HW accel on are off both played fine. Could you try on a different computer that is not using the XE card?

hengway commented 3 years ago

Hi, thank you for the reply and test out. From my side of testing, so far no issue on the graphic card we have except the XE graphic which come with intel latest gen 11 CPU. And my side just having 1 unit of pc equip with this CPU, so not sure is individual case or apply to all XE graphic card.

Suspect is the presentation layer in .net not been support by the graphic, because when use ffplay command to play no issue, and when the video playing in ffme, the graphic card usage also increase.

hengway commented 3 years ago

@mariodivece We just purchase a laptop with intel gen 11 gpu, and now can reproduce the issue, and my team found a solution to fix the issue from : https://github.com/cefsharp/CefSharp/issues/3280

Added below code to force WPF render by software only protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); HwndSource source = PresentationSource.FromVisual(this) as HwndSource; if (source != null) source.CompositionTarget.RenderMode = RenderMode.SoftwareOnly; }

After we put in this code, then the video will playing as usual, and when the video playing the GPU 3D process usage will still rise, mean GPU still involve on the video processing part (maybe is from ffmpeg).

Just an update, so anyone face same issue can temporary fix by this solution first.

stale[bot] commented 3 years ago

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] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.