ffmpeg api

http://ffmpeg-php.sourceforge.net/doc/api/ffmpeg_movie.php

ffmpeg_movie object methods
Method Description
$movie = new ffmpeg_movie(String path_to_media, boolean persistent) Open a video or audio file and return it as an object.
path_to_media - File path of video or audio file to open.
persistent - Whether to open this media as a persistent resource. See the PHP documentation for more info about persistent resources
$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->hasVideo() Return boolean value indicating whether the movie has a video stream.
$movie->getFrame([Integer framenumber]) Returns a frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found.
framenumber - Frame from the movie to return. If no framenumber is specified, returns the next frame of the movie.
$movie->getNextKeyFrame() Returns the next key frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值