'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\3gp"
oMediaManagerPro.OutputFile_Name = "GuitarPlayer.3gp"
'set codec information for 3gp file
oMediaManagerPro.Video_Codec = "mpeg4"
oMediaManagerPro.Video_Bitrate = 100
oMediaManagerPro.Frame_Rate = 15
oMediaManagerPro.Audio_Codec = "libfaac"
oMediaManagerPro.Audio_Bitrate = 48
oMediaManagerPro.Audio_SamplingRate = 22000
'call ConvertTo_MP3 method
Dim oMediaInfo As MediaInfo = oMediaManagerPro.ConvertTo_3GP()
' 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