为什么dump .flv 不能输出完整的信息
来源:5-8 FFmpeg打印音视频Meta信息

渐渐习惯
2019-07-28
av_dump_format() dump .flv文件, 不能输出完整的信息
我的代码:
#include <libavutil/log.h>
#include <libavformat/avformat.h>
int main(int argc, char const *argv[])
{
av_log_set_level(AV_LOG_INFO);
// avdevice_register_all();
if (argc < 2){
av_log(NULL, AV_LOG_ERROR, "输入参数有误
", NULL);
return -1;
}
const char *path = argv[1];
AVFormatContext *fmt_ctx = NULL;
int ret = avformat_open_input(&fmt_ctx, path, NULL, NULL);
if (ret < 0){
av_log(NULL, AV_LOG_ERROR, "Can't open file: %s
", av_err2str(ret));
return -1;
}
av_dump_format(fmt_ctx, 0, path, 0);
avformat_close_input(&fmt_ctx);
return 0;
}
写回答
2回答
-
李超
2019-07-30
去群咱们群里问吧,你的情况太复杂!
00 -
李超
2019-07-28
你用ffmpeg 命令我试试,是不是你的视频有问题?
012019-07-28
相似问题