Up

ffmpeg_frame object methods
Method Description
$frame = new ffmpeg_frame(Resource gd_image) Create a frame object from a GD image.

NOTE: This function will not be available if GD is not enabled.

$frame->getWidth() Return the width of the frame.
$frame->getHeight() Return the height of the frame.
$frame->getPTS() alias $frame->getPresentationTimestamp() Return the presentation time stamp of the frame.
$frame->resize(Integer width, Integer height [, Integer crop_top [, Integer crop_bottom [, Integer crop_left [, Integer crop_right ]]]]) Resize and optionally crop the frame. (Cropping is built into ffmpeg resizing so I'm providing it here for completeness.)
  • width - New width of the frame (must be an even number).
  • height - New height of the frame (must be an even number).
  • croptop - Remove [croptop] rows of pixels from the top of the frame.
  • cropbottom - Remove [cropbottom] rows of pixels from the bottom of the frame.
  • cropleft - Remove [cropleft] rows of pixels from the left of the frame.
  • cropright - Remove [cropright] rows of pixels from the right of the frame.

NOTE: Cropping is always applied to the frame before it is resized. Crop values must be even numbers.
$frame->crop(Integer crop_top [, Integer crop_bottom [, Integer crop_left [, Integer crop_right ]]]) Crop the frame.
  • croptop - Remove [croptop] rows of pixels from the top of the frame.
  • cropbottom - Remove [cropbottom] rows of pixels from the bottom of the frame.
  • cropleft - Remove [cropleft] rows of pixels from the left of the frame.
  • cropright - Remove [cropright] rows of pixels from the right of the frame.

NOTE: Crop values must be even numbers.
$frame->toGDImage() Returns a truecolor GD image of the frame.

NOTE: This function will not be available if GD is not enabled.

SourceForge.net Logo