CGO调用ffmpeg

news/2024/7/10 21:27:24 标签: ffmpeg, linux, 运维

CGO调用ffmpeg

package main

/*
#cgo CFLAGS: -I/usr/include/x86_64-linux-gnu
#cgo LDFLAGS: -L/usr/lib/x86_64-linux-gnu -lavformat  -lavcodec -lavutil -lavdevice -lavfilter -lswresample -lswscale
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
#include <libavutil/opt.h>
#include <libavdevice/avdevice.h>

static const AVStream *go_av_streams_get(const AVStream **streams,unsigned int n)
{
    return streams[n];
}
*/
import "C"

import (
	"fmt"
)

func main() {
	fmt.Println(C.avdevice_version())
}

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

相关文章

minGW64 下面编译ffmpeg 支持h264

下载&#xff1a; https://ffmpeg.org/download.html 选择合适的版本。 里面有关于libavcodec 等的版本号。根据已安装的ffmpeg查看对比。 编译&#xff1a; 运行&#xff1a;mingw64.exe &#xff0c;在里面进入下载好解压好的文件的目录。 x264&#xff1a;https://githu…

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…