找不到预设文件

时间:2010-11-22 15:20:17

标签: ffmpeg preset

这是一个ffmpeg问题。我有这个错误,说它无法找到hq预设文件,然后我在文档中读到它在'PREFIX / share / ffmpeg'以及'$ HOME / .ffmpeg'中查找预设文件。问题是我从一个调用python脚本的php文件调用ffmpeg,这个脚本最终执行类似'commands.getstatusoutput(command)'的命令,所以我不确定用户是谁。

解决方案?我刚刚使用了-fpre,现在我的调用看起来像这样:

/ usr / local / bin / ffmpeg -i ../files/tmpvideos/myStream.flv -y -acodec libfaac -ab 96k -b 800k -maxrate 800k -minrate 600k -bufsize 800k -s 720x640 -vcodec libx264 - g 300 -r 20 -fpre /home/admin/.ffmpeg/libx264-hq.ffpreset -threads 0 ../ files / tmpvideos / 4647-60.mp4

我在/ home / admin下创建了该目录,并且100%确定现在该文件存在,但仍然ffmpeg说:

File for preset '/home/admin/.ffmpeg/libx264-hq.ffpreset' not found

所以我不确定为什么它不起作用,因为我现在正在指定完整的路径。有什么想法吗?

我正在考虑的一个原因是它可能没有正确编译,就像所有的标志和东西一样。我的意思是,虽然有些输出看起来像这样:

FFmpeg version SVN-r22976, Copyright (c) 2000-2010 the FFmpeg developers
  built on Apr 30 2010 12:03:12 with gcc 4.2.1-sjlj (mingw32-2)
  configuration: --enable-shared --enable-static --enable-memalign-hack
--enable
-libmp3lame --enable-libx264 --enable-gpl
  libavutil     50.14. 0 / 50.14. 0
  libavcodec    52.66. 0 / 52.66. 0
  libavformat   52.61. 0 / 52.61. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.10. 0 /  0.10. 0
我的看起来更像是这样:

Output: FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Nov 12 2010 16:32:38 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
  configuration:
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0

没有配置资料。你怎么看?可能是这个ffmpeg没有正确编译所以它永远不会找到预设?我没有编译它,所以无法确定。

对此问题的冗长表示感谢和抱歉。

纳尔逊

1 个答案:

答案 0 :(得分:8)

嗯..事实证明我使用的ffmpeg没有被编译为使用h.264编解码器,这就是为什么它没有寻找预设。

要解决此问题,我或多或少都遵循此链接中描述的步骤:http://www.pawprint.net/news/?action=view&nid=105

有些东西已经安装好了,所以我没有做那里描述的所有事情,但是导游肯定帮了我很多忙。希望它能帮助其他人也有同样的问题。

纳尔逊