编译obs

本教程详细介绍了如何在Windows环境下配置OBS、FFmpeg、x264和Qt5,包括克隆仓库、下载依赖包、设置环境变量及解决常见问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

- NOTE: OBS on windows currently requires VS2013, as obs-studio uses C99 and
    C++11.  Express might not be supported at this time (though I'll fix it at
    some point).


  - Clone the repo.  After cloning, run the following git commands:
        git submodule init
        git submodule update
    which will download submodules.    必须完整下载,包括依赖文件


  - Download (or build) development packages of FFmpeg, x264, Qt5.


  - Download windows version of cmake from: http://www.cmake.org/


  - Add windows environment variables:
        FFMpegPath    (path to FFmpeg include directory)
        x264Path      (path to x264 include directory)

        QTDIR         (path to Qt build base directory)  

 注意反斜杠


1、ffmpeg问题





 修改FindFFMpeg.cmake文件,在下面的位置加入以下内容:

###########
	# find_path  
	find_path(FFMPEG_${component}_INCLUDE_DIR  
	  NAMES 
			"lib${component}/${header}" "lib${component}/version.h"
	  PATHS 
			"G:/qt/sdk/ffmpeg-20141016-git-0e406ab-win32-dev/include"  
	)  
	#find_library
	find_path(FFMPEG_${component}_INCLUDE_DIR  
	  NAMES 
			"${component}" "lib${component}"
	  PATHS 
			"G:/qt/sdk/ffmpeg-20141016-git-0e406ab-win32-dev/lib"  
	)  
	############




2、x264问题



修改FindLibx264.cmake文件,在下面位置加入以下内容:

###########
	# find_path  
	find_path(X264_INCLUDE_DIR  
	  NAMES 
			x264.h
	  PATHS 
			"G:/project/OBS-master/x264"  
	)  
	#find_library
	find_path(X264_LIB  
	  NAMES 
			${_X264_LIBRARIES} x264 libx264.lib
	  PATHS 
			"G:/project/OBS-master/x264/libs/32bit"
	)  
	############





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值