Linux

ffmpeg常见问题

参数变更

-b 变为 -b:a-b:v (分别对应音频、视频)

Undefined constant or missing '(' in 'brdo'

[NULL @ 0x24ad080] [Eval @ 0x7fff89347970] Undefined constant or missing '(' in 'brdo'
[NULL @ 0x24ad080] Unable to parse option value "brdo+dct8x8+bpyramid"
[NULL @ 0x24ad080] Error setting option flags2 to value +brdo+dct8x8+bpyramid.

/usr/share/ffmpeg/libx264-fast_firstpass.ffpreset废弃的参数和值,根据提示信息移除;

FFmpeg-Presets

Unknown encoder 'libfaac'

Ubuntu提供的ffmpeg不支持libfaac。可以尝试以下3中方法:

  1. 编译ffmpeg。确定:
    1. 首先,安装libfaac-dev包;
    2. 然后,给./configure增加--enable-libfaac --enable-nonfree参数;
  2. 或者使用一个不同的AAC编码器:-acodec aac -strict experimental-acodec libvo_aacenc;
  3. 或者使用管道将ffmpeg输出给faac:
    ffmpeg -i input -f wav - | faac -o output.m4a -
    

CentOS6使用第二种方式解决问题(其他方法未做测试),即:
将命令中-acodec libfaac替换为-acodec libvo_aacenc;

原文地址: Unknown encoder 'libfaac' ubuntu 12.04 and ruby on rails 3

FFmpeg multi pass encoding

FFmpeg multi pass encoding

Cannot read file 'ffmpeg2pass-0.log': No such file or directory

原因:

  1. 没有执行pass 1(参见上一个问题);
  2. 日志文件目录没有写权限;

  3. Cannot read file 'ffmpeg2pass-0.log'

  4. Cannot write log file 'ffmpeg2pass-0.log' for pass-1 encoding: Permission denied

ffmpeg error while converting to mp4 Error while opening encoder for output stream #0.0