Required Properties

List of main properties of media handler pro component.

Properties Type Detail Information
FFMPEGPath
string FFMPEGPath is used to setup ffmpeg.exe file path.
FLVToolPath
string Its required property if you want to use Set_Buffering() function and is used to setup flvtool2.exe file path, normally it is located in flvtool folder.
InputPath
string InputPath is used to setup folder path where source video exist. The path of video that need to be encoded.
OutputPath
string OutputPath is used to setup folder path where destination video will be stored. Encoded video, audio and thumbnail will be stored here.
PresetPath new
string Preset Path is used to setup ffpreset path for using preset files for encoding mp4 video using h264 codec.
FileName
string FileName is used to setup filename of destination video. The name of video or audio file which need to be encoded to another format.

Video / Audio Properties

Properties Type Detail Information
ExitProcess
int Default : 30000 milliseconds. It controls the processing of video and exit if processing takes more time than is set through this parameter. It controls deadlock and server crash issues.
OutputFileName
string OutputFileName is used to setup output filename, if its not provided then same video name will be setup as source video with different video extensions. (optional)
Width
int Set width of encoded video. You must supply height of video also and make sure width is multiple of 2. Be default width and height of encoded video is same as source video width and height. (optional)
Height
int Set height of encoded video. You must supply width of video also and make sure height is multiple of 2. Be default width and height of encoded video is same as source video width and height. (optional)
Video_Bitrate
double Set video bitrate of encoded video in kbps. By default video bitrate will be same as source video or higher in case of MaxQuality property is true. (optional)
Audio_Bitrate
double Set audio bitrate of encoded video in kbps. By default audio bitrate will be same as source video. (optional)
Audio_SamplingRate
int Set audio sampling rate of encoded video in kbps. By default audio bitrate will be same as source video. (optional)
FrameRate
double Set video frame rate per seconds. By default it will be same as source video.
OutputExtension
string Set custom extension for output video. e.g "mp2" will set and encode output video accoding to "mp2" audio format.
Duration
string Duration in seconds or in "hh:mm:ss" format used to limit any video to certain limit. By Default complete video will be encoded. If you want to limit video to 2 minites then pass 120 to Duration property.
Start_Position
string Start_Position set the starting point of video encoding. It must be in seconds or in "hh:mm:ss" format. e.g '10' or '00:00:10' will force video encoding to be started from 10th of second.
Deinterlace
bool Setting value to true will enable deinterlace option for encoded video. Default value is false.
MaxQuality
bool Setting value to true will generate highest quality video. If you enable MaxQuality option then video bitrate will no longer work.
VCodec
string Set video codec, default value depends on type of video to be encoded.
ACodec
string Set audio codec, default value depends on type of video to be encoded.
Force
string It force encoded video to be generated in same format as specified, e.g in case of flv video their value should be like Force ='flv';
DisableAudio
bool Disable audio in encoded video.
DisableVideo
bool Disable video in encoded video. It is used to extract audio from any video file or from audio files.
Channel
int Set audio channgel. Default is 1.
AspectRatio
string Set video aspect ratio for encoded video, e.g 1.3333, 1.7777 or 4:3, 16:9
TargetFileType
string Set default video and audio options for encoded video, it is used when you encode video to .mpg and .avi format. typical values are "vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd". Default value is "pal-vcd".
CustomCommand
string It is used to excute your own custom ffmpeg command.
Parameters
string

Through Parameters property you can pass advance parameter for video processing commands. e.g for mp4 video encoding sometime you can pass some advance parameters like

Parameters = "-mbd 2 -cmp 2 -subcmp 2";

PadTop
int

Set top padding of video in pixels

PadBottom
int

Set bottom padding of video in pixels

PadLeft
int

Set left padding of video in pixels

PadRight
int

Set right padding of video in pixels

PadColor
string

Set padding color in hexa decimal format e.g for white background its value should be like PadColor='ffffff';

CropTop
int

Crop top portion of video in pixels

CropBottom
int

Crop bottom portion of video in pixels

CropLeft
int

Crop left portion of video in pixels

CropRight
int

Crop right portion of video in pixels

Gop_Size
int

