unosquare / ffmediaelement

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

After what event will CaptureBitmapAsync not return null? #427

Closed zamirkhan closed 5 years ago

zamirkhan commented 5 years ago

After loading a video, I want to convert the first frame (and subsequent frames, if traversed) to a Bitmap and do some processing. I am able to capture subsequent frames by calling CaptureBitmapAsync after the PositionChanged event. However, I have so far been unable to find an event that occurs right after the video has been loaded where CaptureBitmapAsync does not return null. I've tried MediaReady, VideoFrameDecoded, and more. What am I missing? Thanks in advance.

mariodivece commented 5 years ago

The sample app code uses the Rendering video event to capture the bitmap, paint an audio level chart and display it. Is that not working you? As far as the first frame goes, you can simply count how many times the renderingvideo event gets called.

mariodivece commented 5 years ago

Closing, since no further feedback was provided.