小编Yoo*_*hoo的帖子

ffmpeg 在 libavutil 中缺少 config.h(没有此类文件或目录)CodeBlocks

当我在 CodeBlocks 中测试ffmepg 编码/解码 exapmle c 程序时,它显示:

/ffmpeg_sources/ffmpeg/libavutil/internal.h    fatal error: config.h: No such file or directory
Run Code Online (Sandbox Code Playgroud)

ffmpeg_source/libavutil文件夹中的许多其他头文件中发生错误。我搜索了该文件夹但没有找到 config.h 文件。其他文件夹中有 config.h,但不适用于 libavutil 文件夹中的头文件。

我尝试下载最新的 ffmepg zip 文件,但也找不到其中的 config.h 文件。

我应该在哪里找到该文件?

c c++ ffmpeg codeblocks

7
推荐指数
1
解决办法
1万
查看次数

ffmpeg AVFrame到opencv Mat转换

我目前正在研究一个使用ffmepg解码接收帧的项目,解码后,我想将AVFrame转换为opencv Mat帧,以便我可以在imShow函数上播放它.

我所拥有的是字节流,我将其读入缓冲区,解码为AVFrame:

f = fopen(filename, "rb");
if (!f) {
    fprintf(stderr, "Could not open %s\n", filename);
    exit(1);
}

frame = avcodec_alloc_frame();
if (!frame) {
    fprintf(stderr, "Could not allocate video frame\n");
    exit(1);
}

framergb = avcodec_alloc_frame();
if (!framergb) {
    fprintf(stderr, "Could not allocate video frame\n");
    exit(1);
}

bytes=avpicture_get_size(PIX_FMT_RGB24, CAMER_WIDTH, CAMER_HEIGHT);
buffer=(uint8_t *)av_malloc(bytes*sizeof(uint8_t));
avpicture_fill((AVPicture *)framergb, buffer, PIX_FMT_RGB24,
                CAMER_WIDTH, CAMER_HEIGHT);

frame_count = 0;
for(;;) {
    avpkt.size = fread(inbuf, 1, INBUF_SIZE, f);
    if (avpkt.size == 0)
        break;

    avpkt.data = inbuf;
    while (avpkt.size > 0) …
Run Code Online (Sandbox Code Playgroud)

c++ opencv ffmpeg video-streaming

4
推荐指数
1
解决办法
8980
查看次数

标签 统计

c++ ×2

ffmpeg ×2

c ×1

codeblocks ×1

opencv ×1

video-streaming ×1