編譯參考官網文檔: https://github.com/jp9000/obs-studio/wiki/Install-Instructions#windows-build-directions
1.下載下傳obs源碼:https://github.com/obsproject/obs-studio,選擇tag下的對應版本(master下的版本不一定編得過)。
2.下載下傳依賴庫(根據自己需要編譯的vs版本選擇):
VS2013: https://obsproject.com/downloads/dependencies2013.zip
VS2015: https://obsproject.com/downloads/dependencies2015.zip
VS2017: https://obsproject.com/downloads/dependencies2017.zip
VS2019: https://obsproject.com/downloads/dependencies2019.zip
3.下載下傳win_dshow子產品(如果不需要攝像頭捕獲,此步驟不需要):
進入 源碼目錄/plugins/win-dshow, 然後執行git clone https://github.com/jp9000/libdshowcapture.git指令,等待下載下傳完畢即可
4.利用cmake建構VS項目
(1)增加依賴庫路徑:DepsPath
(2)增加Qt路徑:QTDIR
(3)增加x264路徑:x264Path
(4)增加curl路徑:curlPath
(5)增加FFmpeg路徑:FFmpegPath
(6)configure->Generate,成功的話就ok了
5.進入到build目錄,用cmake時選用的vs打開項目
6.選擇ALL_BUILD重新生成
7.等待build通過就ok了