Cut
[Filters]


Detailed Description

The cut filter allows for the encoding of a user specified range of time from the input media file.

Filter Parameters:

  Name                                |   Type   | Opt/Reqd |    Range
  ==================================================================================
  FE2_CUT_START_SEC                   | Numeric  | Optional | [0, media duration]
  FE2_CUT_STOP_SEC                    | Numeric  | Optional | [-1, media duration]
  FE2_CUT_USE_SEEK                    | Numeric  | Optional | [0, 1]

Example Usage:

  sc = Flix2_AddFilter(&filter, flix, FE2_FILTER_CUT);
  // start the cut at 5 seconds
  if(sc == ON2_OK)
      sc = Flix2_FilterSetParam(filter, FE2_CUT_START_SEC, 5.0);
  // end the cut at 10 seconds
  if (sc == ON2_OK)
      sc = Flix2_FilterSetParam(filter, FE2_CUT_STOP_SEC, 10.0);


Deprecated functions

on2sc editor_options_GetUseCut (const FLIX2HANDLE flix, on2bool *pUseCut)
 Determine if the cut filter is enabled.
on2sc editor_options_SetUseCut (FLIX2HANDLE flix, const on2bool bUseCut)
 Enable/disable the cut filter.
on2sc editor_options_GetCutStartTime (const FLIX2HANDLE flix, double *pStartTime)
 Get the current cut start time.
on2sc editor_options_SetCutStartTime (FLIX2HANDLE flix, const double start_time)
 Set the cut start time.
on2sc editor_options_GetCutStopTime (const FLIX2HANDLE flix, double *pEndTime)
 Get the current cut stop time.
on2sc editor_options_SetCutStopTime (FLIX2HANDLE flix, const double end_time)
 Set the cut stop time.

Defines

#define FE2_FILTER_CUT
 Filter name for use with Flix2_AddFilter().
#define FE2_CUT_START_SEC
 Filter parameter for cut start time.
#define FE2_CUT_STOP_SEC
 Filter parameter for setting the cut stop time.
#define FE2_CUT_USE_SEEK
 Set FE2_CUT_START_SEC application method.

Define Documentation

#define FE2_CUT_START_SEC

Filter parameter for cut start time.

Sets the time (in seconds relative to the beginning of the source) to begin the media cut. A value of 0 indicates that the cut should start at the beginning of the input media.

Note:
Default: 0

Definition at line 64 of file cut.h.

#define FE2_CUT_STOP_SEC

Filter parameter for setting the cut stop time.

Sets the time (in seconds relative to the beginning of the input media) to end the media cut. A value of -1 indicates the cut should stop at the end of the input media.

Note:
Default: -1

Definition at line 75 of file cut.h.

#define FE2_CUT_USE_SEEK

Set FE2_CUT_START_SEC application method.

When FE2_CUT_START_SEC is non-zero this parameter determines how the cut is applied. A value of 0 indicates that the entire source file should be read and discarded until FE2_CUT_START_SEC is reached. This method will increase the time necessary to process the source media as it must be decoded before it be discarded. This was the default behavior prior to 8.0.7.0. A value of 1 indicates that the engine should attempt to perform a seek on the source media to arrive at FE2_CUT_START_SEC. Should this method fail the engine will fall back to the legacy method.

Note:
Default: 1
If output is produced with the value set to 1, but the results are undesirable the only workaround is to re-encode with the value set to 0.

Definition at line 95 of file cut.h.

#define FE2_FILTER_CUT

Filter name for use with Flix2_AddFilter().

Definition at line 52 of file cut.h.


Function Documentation

on2sc editor_options_GetCutStartTime ( const FLIX2HANDLE  flix,
double *  pStartTime 
)

Get the current cut start time.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pStartTime Clip start time (in seconds)
Return values:
ON2_OK The cut start time was successfully retrieved from the engine.
ON2_NET_ERROR The underlying communication layer failed.
Note:
If a value other than ON2_OK is returned, the output variables should not be considered valid.
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.

on2sc editor_options_GetCutStopTime ( const FLIX2HANDLE  flix,
double *  pEndTime 
)

Get the current cut stop time.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pEndTime Clip stop time (in seconds, -1 for end)
Return values:
ON2_OK The cut stop time was successfully retrieved from the engine.
ON2_NET_ERROR The underlying communication layer failed.
Note:
If a value other than ON2_OK is returned, the output variables should not be considered valid.
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.

on2sc editor_options_GetUseCut ( const FLIX2HANDLE  flix,
on2bool pUseCut 
)

Determine if the cut filter is enabled.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[out] pUseCut Variable to update with the current saturation enable status
Return values:
ON2_OK The cut filter enable status was successfully retrieved from the engine.
ON2_NET_ERROR The underlying communication layer failed.
Note:
If a value other than ON2_OK is returned, the output variables should not be considered valid.
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.

on2sc editor_options_SetCutStartTime ( FLIX2HANDLE  flix,
const double  start_time 
)

Set the cut start time.

Sets the time (in seconds from the beginning of the source) to begin the media cut. 0 indicates start immediately.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] start_time Start time (in seconds, relative to source)
Return values:
ON2_OK The start time value was successfully set in the engine.
ON2_INVALID_PARAMS The value is out of range.
ON2_NET_ERROR The underlying communication layer failed.
Note:
This call will have no effect on the encoded video unless the cut filter is enabled with editor_options_SetUseCut(). The default value is 0.0.
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.

on2sc editor_options_SetCutStopTime ( FLIX2HANDLE  flix,
const double  end_time 
)

Set the cut stop time.

Sets the time (in seconds from the beginning of the source) to end the media cut. -1 indicates end of source.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] end_time End time (in seconds, relative to source)
Return values:
ON2_OK The end time value was successfully set in the engine.
ON2_INVALID_PARAMS The value is out of range.
ON2_NET_ERROR The underlying communication layer failed.
Note:
This call will have no effect on the encoded video unless the cut filter is enabled with editor_options_SetUseCut(). The default value is -1.0 (end of source).
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.

on2sc editor_options_SetUseCut ( FLIX2HANDLE  flix,
const on2bool  bUseCut 
)

Enable/disable the cut filter.

Parameters:
[in] flix Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx()
[in] bUseCut New cut enable status. on2true to enable, on2false to disable.
Return values:
ON2_OK The cut enable status was successfully set in the engine.
ON2_NET_ERROR The underlying communication layer failed.
Note:
By default, the cut filter is disabled.
Deprecated:
Please use: With the constants: for access to the flix engine cut filter.


On2 Technologies, Inc Flix Engine Linux documentation, generated on Tue Nov 2 16:53:00 2010 by doxygen 1.5.5