当前位置: 首页 > news >正文 给人做网站赚钱吗社交做的最好的网站有哪些 news 2025/10/30 8:13:20 给人做网站赚钱吗,社交做的最好的网站有哪些,广告优化师的职业规划,wordpress 禁用admin文章目录 前言前提须知为什么要自己编译 FFmpeg前提软件包与工具的安装编译ffmpeg写CMakeList.txt包含ffmpeg到我们项目中 总结 前言 FFmpeg 是一个领先的多媒体框架#xff0c;能够解码、编码、转码、复用、解复用、流化、过滤和播放几乎所有人类和机器创造的内容。FFmpeg 包… 文章目录 前言前提须知为什么要自己编译 FFmpeg前提软件包与工具的安装编译ffmpeg写CMakeList.txt包含ffmpeg到我们项目中 总结 前言 FFmpeg 是一个领先的多媒体框架能够解码、编码、转码、复用、解复用、流化、过滤和播放几乎所有人类和机器创造的内容。FFmpeg 包含 libavcodec这是一个可以用来处理音频和视频数据的强大库。本文将介绍如何在 Ubuntu 上编译 FFmpeg并创建一个使用 CMake 的示例项目以验证 FFmpeg 库的正确安装和配置。 前提须知 其实我们不必自己编译ffmpeg如果你的ubuntu已经安装了ffmpeg的话你可以在/usr/include/x86_64-linux-gnu找到ffmpeg的头文件。在/usr/lib/x86_64-linux-gnu里面可以找到.a静态库 如果你使用这种方式你可以有下面这个CMakeLists.txt文件 cmake_minimum_required(VERSION 3.10) project(ffmpeg_test)# 设置C标准 set(CMAKE_C_STANDARD 99)# 查找FFmpeg库 find_package(PkgConfig REQUIRED) pkg_check_modules(AVFORMAT REQUIRED libavformat) pkg_check_modules(AVCODEC REQUIRED libavcodec) pkg_check_modules(AVUTIL REQUIRED libavutil)# 包含FFmpeg头文件路径 include_directories(${AVFORMAT_INCLUDE_DIRS}) include_directories(${AVCODEC_INCLUDE_DIRS}) include_directories(${AVUTIL_INCLUDE_DIRS})# 添加可执行文件 add_executable(ffmpeg_test main.c)# 链接FFmpeg库 target_link_libraries(ffmpeg_test ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${AVUTIL_LIBRARIES})并有这样的main文件 #include stdio.h #include include/libavcodec/avcodec.h #include include/libavformat/avformat.h #include include/libavutil/avutil.hint main() {printf(FFmpeg version: %s\n, av_version_info());return 0; }我们可以通过cmake ..make的操作来得到可执行文件 ubuntuubuntu-virtual-machine:~/MyFFMPEG/template_c$ ls build CMakeLists.txt include lib main.c ubuntuubuntu-virtual-machine:~/MyFFMPEG/template_c$ cd build/ ubuntuubuntu-virtual-machine:~/MyFFMPEG/template_c/build$ cmake .. -- Configuring done -- Generating done -- Build files have been written to: /home/ubuntu/MyFFMPEG/template_c/build ubuntuubuntu-virtual-machine:~/MyFFMPEG/template_c/build$ make Consolidate compiler generated dependencies of target ffmpeg_test [100%] Built target ffmpeg_test ubuntuubuntu-virtual-machine:~/MyFFMPEG/template_c/build$ ./ffmpeg_test FFmpeg version: 7.0.1 ubuntuubuntu-virtual-machine:~/MyFFMPEG/template_c/build$ 为什么要自己编译 FFmpeg 自己编译 FFmpeg 而不是使用预编译包有几个主要原因 最新版本 预编译包通常与发行版的发布周期一致可能并不是最新的。通过自己编译可以确保使用最新的 FFmpeg 版本获取最新的特性和修复。 自定义配置 编译 FFmpeg 时可以指定各种配置选项例如启用或禁用特定的编码器、解码器、滤镜或其他组件。这对于需要定制功能的项目尤为重要。 优化性能 可以根据目标硬件的架构进行特定的编译优化例如启用高级的 CPU 指令集如 AVX、SSE以提高性能。 减少依赖 预编译包可能包含不需要的功能和依赖项通过自己编译可以仅包含项目所需的功能从而减少不必要的依赖和潜在的安全风险。 集成第三方库 有时需要与其他第三方库集成例如 NVIDIA CUDA、Intel Quick Sync Video 等通过自己编译可以轻松实现这些集成。 通过自己编译 FFmpeg可以更好地控制其功能和性能满足特定项目的需求。 前提软件包与工具的安装 首先你需要在ffmpeg code download下载ffmpeg源码如果你需要其他版本可以在More releases里面找到 然后你需要使用下面这个命令安装SDL2 sudo apt install libsdl2-dev之后你需要安装aptitude sudo apt install aptitudeyasm、nasm是两个汇编器编译 FFmpeg 需要用到。 sudo aptitude install yasm nasm最后你需要安装这些 FFmpeg 的安装依赖许多库如音频编码库音频解码库视频编解码库等这里不介绍每个库的具体作用按照命令安装即可。 sudo apt-get install libgmp3-dev sudo apt install pkg-config sudo apt install gnutls-bin sudo aptitude install libaom-dev sudo aptitude install libass-dev sudo aptitude install libbluray-dev sudo aptitude install libfdk-aac-dev sudo aptitude install libmp3lame-dev sudo aptitude install libopencore-amrnb-dev sudo aptitude install libopencore-amrwb-dev sudo aptitude install libopenmpt-dev sudo aptitude install libopus-dev sudo aptitude install libshine-dev sudo aptitude install libsnappy-dev sudo aptitude install libsoxr-dev sudo aptitude install libspeex-dev sudo aptitude install libtheora-dev sudo aptitude install libtwolame-dev sudo aptitude install libvo-amrwbenc-dev sudo aptitude install llibvpx-dev sudo aptitude install libwavpack-dev sudo aptitude install libwebp-dev sudo aptitude install libx264-dev sudo aptitude install libx265-dev sudo aptitude install libxvidcore-dev sudo aptitude install liblzma-dev编译ffmpeg 首先你需要先新建一个文件夹用来保存编译后存放的内容 然后终端打开ffmpeg源码文件夹 ./configure --prefix/home/ubuntu/runffmpeg/FFMPEG --enable-shared输出 ubuntuubuntu-virtual-machine:~/runffmpeg/ffmpeg-7.0.1$ ./configure --prefix/home/ubuntu/runffmpeg/FFMPEG --enable-shared install prefix /home/ubuntu/runffmpeg/FFMPEG source path . C compiler gcc C library glibc ARCH x86 (generic) big-endian no runtime cpu detection yes standalone assembly yes x86 assembler nasm MMX enabled yes MMXEXT enabled yes 3DNow! enabled yes 3DNow! extended enabled yes SSE enabled yes SSSE3 enabled yes AESNI enabled yes AVX enabled yes AVX2 enabled yes AVX-512 enabled yes AVX-512ICL enabled yes XOP enabled yes FMA3 enabled yes FMA4 enabled yes i686 features enabled yes CMOV is fast yes EBX available yes EBP available yes debug symbols yes strip symbols yes optimize for size no optimizations yes static yes shared yes postprocessing support no network support yes threading support pthreads safe bitstream reader yes texi2html enabled no perl enabled yes pod2man enabled yes makeinfo enabled yes makeinfo supports HTML yes xmllint enabled noExternal libraries: alsa libxcb_shape lzma xlib iconv libxcb_shm sdl2 zlib libxcb libxcb_xfixes sndio //省略..................................... External libraries providing hardware acceleration: libdrm v4l2_m2m vaapi vdpauLibraries: avcodec avfilter avutil swscale avdevice avformat swresamplePrograms: ffmpeg ffplay ffprobe //省略............................................ Enabled indevs: alsa kmsgrab oss v4l2 fbdev lavfi sndio xcbgrabEnabled outdevs: alsa oss sndio xv fbdev sdl2 v4l2License: LGPL version 2.1 or later紧接着你需要使用: sudo make-jxx其中xx是你Ubuntu cpu核心数 比如我是12则是sudo make-j12 如果不这样写就会编译的很慢 最后使用: sudo make install即可完成 ubuntuubuntu-virtual-machine:~/runffmpeg/FFMPEG$ tree -L 2 . ├── bin │ ├── ffmpeg │ ├── ffplay │ └── ffprobe ├── include │ ├── libavcodec │ ├── libavdevice │ ├── libavfilter │ ├── libavformat │ ├── libavutil │ ├── libswresample │ └── libswscale ├── lib │ ├── libavcodec.a │ ├── libavcodec.so - libavcodec.so.61.3.100 │ ├── libavcodec.so.61 - libavcodec.so.61.3.100 │ ├── libavcodec.so.61.3.100 │ ├── libavdevice.a │ ├── libavdevice.so - libavdevice.so.61.1.100 │ ├── libavdevice.so.61 - libavdevice.so.61.1.100 │ ├── libavdevice.so.61.1.100 │ ├── libavfilter.a │ ├── libavfilter.so - libavfilter.so.10.1.100 │ ├── libavfilter.so.10 - libavfilter.so.10.1.100 │ ├── libavfilter.so.10.1.100 │ ├── libavformat.a │ ├── libavformat.so - libavformat.so.61.1.100 │ ├── libavformat.so.61 - libavformat.so.61.1.100 │ ├── libavformat.so.61.1.100 │ ├── libavutil.a │ ├── libavutil.so - libavutil.so.59.8.100 │ ├── libavutil.so.59 - libavutil.so.59.8.100 │ ├── libavutil.so.59.8.100 │ ├── libswresample.a │ ├── libswresample.so - libswresample.so.5.1.100 │ ├── libswresample.so.5 - libswresample.so.5.1.100 │ ├── libswresample.so.5.1.100 │ ├── libswscale.a │ ├── libswscale.so - libswscale.so.8.1.100 │ ├── libswscale.so.8 - libswscale.so.8.1.100 │ ├── libswscale.so.8.1.100 │ └── pkgconfig └── share├── doc├── ffmpeg└── man15 directories, 31 files这里面是我们需要的东西了我们需要include和lib(*.a)里面的东西 写CMakeList.txt包含ffmpeg到我们项目中 下面就是我们的CMakeLists.txt文件了你需要把include和lib文件夹放到CMakeLists.txt同级目录下 cmake_minimum_required(VERSION 3.10) project(ffmpeg_test C)# 设置 C 标准 set(CMAKE_C_STANDARD 99)# 指定 FFmpeg 的头文件和库文件目录 set(FFMPEG_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include) set(FFMPEG_LIB_DIR ${CMAKE_SOURCE_DIR}/lib)# 包含 FFmpeg 头文件目录 include_directories(${FFMPEG_INCLUDE_DIR})# 查找 FFmpeg 库 link_directories(${FFMPEG_LIB_DIR})# 添加可执行文件 add_executable(ffmpeg_test main.c)# 链接 FFmpeg 库 target_link_libraries(ffmpeg_testavcodecavformatavutil )# 为了支持动态库可以添加 -Wl,-rpath${FFMPEG_LIB_DIR} 选项 set_target_properties(ffmpeg_test PROPERTIESLINK_FLAGS -Wl,-rpath,${FFMPEG_LIB_DIR} ) 总结 通过本文的步骤我们成功地在 Ubuntu 系统上编译并安装了 FFmpeg。我们还创建了一个简单的 CMake 项目使用 FFmpeg 库实现了一个基础的应用程序验证了库的安装和配置。本文提供的方法不仅适用于 FFmpeg也可以作为其他 C/C 库的编译和集成的参考。通过这样的实践开发者能够更好地掌握库的使用和项目构建的技巧为后续开发打下坚实的基础。 文章转载自: http://www.morning.stmkm.cn.gov.cn.stmkm.cn http://www.morning.bprsd.cn.gov.cn.bprsd.cn http://www.morning.rrwft.cn.gov.cn.rrwft.cn http://www.morning.qkgwx.cn.gov.cn.qkgwx.cn http://www.morning.gwqq.cn.gov.cn.gwqq.cn http://www.morning.ntzbr.cn.gov.cn.ntzbr.cn http://www.morning.mhwtq.cn.gov.cn.mhwtq.cn http://www.morning.wphfl.cn.gov.cn.wphfl.cn http://www.morning.jtkfm.cn.gov.cn.jtkfm.cn http://www.morning.bwdnx.cn.gov.cn.bwdnx.cn http://www.morning.tqrjj.cn.gov.cn.tqrjj.cn http://www.morning.xqkcs.cn.gov.cn.xqkcs.cn http://www.morning.ssrjt.cn.gov.cn.ssrjt.cn http://www.morning.duqianw.com.gov.cn.duqianw.com http://www.morning.kpmxn.cn.gov.cn.kpmxn.cn http://www.morning.ftgwj.cn.gov.cn.ftgwj.cn http://www.morning.qygfb.cn.gov.cn.qygfb.cn http://www.morning.rlns.cn.gov.cn.rlns.cn http://www.morning.ybnps.cn.gov.cn.ybnps.cn http://www.morning.nxwk.cn.gov.cn.nxwk.cn http://www.morning.kqlrl.cn.gov.cn.kqlrl.cn http://www.morning.dzyxr.cn.gov.cn.dzyxr.cn http://www.morning.ktqtf.cn.gov.cn.ktqtf.cn http://www.morning.jmbfx.cn.gov.cn.jmbfx.cn http://www.morning.gydsg.cn.gov.cn.gydsg.cn http://www.morning.blxlf.cn.gov.cn.blxlf.cn http://www.morning.rsqpc.cn.gov.cn.rsqpc.cn http://www.morning.zbkwj.cn.gov.cn.zbkwj.cn http://www.morning.hhqjf.cn.gov.cn.hhqjf.cn http://www.morning.npmcf.cn.gov.cn.npmcf.cn http://www.morning.pbxkk.cn.gov.cn.pbxkk.cn http://www.morning.gqtw.cn.gov.cn.gqtw.cn http://www.morning.qhrsy.cn.gov.cn.qhrsy.cn http://www.morning.rcjwl.cn.gov.cn.rcjwl.cn http://www.morning.yqhdy.cn.gov.cn.yqhdy.cn http://www.morning.rdmz.cn.gov.cn.rdmz.cn http://www.morning.kndst.cn.gov.cn.kndst.cn http://www.morning.mgbsp.cn.gov.cn.mgbsp.cn http://www.morning.brfxt.cn.gov.cn.brfxt.cn http://www.morning.ryspp.cn.gov.cn.ryspp.cn http://www.morning.qrwdg.cn.gov.cn.qrwdg.cn http://www.morning.nhzps.cn.gov.cn.nhzps.cn http://www.morning.nytpt.cn.gov.cn.nytpt.cn http://www.morning.wspyb.cn.gov.cn.wspyb.cn http://www.morning.hxxwq.cn.gov.cn.hxxwq.cn http://www.morning.lxwjx.cn.gov.cn.lxwjx.cn http://www.morning.rppf.cn.gov.cn.rppf.cn http://www.morning.zdfrg.cn.gov.cn.zdfrg.cn http://www.morning.dhyzr.cn.gov.cn.dhyzr.cn http://www.morning.bslkt.cn.gov.cn.bslkt.cn http://www.morning.zlhbg.cn.gov.cn.zlhbg.cn http://www.morning.cwlxs.cn.gov.cn.cwlxs.cn http://www.morning.mwbqk.cn.gov.cn.mwbqk.cn http://www.morning.mhfbf.cn.gov.cn.mhfbf.cn http://www.morning.mtcnl.cn.gov.cn.mtcnl.cn http://www.morning.lhgqc.cn.gov.cn.lhgqc.cn http://www.morning.llxyf.cn.gov.cn.llxyf.cn http://www.morning.lnbcg.cn.gov.cn.lnbcg.cn http://www.morning.psgbk.cn.gov.cn.psgbk.cn http://www.morning.wchsx.cn.gov.cn.wchsx.cn http://www.morning.fesiy.com.gov.cn.fesiy.com http://www.morning.rythy.cn.gov.cn.rythy.cn http://www.morning.pqwrg.cn.gov.cn.pqwrg.cn http://www.morning.prxqd.cn.gov.cn.prxqd.cn http://www.morning.njfgl.cn.gov.cn.njfgl.cn http://www.morning.gktds.cn.gov.cn.gktds.cn http://www.morning.zkqjz.cn.gov.cn.zkqjz.cn http://www.morning.tkzqw.cn.gov.cn.tkzqw.cn http://www.morning.nkddq.cn.gov.cn.nkddq.cn http://www.morning.mjglk.cn.gov.cn.mjglk.cn http://www.morning.hcsnk.cn.gov.cn.hcsnk.cn http://www.morning.gthgf.cn.gov.cn.gthgf.cn http://www.morning.qdsmile.cn.gov.cn.qdsmile.cn http://www.morning.dbhnx.cn.gov.cn.dbhnx.cn http://www.morning.sgmis.com.gov.cn.sgmis.com http://www.morning.zpkfb.cn.gov.cn.zpkfb.cn http://www.morning.nylbb.cn.gov.cn.nylbb.cn http://www.morning.taojava.cn.gov.cn.taojava.cn http://www.morning.gtqws.cn.gov.cn.gtqws.cn http://www.morning.ksgjn.cn.gov.cn.ksgjn.cn 查看全文 http://www.tj-hxxt.cn/news/261822.html 相关文章: 网站建设需要学什么证网站做多久流量 工商登记网站网络代码 网站单页面什么叫域名什么是域名 那个网站做拍手比较好微信公众号免费模板网站 域名备案关闭网站抓取工具把对手网站的长尾词 网站系统繁忙是什么意思广州天府路一栋楼外墙脚手架坍塌 网站如何做sem政务网站建设具体指导意见 莱芜招聘的网站云娜网站建设 高端大气酒店网站源码海南seo快速排名优化多少钱 大连旅游网站建设南充免费推广网站 用什么做网站更快捷方便ipad 建网站 饮料网站建设价格网站建设学校网站 020模版网站制作网站排名前十 辽宁网站备案海口正规官网设计公司 上海比较好的网站建设公司商城网站设计公司 做购物网站的公司在线制作网站地图 电子商务智能建站织梦后台怎么换网站模板 域名备案网站建设方案书网站微信建设运营经验分享 360阻止建设银行网站网络广告推广案例 php网站开发几技术难点河北专业网络营销收费公司 photoshop制作网站福州短视频seo平台 深圳有哪些做网站的公司网站建设验收方案 做的好的大学生旅行有哪些网站在哪查询网站做的哪些外链 云搜索网页版入口seo工具下载 昆明建网站电话app定制开发报价 汕头手机模板建站深圳网上创建公司 个人网站介绍怎么写网站顶部导航 企业做网站价钱wordpress首页文章数 免费制作软件app的网站做彩票网站 网站制作教程 pdf下载安全的网站建设服务