编译FFMPEG教程程序
我如何编译 FFMPEG 中给出的示例程序。我无法编译我得到的 错误为 CODEC_TYPE_VIDEO 未声明。任何人都可以建议我如何编译程序。我正在使用 ubuntu 11。
这是第一个示例:
$ gcc -o tutorial01 tutorial01.c -lavutil -lavformat -lavcodec -lz
这是我得到的输出:
tutorial01.c: In function ‘main’: tutorial01.c:77:3: warning: ‘dump_format’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1462)
tutorial01.c:82:51: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
tutorial01.c:82:51: note: each undeclared identifier is reported only once for each function it appears in
版本信息:
ffmpeg version git-N-30430-ga52f598, Copyright (c) 2000-2011 the FFmpeg developers
built on May 31 2011 14:21:08 with gcc 4.5.2
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 51. 3. 0 / 51. 3. 0
libavcodec 53. 6. 1 / 53. 6. 1
libavformat 53. 2. 0 / 53. 2. 0
libavdevice 53. 1. 0 / 53. 1. 0
libavfilter 2. 11. 0 / 2. 11. 0
libswscale 0. 14. 0 / 0. 14. 0
libpostproc 51. 2. 0 / 51. 2. 0
How do i compile the sample programs given in FFMPEG. i am not able to compile as i get
error as CODEC_TYPE_VIDEO undeclared. Can any one please suggest me how to compile the programs. I am using ubuntu 11.
This is the first example:
$ gcc -o tutorial01 tutorial01.c -lavutil -lavformat -lavcodec -lz
This is the output I got:
tutorial01.c: In function ‘main’: tutorial01.c:77:3: warning: ‘dump_format’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1462)
tutorial01.c:82:51: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
tutorial01.c:82:51: note: each undeclared identifier is reported only once for each function it appears in
Version info:
ffmpeg version git-N-30430-ga52f598, Copyright (c) 2000-2011 the FFmpeg developers
built on May 31 2011 14:21:08 with gcc 4.5.2
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 51. 3. 0 / 51. 3. 0
libavcodec 53. 6. 1 / 53. 6. 1
libavformat 53. 2. 0 / 53. 2. 0
libavdevice 53. 1. 0 / 53. 1. 0
libavfilter 2. 11. 0 / 2. 11. 0
libswscale 0. 14. 0 / 0. 14. 0
libpostproc 51. 2. 0 / 51. 2. 0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将
CODEC_TYPE_VIDEO
替换为AVMEDIA_TYPE_VIDEO
。您可能会遇到其他差异。考虑寻找更新的教程。Try replacing
CODEC_TYPE_VIDEO
withAVMEDIA_TYPE_VIDEO
. You may run into other differences. Consider finding newer tutorial.