Ffmpeg 打印音视频Meta数据

562282-4d094ac7c12b34d9.png

#include <libavutil/log.h>

#include <libavformat/avformat.h>

int main(int argc, char *argv[]) 

{

int ret;

AVFormatContext *fmt_ctx = NULL;

av_log_set_level(AV_LOG_INFO);

av_register_all();

ret = avformat_open_input(&fmt_ctx, "./002.mp4", NULL, NULL);

if (ret < 0) {

av_log(NULL, AV_LOG_ERROR, "Cant open file: %s\n", av_err2str(ret));

return -1;

}

av_dump_format(fmt_ctx, 0, "./002.mp4", 0);

avformat_close_input(&fmt_ctx);

return 0;

}



562282-5d69d61c420cd456.png

猜你喜欢

转载自blog.csdn.net/weixin_34072458/article/details/87088844