Reputation: 37
How to get the current video frame while playing video by libvlcsharp? I can play video with libvlcsharp by the codes below:
public void OnAppearing()
{
LibVLC = new LibVLC();
var media = new LibVLCSharp.Shared.Media(LibVLC, new Uri("http://live.cgtn.com/1000/prog_index.m3u8"));
MediaPlayer = new MediaPlayer(LibVLC)
{
Media = media
};
media.Dispose();
Play();
}
private void Play()
{
if (m_url != string.Empty)
{
MediaPlayer.Play(new LibVLCSharp.Shared.Media(LibVLC, new Uri(m_url)));
}
}
Upvotes: 0
Views: 1542
Reputation: 4039
You could use the TakeSnapshot method. However please note:
If you need more frames, have a look at the Thumbnailer samples. They're not meant to grab all frames either.
Upvotes: 0