【学习笔记】obs-studio 编译
1.下载源码
因为现在最新的obs-studio 只支持VS2019了,我没安装VS2019,安装的是VS2015,查看wiki记录
为最后一版说明,支持VS2015的
通过时间比对,对应的是obs-studio 24.0
2.编译环境软件需求
obs-studio在WIndows平台编译使用的是CMake,具体的内容在Wiki中也有说明:
Requirements for building OBS on windows
Development packages of FFmpeg, x264, and cURL.
- Pre-built windows dependencies for VS2015 and VS2017 can be found here 如下是VS2015和VS2017的预编译依赖库:
- Qt5 (minimum version of 5.9 if you're using VS2017)(如果使用VS2017 Qt最少是5.9)
- cmake 的windows版本
- Visual Studio 2015 or Visual Studio 2017 (latest updates recommended) 推荐使用 vs205或者vs2017
3.编译
- Run cmake-gui, and set the following fields:
- In "where is the source code", enter in the repo directory (example: D:/obs).
- In "where to build the binaries", enter the repo directory path with the 'build' subdirectory (example: D:/obs/build).
- 就是配置下图的路径
- Set the following variables in cmake-gui (alternatively, you can set them as Windows Environment Variables):
- DepsPath (Path to the include for all dependencies, not including Qt.).
- An example path if you extracted the dependancies .zip to c:\obs-deps would be:
- c:\obs-deps\win32\include
- c:\obs-deps\win64\include
- An example path if you extracted the dependancies .zip to c:\obs-deps would be:
- If you wish to specify both 32 and 64 bit dependencies (for multi-arch building), you can use DepsPath32 and DepsPath64 to their respective include folders.
- 配置下cmke中的变量DepsPath,根据自己的路径调整,如D:/obs-studio-24.0.0/dependencies2015/win32/include,要编译32位的就选win32,编译64的就选win64,想2种都编译就增加DepsPath32和DepsPath64
- DepsPath (Path to the include for all dependencies, not including Qt.).
- QTDIR (Path to Qt build base directory. GUI is built by default. Set the cmake boolean variable DISABLE_UI to TRUE if you don't want the GUI and this is no longer required. Can be optionally suffixed with 32 or 64 to specify target arch).
- NOTE: Make sure to download Qt 5.X.X prebuilt components for your version of MSVC (64 or 32 bit).
- Example Qt directories you would use here if you installed Qt5 to D:\Qt would usually look something like this:
- (32bit) QTDIR=D:\Qt\5.8\msvc2017
- (64bit) QTDIR64=D:\Qt\5.8\msvc2017_64
- 配置下cmke中的变量QTDIR,我用的是Qt5.9.8
- 点 Cmake 程序 界面的Configure,选择 Visual Studio 14 2015
- 点 Generate,生成VS工程
4.生成结果
成功36个,失败2个
切换到错误列表
- KSAUDIO_SPEAKER_2POINT1这个宏,定义在其他文件中,复制过来到严重性win-wasapi.cpp 文件中即可#define KSAUDIO_SPEAKER_2POINT1 (KSAUDIO_SPEAKER_STEREO|SPEAKER_LOW_FREQUENCY)
- obs-studio-24.0.0\UI\window-basic-preview.cpp(930): error C2719: “transform”: 要求 16 对齐的形参将不被对齐 ,将
static bool IntersectBox(matrix4 transform, float x1, float x2, float y1,
float y2)
函数修改为
static bool IntersectBox(matrix4& transform, float x1, float x2, float y1,
float y2)
重新编译
5.接下来研究下这个是什么,怎么实现的
6.
大致看了下,是D3D实现的或者openGL,这2个我都没接触过,还要先学习这个,这个效果应该叫多窗口叠加。
作者:Dozeoo
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~