ffmpeg # avformat_find_stream_info

weixin_33716557發表於2018-08-16
/**
 * Read packets of a media file to get stream information. This
 * is useful for file formats with no headers such as MPEG. This
 * function also computes the real framerate in case of MPEG-2 repeat
 * frame mode.
 * The logical file position is not changed by this function;
 * examined packets may be buffered for later processing.
 *
 * @param ic media file handle
 * @param options  If non-NULL, an ic.nb_streams long array of pointers to
 *                 dictionaries, where i-th member contains options for
 *                 codec corresponding to i-th stream.
 *                 On return each dictionary will be filled with options that were not found.
 * @return >=0 if OK, AVERROR_xxx on error
 *
 * @note this function isn't guaranteed to open all the codecs, so
 *       options being non-empty at return is a perfectly normal behavior.
 *
 * @todo Let the user decide somehow what information is needed so that
 *       we do not waste time getting stuff the user does not need.
 */
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);

avformat_find_stream_info是為了Read packets of a media file to get stream information.
也就是可以讀取一部分視音訊資料並且獲得一些相關的資訊

1720840-65679d0a95e25f08.png
avformat_find_stream_info呼叫
1720840-08e594a84ef7c1c0.png
avformat_find_stream_info.png

References:

https://blog.csdn.net/leixiaohua1020/article/details/44084321

相關文章