【问题标题】:Converting video using php使用php转换视频
【发布时间】:2011-05-12 08:01:04
【问题描述】:

我们可以通过 ffmpeg-php 扩展名将视频文件转换为 .flv 格式,但是我们如何将 .flv 转换为其他格式,我搜索了但没有找到解决方案...

//ececute ffmpeg generate flv
  exec('ffmpeg -i '.$uploadfile.' -f flv -s 320x240 '.$new_flv.'');

// But can we this, convert it to mpeg..
  exec('ffmpeg -i '.$uploadfile.' -f mpg -s 320x240 '.$new_flv.'');

//execute ffmpeg and create thumb
  exec('ffmpeg  -i '.$uploadfile.' -f mjpeg -vframes 1 -s 150x150 -an '.$new_image_path.'');

或者,有没有像(ffmpeg)这样的php api来做到这一点......???

【问题讨论】:

  • ffmpeg 是最好的。尝试在 ffmpeg 论坛上发布此问题。 exec 将运行您的命令。只是担心让ffmpeg正确。它是从终端运行的吗?
  • 这里我只想建议,如果有人知道替代方式......

标签: php


【解决方案1】:

回复在documentation,但这里有一些command examples,我觉得很有用

祝你好运

【讨论】:

  • ffmpeg -i video_origine.flv video_finale.avi
  • 是的,我还找到了一些将 flv 转换为 mpeg 格式的命令,Ffmpeg -i video.flv -ab 56 -ar 22050 -b 500 -s 320×240 video.mpg 谢谢。
猜你喜欢
  • 2010-12-26
  • 1970-01-01
  • 1970-01-01
  • 2018-02-14
  • 2011-07-27
  • 2015-06-14
  • 2015-10-07
  • 1970-01-01
相关资源
最近更新 更多