minGW64 下面编译ffmpeg 支持h264

news/2024/7/10 18:42:21 标签: ffmpeg, 音视频

下载:
https://ffmpeg.org/download.html

选择合适的版本。

里面有关于libavcodec 等的版本号。根据已安装的ffmpeg查看对比。

编译:
运行:mingw64.exe ,在里面进入下载好解压好的文件的目录。

x264:https://github.com/mirror/x264.git
git clone https://github.com/mirror/x264.git
cd x264
./configure --enable-static

make
make install

编译ffmpeg

./configure --enable-shared --enable-static --disable-yasm --enable-pic --enable-gpl --enable-avresample --enable-gpl --enable-libx264 --enable-sdl2 --enable-libopenjpeg --enable-libopus --prefix=/home/Administrator/ffmpeg4.2

make
make install

安装完成
go编译程序:

go env -w CGO_CFLAGS=-ID:\msys64\home\Administrator\ffmpeg4\include CGO_LDFLAGS=“-LD:\msys64\home\Administrator\ffmpeg4\lib -llibavcodec -llibavdevice -llibavfilter -llibavformat -llibavutil -llibswscale”


http://www.niftyadmin.cn/n/1738784.html

相关文章

C语言调用ffmepg 获取摄像头设备列表

C语言调用ffmepg 获取摄像头设备列表 #include <stdio.h>#include "libavcodec/avcodec.h" #include "libavformat/avformat.h" #include "libswscale/swscale.h" #include "libavdevice/avdevice.h"//Show Dshow Device void …

gstream打开摄像头

gst-launch-1.0.exe -v ksvideosrc do-statsTRUE ! videoconvert ! autovideosink

msys2 安装 mingw64

https://blog.csdn.net/zhuwade/article/details/121944279

golang的CGO_ENABLED交叉编译(Linux, Windows)

https://huaweicloud.csdn.net/63566986d3efff3090b5e51c.html

几个go 库 govcl kardianos/service gjson

govcl 一个夸平台的go gui kardianos/service 跨平台的安装服务功能 github.com/tidwall/gjson json 轻便处理

NSIS最简单的软件打包示例

从简单到完整&#xff0c;Liam平平带你一步步制作完美安装包&#xff0c; 万事开头难。 第一课&#xff1a;制作一个安装包&#xff0c;运行后将安装包中文件安装到指定位置。 一、 下载安装NSIS 官方下载地址&#xff1a;https://nsis.sourceforge.io/Download 二、编写脚本…

React 如何正常渲染一段HTML字符串

angerouslySetInnerHTMl 属性 很多时候我们做一个项目接口会返回一段 HTML 字符串文本&#xff0c;然后我们把它解析渲染成正常的html&#xff0c;这是在项目中常见不能再常见的情况了&#xff0c;可是在 react 里边就有一个小小的插曲&#xff0c;在这里分享给同学们&#xf…

go语言写最简单的代理服务器

直接上代码了。 package mainimport ("bytes""fmt""io""log""net""net/url""strings" )func main() {//设置日志格式log.SetFlags(log.LstdFlags|log.Lshortfile)//监听端口和地址l, err : net.Listen…