[Libav-user] detecting format compatibility

Anton Shekhovtsov shekh.anton at gmail.com
Wed Dec 6 15:01:05 EET 2017


Hello,
I am looking for a generic method to detect if specific codec-container
combination would "work".
I tested this approach:
Prepare writing to memory buffer and execute just avformat_write_header
and av_write_trailer (no actual packets).
If neither function returns an error, assume the formats are compatible.

This seems to solve great part of the problem, but there are exceptions:
pcm in mp4 is successful (no errors reported), but results in unreadable
audio (I can handle this case otherwise if it is unique).
In some cases the reason for error is something else, like "framerate 1:1
is not supported".

Thanks for any ideas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20171206/835c818f/attachment.html>


More information about the Libav-user mailing list