一、安装环境 1、安装SDL SDL是一个开源的多媒体开发库,可以设置图像和视频的绘制等操作。如果不安装SDL,FFMPEG将不能生成ffplay.exe播放器。在Ubuntu下安装SDL也很简单,只需要依次执行下列命令: sudo apt-get install libsdl1.2-dev sudo apt-get install libsdl-image1.2-dev sudo apt-get install libsdl-mixer1.2-dev sudo apt-get install libsdl-ttf2.0-dev sudo apt-get install gfx1.2-dev 注:ffmpeg4.2.7以后的版本要下libsdl2-dev 1.2不需要了(然后他是默认安装到/usr/lib/x86_ubuntu里的。so 需要把链接接外部更新路径维护到ld.so.conf) 2、安装yasm,执行以下命令: sudo apt-get install yasm 3、安装ffmpeg依赖的几个编解码库,依次执行以下命令: sudo apt-get install libx264-dev sudo apt-get install libfaac-dev sudo apt-get install libvo-aacenc-dev sudo apt-get install libmp3lame-dev sudo apt-get install libfaad-dev 4、安装其他依赖库: sudo apt-get install build-essential subversion git-core checkinstall texi2html libtheora-dev libx11-dev libxvidcore-dev zlib1g-dev libopencore-amrnb-dev libopencore-amrwb-dev 5、下载ffmpeg: git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg 6、进入ffmpeg目录执行以下命令,完成编译、安装: ./configure --enable-shared --enable-static --enable-pthreads --enable-gpl(264必须装这个) --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxcb(捕捉event) --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-version3 --disable-optimizations --disable-asm --enable-doc --enable-ffplay (#############################################################################系统默认优先使用动态库,动态库小但需要链接更新 linux下调用动态库.so文件时提示: cannot open shared object file: No such file or directory 动态库需要链接到外部:解决方法: 1、临时变量设置动态库链接路径 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 2、修改共享库配置文件/etc/ld.so.conf : sudo gedit /etc/ld.so.conf 添加路径 include /etc/ld.so.conf.d/*.conf /usr/local/lib sudo ldconfig(生效) #############################################################################) make -j8 sudo make install 然后,就可以看到,在/usr/local/bin中,ffmpeg.exe/ffplay.exe/ffprob.exe已经生成了。在命令行中可以使用ffplay.exe播放视频文件了。 二、 把demo运行起来 cmake_minimum_required(VERSION 3.20) project(untitled) set(CMAKE_CXX_STANDARD 17) add_executable(untitled main.cpp) target_link_libraries(untitled PUBLIC avcodec avutil avdevice swresample pthread z lzma) 三、yuv官网下载yuv裸流,并用ffmpeg命令编解码 0、使用ffplay播放yuv码流(也可以播放RGB码流) ffplay -pixel_format yuv420p -video_size 320x240 -framerate 5 yuv420p_320x240.yuv 1、生成264码流(yuv---->h264) ffmpeg -s 352*288(分辨率) -i ./foreman_cif.yuv(文件路径文件名) -vcodec libx264(编码协议) test.h264(输出文件) 四、编译ffmpeg的264demo遇到的问题error: 原因:使用了的临时变量作为返回值,因此报错 static inline char *av_make_error_string(char *errbuf, size_t errbuf_size, int errnum) { av_strerror(errnum, errbuf, errbuf_size); return errbuf; } #define av_err2str(errnum) \ av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum) 参考 normalize_ts.cpp:217:49: error: taking address of temporary array · Issue #5 · joncampbell123/composite-video-simulator · GitHubav_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5av_err2str makes use of C array constructs that break newer versions of G++. See: https://ffmpeg.org/pipermail/libav-user/2013-January/003458.html Error: In file included from normalize_ts.cpp:37:0: normalize_ts.cpp:217:49: error: taking...https://github.com/joncampbell123/composite-video-simulator/issues/5 方案一: #undef av_err2str #define av_err2str(errnum) \ av_make_error_string((char*)__builtin_alloca(AV_ERROR_MAX_STRING_SIZE), AV_ERROR_MAX_STRING_SIZE, errnum) 方案二: #ifdef av_err2str #undef av_err2str #include <string> av_always_inline std::string av_err2string(int errnum) { char str[AV_ERROR_MAX_STRING_SIZE]; return av_make_error_string(str, AV_ERROR_MAX_STRING_SIZE, errnum); } #define av_err2str(err) av_err2string(err).c_str() #endif // av_err2str