I’m following the example code here: http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/output-example_8c-source.html
My code is as follows:
fmt = av_guess_format(NULL, filename, NULL);
if (!fmt) {
LOGE(1,"Could not deduce output format from file extension: using MPEG.\n");
fmt = av_guess_format("mp4", NULL, NULL);
}
if (!fmt) {
LOGE(1, "Could not find suitable output format\n");
exit(1);
}
The two times that I call av_guess_format, it is returning NULL both times.
I am calling both av_register_all() and avcodec_register_all() beforehand.
Any ideas as to why this is returning NULL?
Thanks in advance.
av_guess_format was returning NULL because I hadn’t properly configured FFMPEG to allow for ANY formats.
I re-configured FFMPEG to allow mp4 and others, and now it works