ffmpeg-php API Doc
ETC/Project : 2007/04/03 12:19
원문 : http://ffmpeg-php.sourceforge.net/apidoc.php
ffmpeg_movie object methods
| Method | Description |
| $movie = new ffmpeg_movie(String path_to_movie, boolean persistent) | Open a movie or audio file and Return it as an object.
|
| $movie->getDuration() | Return the duration of a movie or audio file in seconds. |
| $movie->getFrameCount() | Return the number of frames in a movie or audio file. |
| $movie->getFrameRate() | Return the frame rate of a movie in fps. |
| $movie->getFilename() | Return the path and name of the movie file or audio file. |
| $movie->getComment() | Return the comment field from the movie or audio file. |
| $movie->getTitle() | Return the title field from the movie or audio file. |
| $movie->getAuthor() alias $movie->getArtist() | Return the author field from the movie or the artist ID3 field from an mp3 file. |
| $movie->getCopyright() | Return the copyright field from the movie or audio file. |
| $movie->getArtist() | Return the artist ID3 field from an mp3 file. |
| $movie->getGenre() | Return the genre ID3 field from an mp3 file. |
| $movie->getTrackNumber() | Return the track ID3 field from an mp3 file. |
| $movie->getYear() | Return the year ID3 field from an mp3 file. |
| $movie->getFrameHeight() | Return the height of the movie in pixels. |
| $movie->getFrameWidth() | Return the width of the movie in pixels. |
| $movie->getPixelFormat() | Return the pixel format of the movie. |
| $movie->getBitRate() | Return the bit rate of the movie or audio file in bits per second. |
| $movie->getVideoBitRate() | Return the bit rate of the video in bits per second.
NOTE: This only works for files with constant bit rate. |
| $movie->getAudioBitRate() | Return the audio bit rate of the media file in bits per second. |
| $movie->getAudioSampleRate() | Return the audio sample rate of the media file in bits per second. |
| $movie->getFrameNumber() | Return the current frame index. |
| $movie->getVideoCodec() | Return the name of the video codec used to encode this movie as a string. |
| $movie->getAudioCodec() | Return the name of the audio codec used to encode this movie as a string. |
| $movie->getAudioChannels() | Return the number of audio channels in this movie as an integer. |
| $movie->hasAudio() | Return boolean value indicating whether the movie has an audio stream. |
| $movie->getFrame([Integer framenumber]) | Returns a frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found.
|
| $movie->getNextKeyFrame() | Returns the next key frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found. |
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.)
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.
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. |
ffmpeg_animated_gif object methods
| Method | Description |
| $gif = new ffmpeg_animated_gif(String output_file_path, Integer width, Integer height, Integer frame_rate, [Integer loop_count]) | create a new ffmpeg_animated_gif object
|
| $frame->addFrame(ffmpeg_frame frame_to_add) | Add a frame to the end of the animated gif.
|
Trackback Address :: http://jjangu.pe.kr/blog/trackback/395



