【问题标题】:ffmpeg fade filter installed but not working?ffmpeg淡化过滤器已安装但无法正常工作?
【发布时间】:2011-11-05 04:55:47
【问题描述】:

我在运行 Apache 2.2.3 的 CentOS 5 服务器上运行 php 5.1.6

我安装了 ffmpeg 库,我的目标是将一组图像转换为幻灯片,每次图像交换都具有淡入/淡出效果。

命令 ffmpeg 说:

`FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 12 2011 03:37:39 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
  configuration:
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 1 /  0.16. 1
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.93. 0 / 52.93. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.74. 0 /  1.74. 0
  libswscale     0.12. 0 /  0.12. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

和命令 ffmpeg -filters 打印:

FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 12 2011 03:37:39 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
  configuration:
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 1 /  0.16. 1
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.93. 0 / 52.93. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.74. 0 /  1.74. 0
  libswscale     0.12. 0 /  0.12. 0
Filters:
anull            Pass the source unchanged to the output.
anullsrc         Null audio source, never return audio frames.
anullsink        Do absolutely nothing with the input audio.
copy             Copy the input video unchanged to the output.
crop             Crop the input video to width:height:x:y.
drawbox          Draw a colored box on the input video.
fifo             Buffer input images and send them when they are requested.
format           Convert the input video to one of the specified pixel formats.
gradfun          Debands video quickly using gradients.
hflip            Horizontally flip the input video.
noformat         Force libavfilter not to use any of the specified pixel formats for the input to the next filter.
null             Pass the source unchanged to the output.
overlay          Overlay a video source on top of the input.
pad              Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black).
pixdesctest      Test pixel format definitions.
scale            Scale the input video to width:height size and/or convert the image format.
setdar           Set the frame display aspect ratio.
setpts           Set PTS for the output video frame.
setsar           Set the pixel sample aspect ratio.
settb            Set timebase for the output link.
slicify          Pass the images of input video on to next video filter as multiple slices.
transpose        Transpose input video.
unsharp          Sharpen or blur the input video.
vflip            Flip the input video vertically.
buffer           Buffer video frames, and make them accessible to the filterchain.
color            Provide an uniformly colored input, syntax is: [color[:size[:rate]]]
nullsrc          Null video source, never return images.
nullsink         Do absolutely nothing with the input video.`

首先我的 ffmpeg 没有淡入淡出过滤器,因为它给出了错误

fade: filter not found

所以我安装了创建 vf_fade.c 的补丁,并对 ffmpeg 目录 libavfilters 的 Makefile 和 allfilters.c 文件进行了相应的更改。再次配置它然后还运行命令'make'和'make install'重新启动服务器,但仍然显示相同的错误

fade: filter not found

接下来我该怎么做?如果需要更多详细信息,请询问,我们将不胜感激所有帮助、想法和链接。

【问题讨论】:

  • ./configure 的输出是什么?
  • 也许在重新配置之前尝试“make clean”?

标签: php ffmpeg centos fade ffmpeg-php


【解决方案1】:

你真的需要 ffmpeg 吗?

听起来你可以达到同样的效果,甚至更好,只需使用 javascript。看看jQuery's fading API,看看这是否足以满足您的需求。

【讨论】:

  • -1。为什么假设这是一个网络问题?似乎作者试图将几张图像附加到一个视频文件中 - 特别是因为正在使用 ffmpeg。
  • @Seb 这不是他们问题的症结所在,但他们提到了他们的服务器 (I have php 5.1.6 running on my CentOS 5 server running Apache 2.2.3),并标记为 phpffmpeg-php
  • 拥有 PHP 和服务器并不意味着它是一个 Web 应用程序。 PHP 是一种脚本语言,可以用来做任何不一定与网络相关的事情。我曾经做过一个项目,一个PHP脚本负责对用户使用ffmpeg上传的视频进行转码,但在后台运行,与HTML无关。
  • @Seb 你用什么版本的 Apache 进行转码?也许 Astha 没有做任何与 Web 相关的事情,但 Apache + PHP 向我建议他们是,不管 PHP 还能用于什么。让我们等待他们澄清,而不是我们自己猜测。
  • 好吧,我正在开发一个网络应用程序,可以将图像转换为用户提供的视频。我使用 PHP 编写网站代码,使用 ffmpeg 生成视频。但是 ffmpeg 没有淡化过滤器,这给我带来了问题。但现在它完成了。谢谢你们俩
猜你喜欢
  • 2011-12-18
  • 2017-10-05
  • 2015-02-05
  • 2015-03-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多