Meta.Vlc
Meta.Vlc copied to clipboard
Can I get video Information (e.g. duration, width/height) without call Play()?
Hi there, Can I get video Information (e.g. duration, width/height) without call Play()? just load headers?
VlcPlayer player; ... player.LoadMedia("http://example.com/test.mp4"); // player.Play(); // I don't want to play the video, keep stopped TimeSpan ts = player.VlcMediaPlayer.Media.Duration; // now get ts is 0:00:00
so, Is it possible via Meta.Vlc? thanks
我还是用中文吧,player.VlcMediaPlayer.VideoSize能获取视频大小,至于比例嘛,实例里面已经很明显了,就是player.AspectRatio, 可以通过枚举来设置为16:9或4:3
Wire up the ParseChanged event and call vlc.VlcMediaPlayer.Media.ParseAsync();
In the event handler, the media is the sender. Just cast it, and you can get some info.