INSTALL 7.9 KB
Newer Older
1 2 3
Compilation instructions!  Temporary quick compilation instructions!
Will give better instructions later when things are in a more complete state.

4

5
Windows:
6 7 8
  - Load git submodules (required):
      git submodule init && git submodule update

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
  - 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).

  - 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)

    NOTE: Each of these environment variables can specify 32bit and 64bit by
    appending 32 and 64 to the end of the environment variable names.
    So if you want to separate locations for 32bit or 64bit, you can set:
    FFmpegPath32, FFmpegPath64, x264Path32, x264Path64, QTDIR32, QTDIR64, etc.

    NOTE: These variables are optional and these can be entered in to cmake
    while generating, but having these variables makes life much easier in case
    you need to regenerate your cmake data from scratch for whatever reason.

    NOTE: An example Qt directory you would use here if you installed Qt5 to
    D:\Qt would usually look something like this for the 32bit version:
        D:\Qt\5.3\msvc2013
    And something like this for the 64bit version
        D:\Qt\5.3\msvc2013_64

    NOTE: Search paths and search order for FFmpeg and x264 library/binary
    files, relative to their include directories:

        Library files
          ../lib
          ../lib32 (if 32bit)
          ../lib64 (if 64bit)
          ./lib
          ./lib32 (if 32bit)
          ./lib64 (if 64bit)

        Binary files:
          ../bin
          ../bin32 (if 32bit)
          ../bin64 (if 64bit)
          ./bin
          ./bin32 (if 32bit)
          ./bin64 (if 64bit)

  - Run cmake-gui.  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).

    NOTE: The subdirectories 'build', 'release', and 'debug' are meant for
    builds, and are excluded from the repo in .gitignore, so they are safe to
    use for building.

  - Press 'Configure', then enable the COPY_DEPENDENCIES option, then press
    'Configure' again, and then press 'Generate' to generate visual studio
    project files in the 'build' subdirectory.

  - Open obs-studio.sln from the 'build' subdirectory, and it should run and
    be good to go.  All required dependencies should be copied on compile and
    it should be a fully fuctional build environment.
71 72


73
Mac OSX
74 75 76
  - Load git submodules (required):
      git submodule init && git submodule update

77
  - Use macports or homebrew and install FFmpeg, x264, Qt5, and cmake.
78

79 80 81
    NOTE: Qt5 can also be downloaded/installed via the Qt website, though keep
    in mind that you will have to set the QTDIR environment variable to the
    Qt5 build base directory.
82

P
Palana 已提交
83 84 85
  - Make sure to have the OSX 10.9 or newer SDK installed (comes with recent
    versions of Xcode)

86
  - In a terminal, go to the obs-studio directory create a 'build' sub
P
Palana 已提交
87 88 89 90 91 92
    directory and change to it, then to build, type:

      - on OSX 10.9 or newer:
          cmake .. && make
      - on OSX 10.8:
          MACOSX_DEPLOYMENT_TARGET=10.8 cmake -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/ .. && make
93

94 95
  - It builds in a modular structure by default.  To run it via terminal, go to
    build/rundir/RelWithDebInfo/bin, then type ./obs to run.
96

97 98 99
    NOTE: If you are running via command prompt, you *must* be in the 'bin'
    directory specified above, otherwise it will not be able to find its files
    relative to the binary.
100

101 102
  - To create an app bundle instead, use the command: make package
    This will create a .dmg file with an app bundle inside.
103 104


105
Linux (Ubuntu 14.04/14.10/15.04 installation)
106 107 108 109
  - FFmpeg is required.  If you do not have the FFmpeg installed (if you're not
    sure, then you probably don't have it), you can get it with the following
    commands:

110
    For Ubuntu 14.04/14.10:
111
        sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next
112 113
        sudo apt-get update && sudo apt-get install ffmpeg

114 115 116
    For Ubuntu 15.04:
        sudo apt-get install ffmpeg

117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
  - Then you can install OBS with the following commands:

        sudo add-apt-repository ppa:obsproject/obs-studio
        sudo apt-get update && sudo apt-get install obs-studio


Linux (Arch Linux installation, unofficial)
  - Link:  https://aur.archlinux.org/packages/obs-studio-git


Linux (OpenSUSE installation, unofficial)
  - Link:  http://packman.links2linux.org/package/obs-studio


Linux (Gentoo installation, unofficial)
  - Link:  https://github.com/saintdev/obs-studio-overlay


135 136 137 138 139 140 141 142 143 144
Linux (NixOS installation)
  - Get the latest Nix packages:

    git clone https://github.com/nixos/nixpkgs ~/nixpkgs

  - Install:

    nix-env -f ~/nixpkgs -Q -i obs-studio


145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
Linux (Manually compiling on Redhat-based distros such as Fedora)
  - Get RPM fusion at http://rpmfusion.org/Configuration/

  - Set up a build environment:

        sudo yum install gcc gcc-c++ gcc-objc cmake git

  - If you don't care much about FFmpeg features, just get it from RPM fusion:

        sudo yum install ffmpeg-devel

  - Get the required packages:

	sudo yum install libX11-devel libGL-devel ffmpeg-devel libv4l-devel \
                pulseaudio-libs-devel x264-devel freetype-devel \
                fontconfig-devel libXcomposite-devel libXinerama-devel \
K
ka’imi 已提交
161
                qt5-qtbase-devel qt5-qtx11extras-devel libcurl-devel
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195

  - Building and installing OBS:

        git clone https://github.com/jp9000/obs-studio.git
        cd obs-studio
        mkdir build && cd build
        cmake -DUNIX_STRUCTURE=1 ..
        make -j4
        sudo make install


Linux (Manually compiling on Debian-based distros)
  - Set up a build environment:

        sudo apt-get install build-essential pkg-config cmake git checkinstall

  - FFmpeg is required, and not commonly available on debian-based distros.
    If you want a custom compilation with FDK AAC encoder and such, see:

        https://trac.ffmpeg.org/wiki/CompilationGuide

  - Otherwise, I will only give easy and brief instructions for a very minimal
    FFmpeg installation:

        sudo apt-get install zlib1g-dev yasm
        git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git
        cd ffmpeg
        ./configure --enable-shared --prefix=/usr
        make -j4
        sudo checkinstall --pkgname=FFmpeg --fstrans=no --backup=no \
                --pkgversion="$(date +%Y%m%d)-git" --deldoc=yes

  - Get the required packages:

196
        sudo apt-get install libx11-dev libgl-dev libpulse-dev libxcomposite-dev \
197
                libxinerama-dev libv4l-dev libudev-dev libfreetype6-dev \
S
skwerlman 已提交
198
                libfontconfig-dev qtbase5-dev libqt5x11extras5-dev libx264-dev \
199
                libxcb-xinerama0-dev libxcb-shm0-dev libjack-jackd2-dev libcurl-dev
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222

  - Building and installing OBS:

        git clone https://github.com/jp9000/obs-studio.git
        cd obs-studio
        mkdir build && cd build
        cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
        make -j4
        sudo checkinstall --pkgname=obs-studio --fstrans=no --backup=no \
               --pkgversion="$(date +%Y%m%d)-git" --deldoc=yes


Linux portable mode
  - You can also build in portable mode on Linux, which installs all the
    files to an isolated directory:

        mkdir build && cd build
        cmake -DUNIX_STRUCTURE=0 \
                -DCMAKE_INSTALL_PREFIX="${HOME}/obs-studio-portable" ..
        make -j4 && make install

    After that you should have a portable install in ~/obs-studio-portable
    Change to bin/64bit or bin/32bit and then simply run:  ./obs