Set the group of picture size. Mainly used to insert keyframes in videos.

Bitrate_Tolerance
int

Set video bitrate tolerance (in bits, default 4000k). Has a minimum value of: (target_bitrate/target_framerate). Lowering tolerance too much has an adverse effect on quality.

Limit_File_Size
int

Set the file size limit.

MaxRate
int

Set max video bitrate (in bit/s). Requires BufferSize to be set.

MinRate
int

Set max video bitrate (in bit/s). Requires BufferSize to be set.

BufferSize
int

Set video buffer verifier buffer size (in bits).

Pass
int

Select the pass number (1 or 2). It is used to do two-pass video encoding.

Scale_Quality
int

To have a constant quality (but a variable bitrate), use the option Scale_Quality and its value is between 1 (excellent quality) and 31 (worst quality).

Image Properties

Properties Type Detail Information
Frame_Time
string Time in seconds or "hh:mm:ss" in video from where you want to capture thumbnail
ImageName
string Name of thumbnail if you want to set, Default value will be same as source video.
Image_Format
string Image Format in which you want to save thumbnail like "jpg", "png"
ThumbMode new
int 0: Normal Mode, 1: Fast Mode. It is used for grabing multiple thumbs from video. Recommended mode is "0" as it support grabbing thumbs from long length videos.
No_Of_Thumbs
int No of thumbs you want to capture from video. Work if "Multiple_Thumbs" property enable.
Multiple_Thumbs
bool Default "false", it shows whether multiple thumbs are enable.
Thumb_Transition_Time
int Time between two thumbs in seconds, default is "1". If Auto_Transition_Time enable, it will be automatically calculated.
Thumb_Start_Position
int Start Position of thumbs to be capture from video in seconds.
Auto_Transition_Time
bool Default "false", Setting this value to "true" will calculate "Thumb_Transition_Time" according to video duration and will grab thumbs properly.

Watermark Properties

Properties Type Detail Information
WaterMarkPath
string Path of folder where watermark image resides. It is required property if you want to post watermark on video
WaterMarkImage
string WaterMarkImage name sets name of watermark image that will be posted on video as watermark. Note it must be transparent and in gif format.

Methods

Method Detail Information
isAudio()
It checks whether current media file is in audio or video format.
Detail
Process() new
Generalize way to process any format media to another format. Can be use to translate and process any level ffmpeg command using Media Handler Pro properties.
Detail
Encode_FLV()
Encode any format video to flv format, now in one step you can encode video to flv format, post watermark on video and customize lots of flv attributes by using properties describe above.
Detail
Encode_MPG()
Encode any format video to mpg format and post watermark on it.
Detail
Encode_AVI()
Encode any format video to avi format and post watermark on it.
Detail
Encode_3GP()
Encode any format video to 3gp format.
Detail
Encode_WMV()
Encode any format video to wmv video format and post watermark on it.
Detail
Encode_MOV()
Encode any format video to mov video format and post watermark on it.
Detail
Encode_MP4()
Encode_M4V()
Encode_M4A()
Encode any format video to mp4, m4v and m4a video or audio format and post watermark on it except mpa.
Detail
Encode_MP3()
Encode any format video or audio to mp3 audio file.
Detail
Encode_WMA()
Encode any format video or audio file to wma audio file.
Detail
Grab_Thumb()
Grab single or multiple thumbnails from any format video.
Detail
Get_Info()
Retrieve information from media files (audio, video and image files). Information included video filename, duration, width, height, aspect ratio, video bitrate, audio bitrate, audio sampling rate and moreetc.
Detail
Execute_FFMPEG()
Execute custom FFMPEG commands using Media Handler Pro component. This function is available only in full version of Media Handler Pro.
Detail
Set_Buffering()
Set Meta-Information for flv videos. Only works will flash flv videos. Media Handler Pro 4.2 or later automatically set meta information for flash videos. so no need to use this function.
Detail
Split_Video()
Split video in small clips, available only in full version of Media Handler Pro component.
Detail
Join_Videos()
Join and publish two or more video clips in one output. This function is available only in full version of Media Handler Pro component.
Detail
ImagesToVideo()
Convert sequence of images in .jpg format to any format video file.
Detail