Closed jtorjo closed 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.
The GPU in this WPF control can only be used to DECODE frames. Meaning, the encoded packets get to the GPU, the GPU puts them together and stores an image internally, and that image is then converted to a WPF-compatible bitmap. If you want to enable GPU decoding please look at the sample project (MainWindow.MediaEvents.cs
) and search for the following comment: // Hardware device selection
. Please keep in mind this creates-round trips i.e. CPU->GPU->CPU and so on. The reason why the image cannot be shown directly off of the GPU is because of how Windows does window composition. Displaying images straight from the GPU would cause the control to lose layout, transparency, etc. capabilities.
Thanks, will look into it
Question: How to enable GPU for decoding (when not shown on screen)
I want to use ffmpeg to capture frames, and save them to disk. I did a small test, and it's not using the GPU.
Issue Categories
Steps to Reproduce
The above is a simple test (ignore the fact that I'm not really using the returned bitmap). I've looked at the settings for MediaElement, but I don't really see anything that would allow this.