Detailed Description
The frame rate filter modifies the source frame rate either by applying a specific frame rate (e.g. 12.0) or a decimation interval (e.g. 2 = 1/2 source frame rate).
Filter Parameters:
Name | Type | Opt/Reqd | Range
============================================================================
FE2_FRAMERATE_FPS | Numeric | Optional | [0.0,)
FE2_FRAMERATE_DECIMATE | Numeric | Optional | [1,)
Example Usage:
Define Documentation
#define FE2_FILTER_FRAMERATE |
#define FE2_FRAMERATE_DECIMATE |
Filter parameter for the decimation interval.
Decimation removes frames from the source video at regular intervals. This is useful for dropping the rate without introducing jerkiness due to uneven frame rate.
- Note:
- Must be a positive integer
Default: disabled
Definition at line 67 of file framerate.h.
#define FE2_FRAMERATE_FPS |
Filter parameter name for frames per second value.
Allows the frame rate to be adjusted to a specific rate.
- Note:
- Default: disabled
Definition at line 56 of file framerate.h.
Function Documentation
Get the current decimation of the video framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | pValue | Decimate value |
- Return values:
-
- Precondition:
- flix is not
NULL
pValue is not NULL
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_FRAMERATE and the FE2_FRAMERATE_DECIMATE parameter. This function will be removed in a future release.
Determine if the source's framerate will be used instead of the modified framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | bpUseSourceFramerate | Variable to update with the current framerate selection |
- Return values:
-
| ON2_OK | The framerate status was successfully retrieved from the engine. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_FRAMERATE. Not adding FE2_FILTER_FRAMERATE with Flix2_AddFilter() implies use of the source frame rate. This function will be removed in a future release.
Get the current video framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | lpVideoFramerate | Frames per second |
- Return values:
-
| ON2_OK | The framerate was successfully retrieved from the engine. |
- Deprecated:
- Please use video_options_GetVideoFramerateAsDouble() to allow for non integer framerates.
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
on2sc video_options_GetVideoFramerateAsDouble |
( |
const FLIX2HANDLE |
flix, |
|
|
double * |
p_fps | |
|
) |
| | |
Get the current video framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | p_fps | Frames per second |
- Return values:
-
| ON2_OK | The framerate was successfully retrieved from the engine. |
- Note:
- If a value other than ON2_OK is returned, the output variables should not be considered valid.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_FRAMERATE and the FE2_FRAMERATE_FPS parameter. This function will be removed in a future release.
Set the decimation of the video framerate.
This value will be used to drop frames according to the video framerate. For example if the framerate is 30fps and the decimate value is 3 then the encoded framerate will be 10fps.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | value | Decimate value |
- Return values:
-
| ON2_OK | The target framerate was successfully set in the engine. |
| ON2_INVALID_PARAMS | Should one or more of the preconditions fail. |
- Precondition:
- flix is not
NULL
- Note:
- Default value is 0.
A value of <= 1 means to not drop any frames.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_FRAMERATE and the FE2_FRAMERATE_DECIMATE parameter. This function will be removed in a future release.
Set the video framerate.
Sets the framerate to be used when encoding the video. Frames will be duplicated or dropped as necessary to achieve the desired framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | lVideoFramerate | Framerate target (in frames per second) |
- Return values:
-
- Deprecated:
- Please use video_options_SetVideoFramerateAsDouble() to allow for non integer framerates.
- Note:
- The default is to use the source framerate.
on2sc video_options_SetVideoFramerateAsDouble |
( |
FLIX2HANDLE |
flix, |
|
|
const double |
fps | |
|
) |
| | |
Set the video framerate.
Sets the framerate to be used when encoding the video. Frames will be duplicated or dropped as necessary to achieve the desired framerate.
- Parameters:
-
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | fps | Framerate target (in frames per second) |
- Return values:
-
- Note:
- The default is to use the source framerate.
- Deprecated:
- Use the Filter Interface along with FE2_FILTER_FRAMERATE and the FE2_FRAMERATE_FPS parameter. This function will be removed in a future release.