On Wed, 12 Mar 2014 20:55:28 -0300 Gonzalo Garramuno <[email protected]> wrote:
> I am wondering, in code, what's the most reliable way to probe a file to > see if ffmpeg will open it. I can open a context and see the return > value. However, this returns true for image formats like jpeg, png, and > others and I find those handled better with other libraries. Is there a > way to have ffmpeg test to open only video codecs with no image codecs. > Currently the hack I have is: Personally I just use av_probe_input_format2() and accept the result only if it's at least "AVPROBE_SCORE_MAX / 4 + 1", which is documented as the recommended limit. I also don't set the filename, so no extension matching is performed. (Although I do a second pass with filename set, but only after I run my own image format checks.) _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
