Defines | |
#define | FE2_FILTER_PNGEX |
Filter name for use with Flix2_AddFilter(). | |
#define | FE2_PNGEX_OUTPUT_DIRECTORY |
Filter parameter for setting PNG image output directory. | |
#define | FE2_PNGEX_FILENAME_PREFIX |
Filter parameter for setting PNG image file name prefix. | |
#define | FE2_PNGEX_FILENAME_SUFFIX |
Filter parameter for setting PNG image file name suffix. | |
#define | FE2_PNGEX_ENABLE_ALPHA |
Filter parameter for preserving source video alpha channel data in exported PNG images. | |
#define | FE2_PNGEX_EXPORT_INTERVAL |
Filter parameter for enabling PNG image export at a millisecond interval. | |
#define | FE2_PNGEX_EXPORT_TIME_STRING |
Filter parameter for setting a string of PNG export times in milliseconds. | |
#define | FE2_PNGEX_EXPORT_CUE_POINTS |
Filter parameter for enabling export of PNG images at cue points. | |
#define | FE2_PNGEX_AUTO_EXPORT_COUNT |
Filter parameter for enabling automatic PNG image generation. | |
#define | FE2_PNGEX_AUTO_EXPORT_START_TIME |
Filter parameter for setting PNG auto generation start time. | |
#define | FE2_PNGEX_AUTO_EXPORT_END_TIME |
Filter parameter for setting PNG auto generation end time. | |
#define | FE2_PNGEX_AUTO_EXPORT_RANDOM_PERIOD |
Filter parameter for randomizing auto generated times. | |
#define | FE2_PNGEX_EXPORT_FIRST_FRAME_PNG |
Filter parameter for enabling PNG image creation using the first video frame. | |
#define | FE2_PNGEX_COMPRESSION_LEVEL |
Filter parameter for setting compression level used by libpng. | |
#define | FE2_PNGEX_WIDTH |
Filter parameter for setting PNG image width. | |
#define | FE2_PNGEX_HEIGHT |
Filter parameter for setting PNG image height. | |
Enumerations | |
enum | FE2_PNGExCuePtMode { FE2_PNGEX_CP_EVENT, FE2_PNGEX_CP_NAV, FE2_PNGEX_CP_ALL } |
Constants for use with FE2_PNGEX_EXPORT_CUE_POINTS. More... |
The PNG image export filter creates PNG images from the source video data of the input file passed to Flix2_SetInputFile().
Filter Parameters:
Name | Type | Opt/Reqd | Range ======================================================================================= FE2_PNGEX_OUTPUT_DIRECTORY | String | Optional | N/A FE2_PNGEX_FILENAME_PREFIX | String | Optional | N/A FE2_PNGEX_FILENAME_SUFFIX | String | Optional | N/A FE2_PNGEX_ENABLE_ALPHA | Boolean | Optional | [0,1] FE2_PNGEX_EXPORT_INTERVAL | Numeric | Optional | [1,video stream duration] FE2_PNGEX_EXPORT_TIME_STRING | String | Optional | N/A FE2_PNGEX_EXPORT_CUE_POINTS | Numeric | Optional | [0,3] FE2_PNGEX_AUTO_EXPORT_COUNT | Numeric | Optional | [0,10000] FE2_PNGEX_AUTO_EXPORT_START_TIME | Numeric | Optional | [0,video stream duration] FE2_PNGEX_AUTO_EXPORT_END_TIME | Numeric | Optional | [0,video stream duration] FE2_PNGEX_AUTO_EXPORT_RANDOM_PERIOD | Numeric | Optional | [1,) FE2_PNGEX_EXPORT_FIRST_FRAME_PNG | Boolean | Optional | [0,1] FE2_PNGEX_COMPRESSION_LEVEL | Numeric | Optional | [-1,9] FE2_PNGEX_WIDTH | Numeric | Optional | FE2_SCALE_WIDTH FE2_PNGEX_HEIGHT | Numeric | Optional | FE2_SCALE_HEIGHT
Example Usage:
sc = Flix2_AddFilter(&filter, flix, FE2_FILTER_PNGEX); // Automatically export 10 PNG images spaced evenly through the clip if(sc == ON2_OK) sc = Flix2_FilterSetParam(filter, FE2_PNGEX_AUTO_EXPORT_COUNT, 10);
Notes:
Additional References:
For information about the PNG file format, please visit: www.libpng.org
#define FE2_FILTER_PNGEX |
Filter name for use with Flix2_AddFilter().
Definition at line 99 of file png_export.h.
#define FE2_PNGEX_AUTO_EXPORT_COUNT |
Filter parameter for enabling automatic PNG image generation.
If enabled, the PNG exporter will export the specified number of PNG images at times spaced evenly throughout the video stream. See the notes section for important information about this feature and single pass encoding. Time slice duration is calculated using the following:
time_slice_duration = video_stream_duration / FE2_PNGEX_AUTO_EXPORT_COUNT
The first auto generated PNG image time is calculated using the following equation:
first_png_time = FE2_PNGEX_AUTO_EXPORT_START_TIME > 0 ? FE2_PNGEX_AUTO_EXPORT_START_TIME : time_slice_duration / 2
Additional PNG time(s) is/are calculated using the following equation:
n: 0 based PNG image index png_time = first_png_time + (time_slice_duration * n)
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // auto export 10 PNG images sc = Flix2_FilterSetParam(png_exporter_plgn, FE2_PNGEX_AUTO_EXPORT_COUNT, 10);
Definition at line 263 of file png_export.h.
#define FE2_PNGEX_AUTO_EXPORT_END_TIME |
Filter parameter for setting PNG auto generation end time.
The PNG exporter will use this value as the video stream duration in auto export time calculations. The value specified MUST be in milliseconds.
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // set the auto generation end time to 10 seconds sc = Flix2_FilterSetParam(png_exporter_plgn, FE2_PNGEX_AUTO_EXPORT_END_TIME, 10000);
Definition at line 305 of file png_export.h.
#define FE2_PNGEX_AUTO_EXPORT_RANDOM_PERIOD |
Filter parameter for randomizing auto generated times.
When set to a value greater than zero, PNG image generation will occur at random offsets from the times at which images would normally be generated when FE2_PNGEX_AUTO_EXPORT_COUNT is enabled. The value of this parameter controls the time period (offset range) within which the image generation will occur. The duration of each time slice is calculated using the following equation:
time_slice_duration = video_stream_duration / FE2_PNGEX_AUTO_EXPORT_COUNT
FE2_PNGEX_AUTO_EXPORT_RANDOM_PERIOD is used to calculate the range of time within which to randomize the PNG generation time:
random_offset_range = time_slice_duration / FE2_PNGEX_AUTO_EXPORT_RANDOM_PERIOD
The time of each automatically generated PNG is then calculated:
f: first png time n: 0 based PNG image index r: random offset in the range 0-random_range png_time = f + (n * time_slice_duration) + r;
Definition at line 336 of file png_export.h.
#define FE2_PNGEX_AUTO_EXPORT_START_TIME |
Filter parameter for setting PNG auto generation start time.
The value specified MUST be in milliseconds. This parameter affects the following changes on time calculations explained in the FE2_PNGEX_AUTO_EXPORT_COUNT section:
time_slice_duration = (video_stream_duration - FE2_PNGEX_AUTO_EXPORT_START_TIME) / FE2_PNGEX_AUTO_EXPORT_COUNT first_png_time = FE2_PNGEX_AUTO_EXPORT_START_TIME
Subsequent PNG times will be calculated the final equation outlined in the FE2_PNGEX_AUTO_EXPORT_COUNT section.
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // set the first auto export time to 1 second sc = Flix2_FilterSetParam(png_exporter_plgn, FE2_PNGEX_AUTO_EXPORT_START_TIME, 1000);
Definition at line 289 of file png_export.h.
#define FE2_PNGEX_COMPRESSION_LEVEL |
Filter parameter for setting compression level used by libpng.
Notes from png.h:
Set the library compression level. Currently, valid values range from 0 - 9, corresponding directly to the zlib compression levels 0 - 9 (0 - no compression, 9 - "maximal" compression). Note that tests have shown that zlib compression levels 3-6 usually perform as well as level 9 for PNG images, and do considerably fewer caclulations. In the future, these values may not correspond directly to the zlib compression levels.
In addition to the above range, -1 corresponds to zlib's default value.
Definition at line 370 of file png_export.h.
#define FE2_PNGEX_ENABLE_ALPHA |
Filter parameter for preserving source video alpha channel data in exported PNG images.
If enabled, the PNG export filter preserves the source video alpha when exporting PNG images. This setting will only produce PNG images with alpha channels if encoding Flash 8 Video with Alpha.
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // enable alpha preservation sc = Flix2_FilterSetParam(png_exporter_plgn, FE2_PNGEX_ENABLE_ALPHA, on2true);
Definition at line 172 of file png_export.h.
#define FE2_PNGEX_EXPORT_CUE_POINTS |
Filter parameter for enabling export of PNG images at cue points.
If enabled, PNG images will be exported at event, navigation, or all cue points. See video_options_AddFLVCuePoint(), for information with regard to adding cue points to your output FLV file.
Use FE2_PNGEX_CP_EVENT, FE2_PNGEX_CP_NAV, or FE2_PNGEX_CP_ALL to specify the types of cue points for which the PNG exporter should export PNG images.
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // generate PNGs for all cue points sc = Flix2_FilterSetParam(png_exporter_plgn, FE2_PNGEX_EXPORT_CUE_POINTS, FE2_PNGEX_CP_ALL);
Definition at line 229 of file png_export.h.
#define FE2_PNGEX_EXPORT_FIRST_FRAME_PNG |
Filter parameter for enabling PNG image creation using the first video frame.
This parameter will force the PNG exporter to generate a PNG image from the first video frame in the input file.
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // create a PNG image of the first video frame sc = Flix2_FilterSetParam(png_exporter_plgn, FE2_PNGEX_EXPORT_FIRST_FRAME_PNG, on2true);
Definition at line 353 of file png_export.h.
#define FE2_PNGEX_EXPORT_INTERVAL |
Filter parameter for enabling PNG image export at a millisecond interval.
The PNG image exporter will export a PNG once every FE2_PNGEX_EXPORT_INTERVAL milliseconds if this parameter is specified in a call to Flix2_FilterSetParam()
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // generate a PNG every 10 seconds sc = Flix2_FilterSetParam(png_exporter_plgn, FE2_PNGEX_EXPORT_INTERVAL, 10000);
Definition at line 190 of file png_export.h.
#define FE2_PNGEX_EXPORT_TIME_STRING |
Filter parameter for setting a string of PNG export times in milliseconds.
The PNG exporter will create PNG images from the source video stream at the times specified in the string. The string MUST be in the format: t0
,t1,t2,tn
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // produce PNG images from the source video // at times of 5 seconds, 10 seconds, and 15 seconds sc = Flix2_FilterSetParamAsStr(png_exporter_plgn, FE2_PNGEX_EXPORT_TIME_STRING, "5000,10000,15000");
Definition at line 209 of file png_export.h.
#define FE2_PNGEX_FILENAME_PREFIX |
Filter parameter for setting PNG image file name prefix.
If a prefix is specified, PNG image files will be named in the format FE2_PNGEX_FILENAME_PREFIXpng_number.png. If a prefix is not specified, the file name passed to Flix2_SetOutputFile() will be used. If no prefix is desired, the prefix MUST be set to an empty string.
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // use prefix for PNG output file names sc = Flix2_FilterSetParamAsStr(png_exporter_plgn, FE2_PNGEX_FILENAME_PREFIX, "pngprefix");
Definition at line 136 of file png_export.h.
#define FE2_PNGEX_FILENAME_SUFFIX |
Filter parameter for setting PNG image file name suffix.
If a suffix is specified, PNG image files will be named in the format png_numberFE2_PNGEX_FILENAME_SUFFIX.png.
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // use suffix for PNG output file names sc = Flix2_FilterSetParamAsStr(png_exporter_plgn, FE2_PNGEX_FILENAME_SUFFIX, "pngsuffix");
Definition at line 154 of file png_export.h.
#define FE2_PNGEX_HEIGHT |
Filter parameter for setting PNG image height.
Definition at line 388 of file png_export.h.
#define FE2_PNGEX_OUTPUT_DIRECTORY |
Filter parameter for setting PNG image output directory.
If a directory is not specified, the PNG exporter will write PNG images to the directory specified in the path passed to Flix2_SetOutputFile().
For example, the following code will set the PNG export directory to /png/output/directory:
sc = Flix2_AddFilter(&png_exporter_plgn, flix, FE2_FILTER_PNGEX); if (sc == ON2_OK) // output PNGs to directory sc = Flix2_FilterSetParamAsStr(png_exporter_plgn, FE2_PNGEX_OUTPUT_DIRECTORY, "/png/output/directory");
Definition at line 118 of file png_export.h.
#define FE2_PNGEX_WIDTH |
Filter parameter for setting PNG image width.
Definition at line 379 of file png_export.h.
enum FE2_PNGExCuePtMode |
Constants for use with FE2_PNGEX_EXPORT_CUE_POINTS.
Definition at line 391 of file png_export.h.