Media Handler Pro Documentation - Full Version

You can read complete documentation of Media Handler Pro full version below.

If you have to know more about it, please contact us.

Classes and Functions available

Convert_Media:

Public Function Convert_Media( FileName, _ffmpegpath, InputPath, OutputPath, Width, Height, Video_Bitrate, FrameRate, Audio_Bitrate, Audio_SamplingRate, Duration, deinterlace)
Description:
Convert_Media() function is used to convert video from any format to flv format.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
  • Integer Width: Width of video.
  • Integer Height: Height of video.
  • Integer Video_Bitrate: Set video bitrate, read more...
  • Float FrameRate: Set Framerate of output video, read more...
  • Integer Audio_Bitrate: Set Audio Bitrate, read more...
  • Integer Audio_SamplingRate: Set Audio Sampling Rate, read more...
  • String Duration: Set the duration of output video, set "0" if you want to encode complete video, otherwise if you want to restrict video to certain limit e.g 2 minutes then provide appropriate value, value must be in this format : hh:mm:ss
  • Boolean deinterlace: whether generated video should be deinterlace or not.
Returns:
  • String: Generated Video Name plus with other output video information including duration of video, audio bitrate, audio sampling rate and more. Each value is separated with comma (,).
  • or
  • Error Codes - See Detail

Convert_Media:

Public Function Convert_Media(FileName, _ffmpegpath, InputPath, OutputPath, MovieSize, Video_Bitrate, FrameRate, Audio_Bitrate, Audio_SamplingRate, Duration, deinterlace)
Description:
Convert_Media() function is used to convert video from any format to flv format.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
  • String MovieSize: Set size of output movie, e.g '320x240'.
  • Integer Video_Bitrate: Set video bitrate, read more...
  • Float FrameRate: Set Framerate of output video, read more...
  • Integer Audio_Bitrate: Set Audio Bitrate, read more...
  • Integer Audio_SamplingRate: Set Audio Sampling Rate, read more...
  • String Duration: Set the duration of output video, set "0" if you want to encode complete video, otherwise if you want to restrict video to certain limit e.g 2 minutes then provide appropriate value, value must be in this format : hh:mm:ss
  • Boolean deinterlace: whether generated video should be deinterlace or not.
Returns:
  • String: Generated Video Name plus with other output video information including duration of video, audio bitrate, audio sampling rate and more. Each value is separated with comma (,).
  • or
  • Error Codes - See Detail

Convert_Media:

Public Function Convert_Media( FileName, _ffmpegpath, InputPath, OutputPath, Video_Bitrate, Audio_Bitrate, Audio_SamplingRate, Duration, deinterlace)
Description:
Convert_Media() function is used to convert video from any format to flv format.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
  • Integer Video_Bitrate: Set video bitrate, read more...
  • Integer Audio_Bitrate: Set Audio Bitrate, read more...
  • Integer Audio_SamplingRate: Set Audio Sampling Rate, read more...
  • String Duration: Set the duration of output video, set "0" if you want to encode complete video, otherwise if you want to restrict video to certain limit e.g 2 minutes then provide appropriate value, value must be in this format : hh:mm:ss
  • Boolean deinterlace: whether generated video should be deinterlace or not.
Returns:
  • String: Generated Video Name plus with other output video information including duration of video, audio bitrate, audio sampling rate and more. Each value is separated with comma (,).
  • or
  • Error Codes - See Detail

Convert_Media:

Public Function Convert_Media(FileName, _ffmpegpath, InputPath, OutputPath, Audio_Bitrate, Audio_SamplingRate, Duration, deinterlace)
Description:
Convert_Media() function is used to convert video from any format to flv format.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
  • Integer Audio_Bitrate: Set Audio Bitrate, read more...
  • Integer Audio_SamplingRate: Set Audio Sampling Rate, read more...
  • String Duration: Set the duration of output video, set "0" if you want to encode complete video, otherwise if you want to restrict video to certain limit e.g 2 minutes then provide appropriate value, value must be in this format : hh:mm:ss
  • Boolean deinterlace: whether generated video should be deinterlace or not.
Returns:
  • String: Generated Video Name plus with other output video information including duration of video, audio bitrate, audio sampling rate and more. Each value is separated with comma (,).
  • or
  • Error Codes - See Detail

Convert_Media:

Public Function Convert_Media(FileName, _ffmpegpath, InputPath, OutputPath, MovieSize, Audio_Bitrate, Audio_SamplingRate, Duration, deinterlace)
Description:
Convert_Media() function is used to convert video from any format to flv format.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
  • String MovieSize: Set the size of output video, e.g '320x240'
  • Integer Audio_Bitrate: Set Audio Bitrate, read more...
  • Integer Audio_SamplingRate: Set Audio Sampling Rate, read more...
  • String Duration: Set the duration of output video, set "0" if you want to encode complete video, otherwise if you want to restrict video to certain limit e.g 2 minutes then provide appropriate value, value must be in this format : hh:mm:ss
  • Boolean deinterlace: whether generated video should be deinterlace or not.
Returns:
  • String: Generated Video Name plus with other output video information including duration of video, audio bitrate, audio sampling rate and more. Each value is separated with comma (,).
  • or
  • Error Codes - See Detail

Extract_Audio:

