'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"
'set output file info
oMediaManagerPro.OutputFile_Path = strRootPath & "\contents\mp4"
oMediaManagerPro.OutputFile_Name = "GuitarPlayer.mp4"
'call ConvertTo_MP3 method
Dim oMediaInfo As MediaInfo = oMediaManagerPro.ConvertTo_MP4()
' retrieve video informatioin
If oMediaInfo.Error_Code > 0 Then
HttpContext.Current.Response.Write((":: Video processing failed ::<br/>Error code: " & oMediaInfo.Error_Code & "<br />Error Message: ") + oMediaInfo.Error_Message)
Exit Sub
End If