GCC - how to compile FFMpeg with FLV1 (aka H.263), MP3 (format and codec) and FLV (container format) only?
So I want to compile FFMpeg C libraries (as static) not in its full default glory but for my purposes only - so that it would contain:
- 2 codec formats MP3 and FLV1 (H.263)
- 2 file (container) formats MP3 and FLV
Of course I only want to limit only range of formats and codecs. Not functions of FFmpeg.
How to do such thing?
What is my main point:
To have such ffmpeg build that when I call function like
multiplexer::multiplexer(std::string container)
{
av_register_all();
this->format_context = avformat_alloc_context();
if (this->format_context == NULL)
{
std::cout << "Multiplexer: format context is empty." << std::endl;
throw internal_exception();
}
this->format_context->oformat = av_guess开发者_运维百科_format(container.c_str(), NULL, NULL);
if (this->format_context->oformat == NULL)
{
std::cout << "Multiplexer: invalid container format (" << container << ")." << std::endl;
throw internal_exception();
}
}
I would be limited to FLV only
The configure
script has a list of options. Run ./configure --help
to see them. I'm not sure how options stack, but you could try --disable-everything
followed by --enable-demuxer=flv
etc.
精彩评论