为什么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

去群咱们群里问吧,你的情况太复杂!

0
0

李超

2019-07-28

你用ffmpeg 命令我试试,是不是你的视频有问题?

0
1
渐渐习惯
ffmpeg -i test.flv 是可以的
2019-07-28
共1条回复

经典再升级-FFmpeg5.0核心技术精讲,打造音视频播放器

学好FFmpeg核心技术,做高效,高薪,有竞争力的音视频工程师

2732 学习 · 814 问题

查看课程