zoukankan      html  css  js  c++  java
  • 【学习笔记】obs-studio 编译

    1.下载源码

    因为现在最新的obs-studio 只支持VS2019了,我没安装VS2019,安装的是VS2015,查看wiki记录

    https://github.com/obsproject/obs-studio/wiki/Install-Instructions/0ddc3265c810eec18238dcc996856558c6f88bb7

    为最后一版说明,支持VS2015的

    通过时间比对,对应的是obs-studio 24.0

    2.编译环境软件需求

    obs-studio在WIndows平台编译使用的是CMake,具体的内容在Wiki中也有说明:
    Requirements for building OBS on windows
    Development packages of FFmpeg, x264, and cURL.

    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-depswin32include
          • c:obs-depswin64include
      • 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
    • 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:Qt5.8msvc2017
        • (64bit) QTDIR64=D:Qt5.8msvc2017_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.0UIwindow-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个我都没接触过,还要先学习这个,这个效果应该叫多窗口叠加。

  • 相关阅读:
    Git报错:remote: HTTP Basic: Access denied的解决方法
    扩展模块之ConfigParser模块
    pyftplib
    kafka
    Android MarqueeTextView : 轻松实现文本滚动(跑马灯)效果
    nx
    ScorpionX-RX-64
    SDWebImage源码解读
    iOS 性能优化及AFNetworking源码解析
    vue使用g6做流程图
  • 原文地址:https://www.cnblogs.com/nightnine/p/13082685.html
Copyright © 2011-2022 走看看