|
|
|
|
|
|
|
|
Check media file format if it is an audio or a video file
|
|
.NET Media Manager Pro Component
|
|
Trial:
|
Free Trial vs Prchased
|
|
cost:
|
$69
|
|
Downloads:
|
1640
|
|
Rating:
|
|
|

|
|
|
|
|
|
C# Code
|
|
|
|
|
//Declare object of class MediaManagerPro
MediaManagerPro oMediaManagerPro = new MediaManagerPro();
//Get the rooth path
string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);
//set the directory path info for ffmpeg file
oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
//Set source file info
oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";
oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";
//check file format
string strMediaFormat = oMediaManagerPro.GetMedia_Format();
HttpContext.Current.Response.Write("Current file is in <b>" + strMediaFormat + "</b> format");
|
|
|
|
|
VB.Net Code
|
|
|
|
|
'Declare object of class MediaManagerPro
Dim oMediaManagerPro As New MediaManagerPro()
'Get the rooth path
Dim strRootPath As String = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath)
'set the directory path info for ffmpeg file
oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\ffmpeg\ffmpeg.exe")
'Set source file info
oMediaManagerPro.SourceFile_Path = strRootPath & "\contents\Source"
oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg"
'check file format
Dim strMediaFormat As String = oMediaManagerPro.GetMedia_Format()
HttpContext.Current.Response.Write("Current file is in <b>" & strMediaFormat & "</b> format")
|
|
|
|
|
|
|
|