Search code examples
c#videolibvlc

MediaInfo Helper.Get Basic Video Info() failed for video streams


I need to play a network stream video "http://www.wowza.com/_h264/Butterfly_256K.mp4" using LibVLC, I done the code and necessary things.

I am able to play the video, but I cannot get the info about video by the API:MediaInfoHelper.Get BasicVideoInfo(). When I pass the URL I get exception: "File Not Found"

The code I done is:

   var stream1Info = MediaInfoHelper.GetBasicVideoInfo(mediaInputStream1.Source);
   var stream2Info = MediaInfoHelper.GetBasicVideoInfo(mediaInputStream2.Source);
   lblFrmRateFirstStream.Text = stream1Info.Fps + " fps";
   lblFrmRateSecondStream.Text = stream2Info.Fps + " fps";
   lblBandWidthFirstStream.Text = ConvertBytesToMegabytes(stream1Info.Bitrate / 8) + " Mbps";
   lblBandWidthSecondStream.Text = ConvertBytesToMegabytes(stream2Info.Bitrate / 8) + " Mbps";

It will work well for a local file. But not for a streaming video.

I then tried to expose the VLC's own code to get the data. It contains the libvlc_media_player_get_fps() method. But it gives me 0.0 for stream and correct value for local.

I doubt then how the VLC player gets this information.


Solution

  • Default build of MediaInfo does not support HTTP links yet. Planned in the future (the feature is already coded but more tests are needed) You may contact the author of MediaInfo if you want to speedup this feature.