FFMPEG API(特定格式编译)
我正在尝试编译 FFMPEG 以支持单一视频类型(*.mp4)。
当我编译所有内容时,一切都正常,但当我只使用单一格式时,我不希望有额外的开销。
这是我现在的编译标志(不适用于 MP4)。我确信还有其他编解码器/解码器需要专门启用,但我很难找到它们。
显示以下构建标志的编译器指令:
FLAGS="$FLAGS --disable-everything"
FLAGS="$FLAGS --enable-encoder=mpeg4video" ## This is the question, what all needs enabling?
我只是不太了解视频标准,无法确切地知道要打开哪些编解码器/编码器/等。
av_register_all();
avdevice_register_all();
byteCtx = av_alloc_put_byte(buffer, BUFFER_SIZE, 0, f, ReadFunc, NULL, SeekFunc);
if (!byteCtx) {
return;
}
// Open video file (here's the failure, doesn't happen when compiled for all)
inputFormat = av_find_input_format("MP4");
if (!inputFormat) {
LOGE(ANDROID_LOG_ERROR, "NDK:", "Null inputformat!");
return;
}
I am trying to compile FFMPEG to support a single video type (*.mp4).
I have everything working when I compile for all, but I do not want the extra over-head when I will only use a single format.
Here's my compile FLAGS now (non-working for MP4). I am sure there are other codecs/decoders I need to specifically enable, but am just having a hard time finding them.
Compiler directives showing the build flags below:
FLAGS="$FLAGS --disable-everything"
FLAGS="$FLAGS --enable-encoder=mpeg4video" ## This is the question, what all needs enabling?
I just do not know video standards well enough to know exactly which codecs / encoders / etc. to turn on.
av_register_all();
avdevice_register_all();
byteCtx = av_alloc_put_byte(buffer, BUFFER_SIZE, 0, f, ReadFunc, NULL, SeekFunc);
if (!byteCtx) {
return;
}
// Open video file (here's the failure, doesn't happen when compiled for all)
inputFormat = av_find_input_format("MP4");
if (!inputFormat) {
LOGE(ANDROID_LOG_ERROR, "NDK:", "Null inputformat!");
return;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是仅使用我需要的内容构建我的库的正确标志。可能有一两个仍然是不必要的,但库的大小现在是可以管理的。
Here's the proper FLAGS for building my libs with only what I needed. There may be one or two that are still unnecessary, but the size of the lib is manageable now.