/**
* Print detailed information about the input or output format, such as
* duration, bitrate, streams, container, programs, metadata, side data,
* codec and time base.
*
* @param ic the context to analyze
* @param index index of the stream to dump information about
* @param url the URL to print, such as source or destination file
* @param is_output Select whether the specified context is an input(0) or output(1)
*/
void av_dump_format(AVFormatContext *ic,
int index,
const char *url,
int is_output);
#include <stdio.h>
#include "libavutil/avutil.h"
#include "libavformat/avformat.h"
int test_av_dump_format()
{
AVFormatContext *acfctx = NULL;
avformat_open_input(&acfctx, "test.mp4", NULL, NULL);
avformat_find_stream_info(acfctx, NULL);
av_dump_format(acfctx, 0, "test.mp4", 0);
}
int main()
{
test_av_dump_format();
printf("Hello World!\n");
printf("Hello FFMPEG, version is %s\n", av_version_info());
return 0;
}
av_dump_format
于 2023-08-07 19:20:16 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)