ffmpeg问题收集

来源:互联网 发布:2017熊片数据库 编辑:程序博客网 时间:2024/04/30 05:53

1. 找不到avconfig.h

libavutil/avconfig.h是自动生成的

/* Generated by ffconf */


2. 'UINT64_C' was not declared in this scope

#ifndef   UINT64_C
#define   UINT64_C(value)__CONCAT(value,ULL)
#endif

3. 加入avc encoder

编译libx264

先下载x264,编译配置如下

./configure --disable-asm --enable-shared

make; make install

相应的头文件和库会被放到默认的/usr/local/include和/usr/local/lib下面,如果不用prefix。


编译ffmpeg

./configure --enable-libx264 --enable-gpl --disable-yasm --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib

make;make install

转出来的h264 profile不符合要求,在libx264.c强制改一下

网上也有说可以用下面方法,但是没试过,保留意见。

av_dict_set(&opts, "profile", "baseline", 0);/* open the codec */if (avcodec_open2(m_pEncoderCtx, encoder, &opts) < 0)


原创粉丝点击