INSTALL 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. Compilation instructions! Temporary quick compilation instructions!
  2. Will give better instructions later when things are in a more complete state.
  3. Windows:
  4. - NOTE: OBS on windows currently requires VS2013, as obs-studio uses C99 and
  5. C++11. Express might not be supported at this time (though I'll fix it at
  6. some point).
  7. - Clone the repo. After cloning, run the following git commands:
  8. git submodule init
  9. git submodule update
  10. which will download submodules.
  11. - Download (or build) development packages of FFmpeg, x264, Qt5.
  12. - Download windows version of cmake from: http://www.cmake.org/
  13. - Add windows environment variables:
  14. FFMpegPath (path to FFmpeg include directory)
  15. x264Path (path to x264 include directory)
  16. QTDIR (path to Qt build base directory)
  17. NOTE: Each of these environment variables can specify 32bit and 64bit by
  18. appending 32 and 64 to the end of the environment variable names.
  19. So if you want to separate locations for 32bit or 64bit, you can set:
  20. FFmpegPath32, FFmpegPath64, x264Path32, x264Path64, QTDIR32, QTDIR64, etc.
  21. NOTE: These variables are optional and these can be entered in to cmake
  22. while generating, but having these variables makes life much easier in case
  23. you need to regenerate your cmake data from scratch for whatever reason.
  24. NOTE: An example Qt directory you would use here if you installed Qt5 to
  25. D:\Qt would usually look something like this for the 32bit version:
  26. D:\Qt\5.3\msvc2013
  27. And something like this for the 64bit version
  28. D:\Qt\5.3\msvc2013_64
  29. NOTE: Search paths and search order for FFmpeg and x264 library/binary
  30. files, relative to their include directories:
  31. Library files
  32. ../lib
  33. ../lib32 (if 32bit)
  34. ../lib64 (if 64bit)
  35. ./lib
  36. ./lib32 (if 32bit)
  37. ./lib64 (if 64bit)
  38. Binary files:
  39. ../bin
  40. ../bin32 (if 32bit)
  41. ../bin64 (if 64bit)
  42. ./bin
  43. ./bin32 (if 32bit)
  44. ./bin64 (if 64bit)
  45. - Run cmake-gui. In "where is the source code", enter in the repo directory
  46. (example: D:/obs). In "where to build the binaries", enter the repo
  47. directory path with the 'build' subdirectory (example: D:/obs/build).
  48. NOTE: The subdirectories 'build', 'release', and 'debug' are meant for
  49. builds, and are excluded from the repo in .gitignore, so they are safe to
  50. use for building.
  51. - Press 'Configure', then enable the COPY_DEPENDENCIES option, then press
  52. 'Configure' again, and then press 'Generate' to generate visual studio
  53. project files in the 'build' subdirectory.
  54. - Open obs-studio.sln from the 'build' subdirectory, and it should run and
  55. be good to go. All required dependencies should be copied on compile and
  56. it should be a fully fuctional build environment.
  57. Mac OSX
  58. - Use macports or homebrew and install FFmpeg, x264, Qt5, and cmake.
  59. NOTE: Qt5 can also be downloaded/installed via the Qt website, though keep
  60. in mind that you will have to set the QTDIR environment variable to the
  61. Qt5 build base directory.
  62. - Make sure to have the OSX 10.9 or newer SDK installed (comes with recent
  63. versions of Xcode)
  64. - In a terminal, go to the obs-studio directory create a 'build' sub
  65. directory and change to it, then to build, type:
  66. - on OSX 10.9 or newer:
  67. cmake .. && make
  68. - on OSX 10.8:
  69. MACOSX_DEPLOYMENT_TARGET=10.8 cmake -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/ .. && make
  70. - It builds in a modular structure by default. To run it via terminal, go to
  71. build/rundir/RelWithDebInfo/bin, then type ./obs to run.
  72. NOTE: If you are running via command prompt, you *must* be in the 'bin'
  73. directory specified above, otherwise it will not be able to find its files
  74. relative to the binary.
  75. - To create an app bundle instead, use the command: make package
  76. This will create a .dmg file with an app bundle inside.
  77. Linux (Ubuntu 14.04 installation)
  78. - FFmpeg is required. If you do not have the FFmpeg installed (if you're not
  79. sure, then you probably don't have it), you can get it with the following
  80. commands:
  81. sudo add-apt-repository ppa:jon-severinsson/ffmpeg
  82. sudo apt-get update && sudo apt-get install ffmpeg
  83. - Then you can install OBS with the following commands:
  84. sudo add-apt-repository ppa:obsproject/obs-studio
  85. sudo apt-get update && sudo apt-get install obs-studio
  86. Linux (Arch Linux installation, unofficial)
  87. - Link: https://aur.archlinux.org/packages/obs-studio-git
  88. Linux (OpenSUSE installation, unofficial)
  89. - Link: http://packman.links2linux.org/package/obs-studio
  90. Linux (Gentoo installation, unofficial)
  91. - Link: https://github.com/saintdev/obs-studio-overlay
  92. Linux (Manually compiling on Redhat-based distros such as Fedora)
  93. - Get RPM fusion at http://rpmfusion.org/Configuration/
  94. - Set up a build environment:
  95. sudo yum install gcc gcc-c++ gcc-objc cmake git
  96. - If you don't care much about FFmpeg features, just get it from RPM fusion:
  97. sudo yum install ffmpeg-devel
  98. - Get the required packages:
  99. sudo yum install libX11-devel libGL-devel ffmpeg-devel libv4l-devel \
  100. pulseaudio-libs-devel x264-devel freetype-devel \
  101. fontconfig-devel libXcomposite-devel libXinerama-devel \
  102. qt5-qtbase-devel qt5-qtx11extras-devel
  103. - Building and installing OBS:
  104. git clone https://github.com/jp9000/obs-studio.git
  105. cd obs-studio
  106. mkdir build && cd build
  107. cmake -DUNIX_STRUCTURE=1 ..
  108. make -j4
  109. sudo make install
  110. Linux (Manually compiling on Debian-based distros)
  111. - Set up a build environment:
  112. sudo apt-get install build-essential pkg-config cmake git checkinstall
  113. - FFmpeg is required, and not commonly available on debian-based distros.
  114. If you want a custom compilation with FDK AAC encoder and such, see:
  115. https://trac.ffmpeg.org/wiki/CompilationGuide
  116. - Otherwise, I will only give easy and brief instructions for a very minimal
  117. FFmpeg installation:
  118. sudo apt-get install zlib1g-dev yasm
  119. git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git
  120. cd ffmpeg
  121. ./configure --enable-shared --prefix=/usr
  122. make -j4
  123. sudo checkinstall --pkgname=FFmpeg --fstrans=no --backup=no \
  124. --pkgversion="$(date +%Y%m%d)-git" --deldoc=yes
  125. - Get the required packages:
  126. sudo apt-get libx11-dev libgl-dev libpulse-dev libxcomposite-dev \
  127. libxinerama-dev libv4l-dev libudev-dev libfreetype6-dev \
  128. libfontconfig-dev qtbase5-dev libqt5x11extras5-dev
  129. - Building and installing OBS:
  130. git clone https://github.com/jp9000/obs-studio.git
  131. cd obs-studio
  132. mkdir build && cd build
  133. cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
  134. make -j4
  135. sudo checkinstall --pkgname=obs-studio --fstrans=no --backup=no \
  136. --pkgversion="$(date +%Y%m%d)-git" --deldoc=yes
  137. Linux portable mode
  138. - You can also build in portable mode on Linux, which installs all the
  139. files to an isolated directory:
  140. mkdir build && cd build
  141. cmake -DUNIX_STRUCTURE=0 \
  142. -DCMAKE_INSTALL_PREFIX="${HOME}/obs-studio-portable" ..
  143. make -j4 && make install
  144. After that you should have a portable install in ~/obs-studio-portable
  145. Change to bin/64bit or bin/32bit and then simply run: ./obs