FLV Custom Settings 1.1

From Aviberry API

Jump to: navigation, search

Contents
Other formats
Still have a question?


Contents

VideoCodec

VideoCodec - video codec.
Default value - s263.

Can possess the following values:

Value Description
s263 H.263
avc1 H.264

AudioCodec

AudioCodec - audio codec.
Default value - 0.

Can possess the following values:

Value Description
0 No sound
mp4a AAC
mp4m MP3

Width

Width - frame width in pixels.

Height

Height - frame height in pixels.

FrameRate

FrameRate - number of frames per second.
Default value - 25.
The following values are usually used 23.976, 24, 25, 29.97 or 30.

VideoSAsInput

VideoSAsInput - parameter responsible for using input file characteristics when converting.
Default value - false

Can possess the following values:

Value Description
false Don't use input file characteristics
true Use input file characteristics (Width, Height, FrameRate)

ResizeMethod

ResizeMethod - video frame resize method.
Default value - 1.

Can possess the following values:

Value Description
0 Stretch. The image will be stretched to meet the new values of width and height
1 Letterbox. Black bars will be added to the image so that it meets the new values of width and height
2 Crop. The image will be cropped to meet the new values of width and height

ResizeQuality

ResizeQuality - resize quality parameter.
Default value - 1.

Can possess the following values:

Value Description
0 Normal (Fast). Nearest-neighbor interpolation.
1 Best (Slow). Bilinear interpolation.

AudioBitrate

AudioBitrate - audio bitrate. Default value - 32 kbit/s.
Can possess the following values: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 kbit/s.

Frequency

Frequency - audio sample rate.
Default value - 11025 kHz.

Can possess the following values: 11025, 22050, 44100 kHz.

Channels

Channels - number of channels.
Default value - 1.

Can possess the following values:

Value Description
1 Mono
2 Stereo

VParams

VParams - a set of parameters for the selected video codec.

The list of parameters for each video codec:

H.263

Examples:

"VParams":{"H263":{"MotionSrchRng":"1","Quality":"30","VBR":"true"}}
"VParams":{"H263":{"MotionSrchRng":"1","Bitrate":"250000","VBR":"false"}}

Parameter Description
MotionSrchRng Motion search range. Default value - 1.
Value Description
1 Very small
3 Small
7 Medium
10 Wide
15 Very wide
Bitrate Video bitrate. The special value -1 is used to set automatic bitrate control. Is used only if VBR=false. The measurement unit is bit/s.
Quality Video quality. Is used only if VBR=true. Can possess values from 1 to 30. The higher the value is, the better the output video quality is, but the lower the conversion speed is. Default value - 1.
VBR Using variable bitrate. Default value - false.
Value Description
false Use constant bitrate. In this case, you also need to set the Bitrate parameter value.
true Use variable bitrate. In this case, you also need to set the Quality parameter value.

H.264

Examples:

"VParams":{"H264":{"Profile":4,"Quality":2,"MaxIFrameInterval":25,"MaxBFrameSequence":0,"VBR":true,"AspectRatio":0}}
"VParams":{"H264":{"Profile":4,"Bitrate":250000,"Quality":2,"MaxIFrameInterval":25,"MaxBFrameSequence":0,"VBR":false,"AspectRatio":0}}
"VParams":{"H264":{"Profile":2,"Bitrate":-1,"Quality":2,"MaxIFrameInterval":25,"MaxBFrameSequence":0,"AspectRatio":0}}
"VParams":{"H264":{"Profile":2,"Bitrate":250000,"Quality":2,"MaxIFrameInterval":25,"MaxBFrameSequence":0,"AspectRatio":0}}

Parameter Description
Profile Profile. Default value - 1.
Value Description
1 Baseline
2 Main
4 High
Bitrate Video bitrate. The special value -1 is used to set automatic bitrate control. The other values set bitrate in bit/s. Is used only if VBR=false.
Quality A complex parameter determining the output video quality. Can possess values from 0 to 4. The higher the value is, the better the output video quality is, but the lower the conversion speed is.
MaxIFrameInterval Maximal interval between I-frames. Default value - 0. Can possess values from 0 to 1000.
MaxBFrameSequence Maximal number of adjacent B-frames. Default value - 0. Can possess values from 0 to 10.
VBR Using variable bitrate. Default value - false. This parameter can be used only if Profile=4.
Value Description
false Use constant bitrate. In this case, you also need to set the Bitrate parameter value.
true Use variable bitrate. Makes sense only if Profile=4.
AspectRatio Display aspect ratio. In the general case, can differ from the Width:Height ratio. Default value - 0.
Value Description
0 Use the Width:Height ratio (square pixel)
1.3333 4:3
1.7777 16:9

You can also set any other values.


AParams

AParams - a set of parameters for the selected audio codec.

The list of parameters for each audio codec:

AAC

Example:

"AParams":{"AAC":{"Profile":"2","Bitrate":"192000","Quality":"100"}}

Parameter Description
Profile Profile. Default value - 1.
Value Description
1 Main
2 LC - Low Complexity
5 LTP - Long Term Prediction
Bitrate Audio bitrate. Default value - 8000.

Can possess the following values: 8000, 16000, 20000, 24000, 28000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000 bit/s.
The highest possible value depends on the Frequency parameter value.

Quality A complex parameter determining the output audio quality. Can possess values from 100 to 500. The higher the value is, the better the output video quality is, but the lower the conversion speed is. Default value - 100.

MP3

Example:

"AParams":{"MP3":{"Bitrate":128}}

Parameter Description
Bitrate Audio bitrate. Default value - 64 kbit/s.

Can possess the following values: 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 kbit/s.

Examples

XML-RPC

<member> <name>format_id</name> <value><string>16509</string></value> </member> <member> <name>preset_id</name> <value><string>-2</string></value> </member> <member> <name>preset_data</name> <value><string> { "VideoCodec":"avc1", "AudioCodec":"mp4a", "Width":320, "Height":240, "FrameRate":"25", "VideoSAsInput":true, "ResizeMethod":1, "ResizeQuality":1, "AudioBitrate":128, "Frequency":44100, "Channels":2, "VParams": { "H264": { "Profile":2, "Bitrate":-1, "Quality":0, "MaxIFrameInterval":125, "MaxBFrameSequence":0, "AspectRatio":0 } }, "AParams": { "AAC": { "Profile":"2", "Bitrate":"192000", "Quality":"100" } } } </string></value> </member>

JSON-RPC

"preset": { "format_id": "16509", "preset_id": "-2" "preset_data": " { \"VideoCodec\":\"avc1\", \"AudioCodec\":\"mp4a\", \"Width\":320, \"Height\":240, \"FrameRate\":\"25\", \"VideoSAsInput\":true, \"ResizeMethod\":1, \"ResizeQuality\":1, \"AudioBitrate\":128, \"Frequency\":44100, \"Channels\":2, \"VParams\": { \"H264\": { \"Profile\":2, \"Bitrate\":-1, \"Quality\":0, \"MaxIFrameInterval\":125, \"MaxBFrameSequence\":0, \"AspectRatio\":0 } }, \"AParams\": { \"AAC\": { \"Profile\":\"2\", \"Bitrate\":\"192000\", \"Quality\":\"100\" } } }" }



Contents
Other formats
Still have a question?

Views
Personal tools