相关疑难问题解答
From Ffmpeg工程组
- 问题一:
我想问一下, 这个SDK怎么通过avisynth 来支持rmvb? 我试了一下,装了avisynth 2.56后,尝试解码rmvb,但还是在打开解码器的时候出错了
- 对应解答:
写一个avisynth的script,然后把这个script做为ffmpeg.exe程序的输入参数即可。
Avisynth will use directshowsource plugin to support rmvb file decoding So, you must make sure your local system has the ability of decoding rmvb files by directshow, otherwise you will certainly fail to decode rmvb by avisynth
- 问题二:
我想做的是用ffmpeg+SDL学着ffplay做一个播放器,如果要支持rmvb的话,应该只能用Fastreaming的方法(在论坛的另外一个地方找到的方法)把rmvb的 codec编译到ffmpeg里面去,是吧?
- 对应解答:
Partly, yes But if you can wait, the native rmvb decoder of FFmpeg will be a available at the end of this year!
- 问题三:
SDK v3.0和最新下载的FFMpeg编译的库在VS2003作应用时Link都会报错啊,是不是FFMpeg源码有问题哦?
- 对应解答:
you should use extern C keyword in your C++ files:
#ifdef __cplusplus
extern "C"
{
#include "avcodec.h"
#include "avformat.h"
.....
}
#endif //__cplusplus
I have tested the SDK in VC++ 6.0/VS2003/VS2005
- 问题四:
发现一个奇怪的问题 V2.0的将avi视频转换为3gp格式没有问题; V3.0的转就有问题了 命令行: ffmpeg -y -i test.mpg -ac 1 -acodec libamr_nb -ar 8000 -s 176x144 -b 128 -r 15 test.3gp 出现下面的错误信息: ... [libamr_nb @ 66A32210]bitrate not supported: use one of 4.75k, 5.15k, 5.9k, 6.7k , 7.4k, 7.95k, 10.2k or 12.2k Error while opening codec for output stream #0.1 - maybe incorrect parameters su ch as bit_rate, rate, width or height
- 对应解答:
the msg told you you must specify the exactly bitrate when you use amr-nb codec try: ffmpeg -y -i test.mpg -ac 1 -acodec libamr_nb -ar 8000 -ab 12.2k -s 176x144 -b 128k -r 15 test.3gp
- 问题五:
acodec 不能指定為mp3了嗎? 不過看編譯選項里有--enable-libmp3lame啊?
- 对应解答:
try: -acodec libmp3lame instead of -acodec mp3
有关该问题的讨论帖可参考ffmpeg工程组论坛中的相关讨论:
有关ffmpeg FULL SDK V3.0发布的讨论
