In order to display video on the web properly and for further processing, both online and offline you require lots of video information. Video information is necessary both for web applications and desktop applications for its internal use. You can use MediaHandlerPro component to get lots of video information from any video format. Video information includes get duration, audio bitrate, video bitrate, audio sampling rate from videos.
You can also use MediaHandlerPro to check whether current video is in audio format and video format.
You can use Media Handler Pro version 3.0 to get useful information from video. Note for older version please view examples below.
MediaHandler _mhandler = new MediaHandler();
_mhandler.InputPath = RootPath + "\\contents\\videos";
string file = _mhandler.isAudio();
if (file == "audio")
Response.Write("Current file is in audio format");
else
Response.Write("Current file is in video format");
MediaHandler _mhandler = new MediaHandler();
_mhandler.InputPath = RootPath + "\\contents\\videos";
string file = _mhandler.Get_Info();
string[] _arrstr;
_arrstr = file.ToString().Split(char.Parse(","));
// Get Video Duration
string duration = _arrstr[0].Remove(0, _arrstr[0].IndexOf(":") + 1);
// You can get more video information by incrementing array value [0],[1], etc.
string file = _mhandler.is_Audio(filename, _ffmpegpath, InputPath);
if (file == "audio")
Response.Write("Current file is in audio format");
else
Response.Write("Current file is in video format");
string file = _mhandler.Get_Video_Information(filename, _ffmpegpath, InputPath);
string[] _arrstr;
_arrstr = file.ToString().Split(char.Parse(","));
// Get Video Duration
string duration = _arrstr[0].Remove(0, _arrstr[0].IndexOf(":") + 1);
// You can get more video information by incrementing array value [0],[1], etc.