Public Function Extract_Audio(FileName, _ffmpegpath, InputPath, OutputPath, Bitrate, SamplingRate,OutputType)
Description:
Extract_Audio() function is used to extract audio from any format videos, it is useful for generating mobile ringtones, playing audio song on the web.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
  • Integer Bitrate: Set Audio Bitrate, read more...
  • Integer SamplingRate: Set Audio Sampling Rate, read more...
  • Integer OutputType: Set output audio file format, 0: generate audio file from source video in flv format, 1: generate audio file from source video in mp3 format.
Returns:
  • String: Return output filename. output is generated in flv format.
  • or
  • Error Codes - See Detail

Set_Buffering:

Public Sub Set_Buffering( FileName, _flvtoolpath, Path)
Description:
Set_Buffering() procedure is used to set Meta-information for FLV Video.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _flvtoolpath: Path of flvtool2.exe, need to be properly configure, view sample code section to learn more about how to be setup _flvtoolpath variable.
  • String Path: Path of source video directory.
Returns:
  • Nothing

Grab_Image:

Public Function Grab_Image( FileName, _ffmpegpath, InputPath, OutputPath, Frame_Time, Image_Format, Width, Height)
Description:
Grab_Image() function is used to capture frame in image format from flv video from a given frame number. Recommended image format for grabbing thumbnails are jpg and png.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
  • String Frame_Time: Frame number to capture, must be specify as hh:mm:ss. Also make it as much small as you can e.g 00:00:03 capture third frame of flv video. If you specify frame number that is not exist due to small flv video, image generation will failed. e.g if video size is about 5 frames and you specify 00:00:15 then result in failure because 15th frame is not exist.
  • String Image_Format: Format of generated thumbnail. e.g jpg, png, gif, bmp etc.
  • Integer Width: Set width of image.
  • Integer Height: Set height of image.
Returns:
  • String: Returns image name.
  • or
  • Error Codes - See Detail

Grab_Multiple_Image:

Public Function Grab_Multiple_Image( FileName, _ffmpegpath, InputPath, OutputPath, No_Of_Thumbs,Frame_Time, Image_Format, Width, Height)
Description:
Grab_Image() function is used to capture multiple frames in image format from flv video. Recommended image format for grabbing thumbnails are jpg and png. It capture frames in sequence from starting frame that you set
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
  • Integer No_Of_Thumbs: Set number of thumbnails you want to generate.
  • String Frame_Time: Frame number to capture, must be specify as hh:mm:ss. Also make it as much small as you can e.g 00:00:03 capture third frame of flv video. If you specify frame number that is not exist due to small flv video, image generation will failed. e.g if video size is about 5 frames and you specify 00:00:15 then result in failure because 15th frame is not exist.
  • String Image_Format: Format of generated thumbnail. e.g jpg, png, gif, bmp etc.
  • Integer Width: Set width of image.
  • Integer Height: Set height of image.
Returns:
  • String: Returns image name.
  • or
  • Error Codes - See Detail

Convert_Media_To_MPEG:

Public Function Convert_Media_To_MPEG( FileName, _ffmpegpath, InputPath, OutputPath)
Description:
Convert_Media_To_MPEG() function is used to encode any format video to mpeg format.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
Returns:
  • String: Returns mpeg video name.
  • or
  • Error Codes - See Detail

Convert_Media_To_AVI:

Public Function Convert_Media_To_AVI( FileName, _ffmpegpath, InputPath, OutputPath)
Description:
Convert_Media_To_AVI() function is used to encode any format video to avi format.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
Returns:
  • String: Returns avi video name.
  • or
  • Error Codes - See Detail

Convert_Media_To_3gp:

Public Function Convert_Media_To_3gp( FileName, _ffmpegpath, InputPath, OutputPath)
Description:
Convert_Media_To_3gp() function is used to encode any format video to 3gp format while making video suitable for playing on mobile phones.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
Returns:
  • String: Returns 3gp video name.
  • or
  • Error Codes - See Detail

Convert_Media_To_wmv:

Public Function Convert_Media_To_wmv( FileName, _ffmpegpath, InputPath, OutputPath)
Description:
Convert_Media_To_wmv() function is used to encode any format video to wmv format while making video suitable for playing on windows media players.
Parameter Detail:
  • String FileName : Name of source video that need to be encode e.g 'sample.mov'
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
Returns:
  • String: Returns 3gp video name.
  • or
  • Error Codes - See Detail

Execute_FFMPEG:

Public Sub Execute_FFMPEG(_ffmpegpath , InputPath, OutputPath, Command)
Description:
Execute_FFMPEG() function is used to execute custom ffmpeg commands according to your own choice and requirements.
Parameter Detail:
  • String _ffmpegpath: Path of ffmpeg.exe, need to be properly configure, view sample code section to learn more about how to be setup _ffmpegpath variable.
  • String InputPath: Path of source video directory.
  • String OutputPath: Path of destination video directory, where generated video will be store.
  • String Command: Provide custom ffmpeg command to execute.e.g -i test.avi -vcodec mp3 -ar 22050 -ab 32 -f flv test.flv. Note, don't attach complete path with test.avi and test.flv, you must send path using inputpath and outputpath variable.
Returns:
  • Nothing.
©2007 - 2008, MediaSoft Pro Inc  | Site Map