Closed jerotire closed 8 years ago
No idea with it, if you use VLC to watch it, the time and FPS may be 0 too....
Hey thanks for the response.
I can confirm that is NOT the case when using VLC Media Player (except for the Time - I can solve that with a Stopwatch instance or something client side). I can confirm that it works using Vlc.DotNet.
Here is a screenshot demonstrating information available (which I wish I could access too):
If not already implemented, could you implement some if this data shown in the screenshots? For instance, a Codec property and Statistics property?
Ummm, yes, you can get those information with VlcPlayer.VlcMediaPlayer.Media.GetTracks(); the FrameRateNum and FrameRateDen property, you can get FPS with FrameRateNum/FrameRateDen.
Thanks for your response.
I am still getting 0
for FrameRateNum
and FrameRateDen
for remote sources.
This is what I have so far:
foreach(Meta.Vlc.MediaTrack track in MediaPlayer.VlcMediaPlayer.Media.GetTracks())
{
if (track is Meta.Vlc.VideoTrack)
{
Meta.Vlc.VideoTrack t = (Meta.Vlc.VideoTrack)track;
Console.WriteLine( "{0} {1} {2}", t.FrameRateNum, t.FrameRateDen, t.Id);
}
}
outputs (URI/Stream):
0 0 1
0 0 1
0 0 1
0 0 1
...
output (Local AVI):
25 1 0
25 1 0
25 1 0
25 1 0
...
Ummm, maybe it is a issue of LibVlc, you can ask developer of VLC in Development around libVLC
After many conversations, it turns out that it was something up with libvlc. I downloaded the latest SOURCE version of VLC Media Player and just extracted the DLLs and plugins folder. Issue is resolved.
For those who have a similar issue, latest sources can be downloaded here: ftp://ftp.videolan.org/pub/videolan/vlc/
And just take the files mentioned below and use them in your libvlc folder in your project:
./axvlc.dll
./libvlc.dll
./libvlccore.dll
./npvlc.dll
./plugins
The
VlcPlayer.FPS
object property is always 0 (Zero). Even when media is playing. Also tried accessing fromVlcPlayer.VlcMediaPlayer.Fps
, same result. Same applies toVlcPlayer.Time
.Using a local AVI file, the properties
VlcPlayer.FPS
andVlcPlayer.Time
work fine:Using a remote source, then the properties
VlcPlayer.FPS
andVlcPlayer.Time
return 0.Below is the context I am attempting to use it in:
Streaming (remote) media from TwitchTV and Youtube.
Also, is it possible to get the number of Dropped Frames or Total Frames?