ffmpeg_movie
class ffmpeg_movie (View source)
Methods
Open a video or audio file and return it as an object.
Return the duration of a movie or audio file in seconds.
Return the number of frames in a movie or audio file.
Return the frame rate of a movie in fps.
Return the path and name of the movie file or audio file.
Return the comment field from the movie or audio file.
Return the title field from the movie or audio file.
Return the author field from the movie or the artist ID3 field from an mp3 file.
Return the author field from the movie or the artist ID3 field from an mp3 file.
Return the copyright field from the movie or audio file.
Return the genre ID3 field from an mp3 file.
Return the track ID3 field from an mp3 file.
Return the year ID3 field from an mp3 file.
Return the height of the movie in pixels.
Return the width of the movie in pixels.
Return the pixel format of the movie.
Return the bit rate of the movie or audio file in bits per second.
Return the bit rate of the video in bits per second.
Return the audio bit rate of the media file in bits per second.
Return the audio sample rate of the media file in bits per second.
Return the current frame index.
Return the name of the video codec used to encode this movie as a string.
Return the name of the audio codec used to encode this movie as a string.
Return the number of audio channels in this movie as an integer.
Return boolean value indicating whether the movie has an audio stream.
Return boolean value indicating whether the movie has a video stream.
Returns a frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found.
Returns the next key frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found.
Details
__construct(string $path_to_media, bool $persistent)
Open a video or audio file and return it as an object.
int
getDuration()
Return the duration of a movie or audio file in seconds.
int
getFrameCount()
Return the number of frames in a movie or audio file.
int
getFrameRate()
Return the frame rate of a movie in fps.
string
getFilename()
Return the path and name of the movie file or audio file.
string
getComment()
Return the comment field from the movie or audio file.
string
getTitle()
Return the title field from the movie or audio file.
string
getAuthor()
Return the author field from the movie or the artist ID3 field from an mp3 file.
string
getArtist()
Return the author field from the movie or the artist ID3 field from an mp3 file.
string
getCopyright()
Return the copyright field from the movie or audio file.
string
getGenre()
Return the genre ID3 field from an mp3 file.
string|int
getTrackNumber()
Return the track ID3 field from an mp3 file.
string|int
getYear()
Return the year ID3 field from an mp3 file.
int
getFrameHeight()
Return the height of the movie in pixels.
int
getFrameWidth()
Return the width of the movie in pixels.
getPixelFormat()
Return the pixel format of the movie.
int
getBitRate()
Return the bit rate of the movie or audio file in bits per second.
int
getVideoBitRate()
Return the bit rate of the video in bits per second.
NOTE: This only works for files with constant bit rate.
int
getAudioBitRate()
Return the audio bit rate of the media file in bits per second.
int
getAudioSampleRate()
Return the audio sample rate of the media file in bits per second.
int
getFrameNumber()
Return the current frame index.
string
getVideoCodec()
Return the name of the video codec used to encode this movie as a string.
string
getAudioCodec()
Return the name of the audio codec used to encode this movie as a string.
int
getAudioChannels()
Return the number of audio channels in this movie as an integer.
bool
hasAudio()
Return boolean value indicating whether the movie has an audio stream.
bool
hasVideo()
Return boolean value indicating whether the movie has a video stream.
ffmpeg_frame
getFrame(int $framenumber)
Returns a frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found.
ffmpeg_frame
getNextKeyFrame()
Returns the next key frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found.