Compiling and Installing in Debian

Please note: I have compiled OBS-studio for Debian and it's derivatives on amd64 and/or x86-64! You can download a precompiled binary here (may be out of date): https://www.dropbox.com/s/jgc052w45sbltna/obs-studio.deb?dl=0
Leave a comment/pm me if it does not work for you, and I'll get on the case! Thank you!


To whomever it may concern/If you need help making OBS-Studio run on Debian:
I just made this work today on OBS-Studio 0.4.2-g69b9e72, cloned from the git repo. This works so far on Titanium Linux (my custom distro) which is based on Testing/Jessie. Therefore, it should work on Debian Testing/Jessie and I can't see why it wouldn't work on Stable/Wheezy or Unstable/Sid.
Here are the commands, note that '$' is a normal user prompt and '#' is a root user prompt, and you don't have to type them, however you must type everything after them.
To get to a root prompt, use su or sudo. Your call, there seems to be lots of Linux debate over which is better.
First things first, get the latest OBS-Studio from Jim's GitHub:
$git clone git://github.com/jp9000/obs-studio.git​

(Don't have git? Install it! #apt-get install git)​

Now, OBS-Studio depends on FFMpeg's many libraries, and Debian's default repos don't have a new enough version. Deb-multimedia's version also doesn't work, so we'll have to compile from source.

Get FFMpeg from the FFMpeg website:
$git clone git://source.ffmpeg.org/ffmpeg.git​

We've now downloaded the sources for FFMpeg, so we'll compile them. By default, FFMpeg compiles it's command line tools, and static libraries for other programs to link to. OBS-Studio requires dynamic or shared libraries so we have to specify that we want that rather than the default.

Compile FFMpeg tools and shared libraries:
$cd ffmpeg
$./configure --enable-shared --disable-static
The above command sets up FFMpeg to be compiled the way we want it. These steps will take some time depending on how good your computer is. Be patient.
$make -jX
Replace 'X' with twice the number of logical cores your computer has. This speeds up the build process. The number of logical cores is how many cores your computer has, so, for example, a dual core computer would have make -j4 whilst a four core computer would have make -j8, and so on.
#make install
Remember that you need to be root to install a package... Use sudo or su.

Now that you have FFMpeg installed, we can begin to compile OBS.
$cd ../obs-studio
This is assuming that you were in the FFMpeg directory before... Just get yourself to the OBS-Studio directory and you'll be okay
$mkdir build
OBS-Studio uses a build system named CMake. To compile OBS-Studio, you need CMake, and the best way to run CMake is to give it a directory to start in and then tell it where CMakeLists.txt is.

(Don't have CMake? Install it! #apt-get install cmake)
$cd build
$cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
The above tells cmake to run, compile for a POSIX-compliant architecture (i.e. Linux) and to install libraries and such under /usr.
$make -jX
Just like above, replace 'X' with the number of logical cores that your computer has.
#make install
For whatever reason, if you run OBS-Studio from the command line and it's installed directory, it can't find some of it's dependencies. I'd not even bother with this step, just run OBS from the build directory.​
Congratulations! If you've made it here with no errors and you see 'Built Target OBS' on your command line, you've succeeded!

Running OBS:
$cd obs
$./obs
To run OBS from elsewhere, type:
$./path/to/obs-studio/build/obs/obs​
Extras:
Checkinstall:
You can make a .deb package using checkinstall.
#apt-get install checkinstall
Now, replace all make install steps with checkinstall
If this works for you, awesome! If it doesn't, tell me and I'll try to help! I hope this helped you all!
 
Last edited:

LordKitsuna

New Member
I could really use some help here, i cant for the life of me get this to work i get stuck at the last make i get this error right at the end


/home/lordkitsuna/gitstuff/obs-studio/obs/properties-view.cpp: In member function ‘void OBSPropertiesView::AddColor(obs_property_t, QFormLayout*, QLabel*&)’:
/home/lordkitsuna/gitstuff/obs-studio/obs/properties-view.cpp:337:33: error: ‘HexArgb’ is not a member of ‘QColor’
colorLabel->setText(color.name(QColor::HexArgb));
^
/home/lordkitsuna/gitstuff/obs-studio/obs/properties-view.cpp: In member function ‘bool WidgetInfo::ColorChanged(const char*)’:
/home/lordkitsuna/gitstuff/obs-studio/obs/properties-view.cpp:543:28: error: ‘HexArgb’ is not a member of ‘QColor’
label->setText(color.name(QColor::HexArgb));
^
make[2]: *** [obs/CMakeFiles/obs.dir/properties-view.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [obs/CMakeFiles/obs.dir/all] Error 2
make: *** [all] Error 2

Any ideas?
 
I could really use some help here, i cant for the life of me get this to work i get stuck at the last make i get this error right at the end


/home/lordkitsuna/gitstuff/obs-studio/obs/properties-view.cpp: In member function ‘void OBSPropertiesView::AddColor(obs_property_t, QFormLayout*, QLabel*&)’:
/home/lordkitsuna/gitstuff/obs-studio/obs/properties-view.cpp:337:33: error: ‘HexArgb’ is not a member of ‘QColor’
colorLabel->setText(color.name(QColor::HexArgb));
^
/home/lordkitsuna/gitstuff/obs-studio/obs/properties-view.cpp: In member function ‘bool WidgetInfo::ColorChanged(const char*)’:
/home/lordkitsuna/gitstuff/obs-studio/obs/properties-view.cpp:543:28: error: ‘HexArgb’ is not a member of ‘QColor’
label->setText(color.name(QColor::HexArgb));
^
make[2]: *** [obs/CMakeFiles/obs.dir/properties-view.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [obs/CMakeFiles/obs.dir/all] Error 2
make: *** [all] Error 2

Any ideas?
Well, I'm not an expert, but here are my two cents. 'Q' anything, especially functions dealing with colors, labels, etc. (QColor, etc.) has something to do with Qt Framework, because 'Q' is it's C-language namespace. In human terms, anything prefixed with Q is from Qt Framework, which helps make the User Interface of OBS and many others.
Therefore, it looks like something is wrong with your Qt setup. OBS-Studio depends upon Qt5, the latest version. Before I give suggestions on what to do, I need to know what distro you're using, and also what 'flavor'. For example, I'm running Titanium/Release, but you might be on Linux Mint 16 or Ubuntu 14.04. If you're using Debian, Something like Debian Squeeze, Wheezy, Jessie, Sid would be your version.
 
I am using LMDE is which a rolling release based on debian testing if i am not mistaken. I have QT5 installed but i am not entirely sure what version.

Get:19 http://debian.linuxmint.com/latest/ testing/main qtbase5-dev amd64 5.1.1+dfsg-5 [1,588 kB]
Get:20 http://debian.linuxmint.com/latest/ testing/main qt5-default amd64 5.1.1+

^is what apt grabbed
Oh, thank goodness, it's going as I'd hoped it would. I love LMDE, I ran it myself for a long time! Also, LMDE is based off Debian/Testing. Anyway, the Qt5 which is packaged in Debian's repositories does not work with OBS-Studio (figures, I know.)
You need to get Qt5 from their website. http://qt-project.org/downloads
Get the installer for your platform and let it suck up your disk space, it's worth it when all of your Qt5 applications actually match all your GTK+ themes and fit with your desktop. If I recall correctly you have to download the installer file, make it executable and then run it, allow it to install the full package, then try to recompile OBS. (I'll go verify this on a VM or something and then I'll add it to the above.
 

LordKitsuna

New Member
Cool ill try that now, there was also an insane number of libs i had to add to even get that far not mentioned in your guide. I am sure anyone else probably woulda known to install them but when you do the VM of LMDE it would be worth adding everything you gotta install to the guide for those silly noobs like me :D ill report back soon with how it went.
 

LordKitsuna

New Member
Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:

Qt5WidgetsConfig.cmake
qt5widgets-config.cmake

Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.

Cant figure out i didnt see anything i missed in the install of qt

EDIT: Alright i was able to define the path in CMakeLists.txt and it worked but i cant seem to figure out how do define this error

By not providing "FindPulseAudio.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"PulseAudio", but CMake did not find one.

Could not find a package configuration file provided by "PulseAudio" with
any of the following names:

PulseAudioConfig.cmake
pulseaudio-config.cmake

Add the installation prefix of "PulseAudio" to CMAKE_PREFIX_PATH or set
"PulseAudio_DIR" to a directory containing one of the above files. If
"PulseAudio" provides a separate development poing to try streaming now.ackage or SDK, be sure it has
been installed.


-- PulseAudio not found, disabling PulseAudio plugin

BUT! it BUILDS!
[100%] Built target obs

So i can only assume this means i wont have audio. It works tho i was able to do install and open the program going to try streaming now.

EDIT2: Streaming works and fairly well too able to get a decently smooth stream going no audio as expected.
 
Last edited:
Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:

Qt5WidgetsConfig.cmake
qt5widgets-config.cmake

Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.

Cant figure out i didnt see anything i missed in the install of qt

EDIT: Alright i was able to define the path in CMakeLists.txt and it worked but i cant seem to figure out how do define this error

By not providing "FindPulseAudio.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"PulseAudio", but CMake did not find one.

Could not find a package configuration file provided by "PulseAudio" with
any of the following names:

PulseAudioConfig.cmake
pulseaudio-config.cmake

Add the installation prefix of "PulseAudio" to CMAKE_PREFIX_PATH or set
"PulseAudio_DIR" to a directory containing one of the above files. If
"PulseAudio" provides a separate development poing to try streaming now.ackage or SDK, be sure it has
been installed.


-- PulseAudio not found, disabling PulseAudio plugin

BUT! it BUILDS!
[100%] Built target obs

So i can only assume this means i wont have audio. It works tho i was able to do install and open the program going to try streaming now.

EDIT2: Streaming works and fairly well too able to get a decently smooth stream going no audio as expected.
I'm glad I've at least solved your problem, but all I had to do to make CMake play nice was install the -dev packages for things it couldn't find... I'll do this again in a VM and write down everything needed, then add it to my tutorial above! Happy recording/streaming/whatever
 

LordKitsuna

New Member
See if you can figure out why the pulse audio wont build. apt couldnt find a dev version to that and i am not sure how to get that one working would be nice to be able to send audio.
 

Dudu

New Member
Hi, i installed the whole package on Slackware. It open up and i can even stream video... but i don't have any sound.

Just before i went to streaming i knew i was about to get 'no sound' because of this: (Look at uploaded image)

'Desktop audio device' = No choice is available here.

I took a look at the log file, for some reason it doesn't seems to detect 'Pulse audio' and i already have installed from Slackbuild (V5.0).

Using Alsa instead would be great :\
 

Attachments

  • capture d'écran2.png
    capture d'écran2.png
    55.7 KB · Views: 146
Last edited:

Lain

Forum Admin
Lain
Forum Moderator
Developer
Dudu - Are you sure pulseaudio is properly installed? The dev packages in particular, if you're building it yourself?
 

WodahsReklaw

New Member
Hello I am having a similar issue with the Qt5x11extra library not being found by cmake. I did install Qt5.3 locally but I am kind of a noob when adding the path to libraries. I was wondering how to modify the CMakeLists.txt to give the path to the Qt library.

Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:

Qt5WidgetsConfig.cmake
qt5widgets-config.cmake

Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.

Cant figure out i didnt see anything i missed in the install of qt

EDIT: Alright i was able to define the path in CMakeLists.txt and it worked but i cant seem to figure out how do define this error
 

Noven

New Member
Trying to compile and have worked through many compile errors. I am stuck at the following:

michael@debian:~/obs-studio/build$ cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
-- Jansson >=2.5 not found, building bundled version
-- Using libavcodec for image loading in libobs
-- Xcomposite library not found, Xcomposite plugin disabled
-- Libfdk not found - obs-libfdk plugin disabled
-- Linux-specific code has yet to be written for the text plugin, just needs load_os_font_list written.. which, er, may or may not be a pain. (My apologies in advance, please don't strangle me)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
V4L2_LIB (ADVANCED)
linked by target "linux-v4l2" in directory /home/michael/obs-studio/plugins/linux-v4l2
X264_INCLUDE_DIR (ADVANCED)
used as include directory in directory /home/michael/obs-studio/plugins/obs-x264
X264_LIB (ADVANCED)
linked by target "obs-x264" in directory /home/michael/obs-studio/plugins/obs-x264

-- Configuring incomplete, errors occurred!
See also "/home/michael/obs-studio/build/CMakeFiles/CMakeOutput.log".
See also "/home/michael/obs-studio/build/CMakeFiles/CMakeError.log".
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
WodahsReklaw - you have to manually install that particular package from your package manager (usually). If it's installed and cmake causes a fuss, you need to modify the variable having the issue and specify the appropriate cmake directory for that particular module

Noven - Are x264 and v4l packages installed on your system?
 

Noven

New Member
Yeah both are installed as well as their dev packages.

libv4l-0/testing,unstable,now 1.2.1-2 amd64 [installed]
Collection of video4linux support libraries

libv4l-dev/testing,unstable,now 1.2.1-2 amd64 [installed]
Collection of video4linux support libraries (development files)

libv4l2rds0/testing,unstable,now 1.2.1-2 amd64 [installed,automatic]
Video4Linux Radio Data System (RDS) decoding library

libv4lconvert0/testing,unstable,now 1.2.1-2 amd64 [installed,automatic]
Video4linux frame format conversion library

libx264-142/unstable,now 3:0.142.2452+git08d36b3-dmo1 amd64 [installed,automatic]
x264 video coding library.

libx264-dev/unstable,now 3:0.142.2452+git08d36b3-dmo1 amd64 [installed]
development files for libx264.
 
Thanks Jim, I'm glad to have an expert to help. To everyone having issues with PulseAudio -- It's finicky. I know I had trouble getting it going, you'll probably need to have ALSA installed as well to interface with some applications that refuse to play nice with Pulse, and if you're using something really old you'll need Esound...
If x264 is giving you troubles, compile from source. Try to compile FFMpeg with --enable-x264 as an argument to ./configure...
I have no experience with Slackware, so I can't say anything about how to get packages with it, nor how up-to-date they are, OBS seems to need pretty new stuff, and for good reason. The newer libraries are more stable and faster by a long shot.
 
Hi, i installed the whole package on Slackware. It open up and i can even stream video... but i don't have any sound.

Just before i went to streaming i knew i was about to get 'no sound' because of this: (Look at uploaded image)

'Desktop audio device' = No choice is available here.

I took a look at the log file, for some reason it doesn't seems to detect 'Pulse audio' and i already have installed from Slackbuild (V5.0).

Using Alsa instead would be great :\
The reason OBS doesn't use ALSA is because ALSA is being phased out of Linux. PulseAudio is more extensible and flexible, and while I love the simplicity of ALSA, Pulse is compatible, given that it is installed correctly. ALSA will also remain available, it just won't be the standard. By any chance does Slackware have any kind of PulseAudio plugin that makes it receive ALSA devices properly? Do you have ALSA installed?

Hello I am having a similar issue with the Qt5x11extra library not being found by cmake. I did install Qt5.3 locally but I am kind of a noob when adding the path to libraries. I was wondering how to modify the CMakeLists.txt to give the path to the Qt library.

Qt5 can't be installed by package manager -- manually or automagically. If you're using Debian, you'd probably need to run Sid to get it, and then it still doesn't work right. Qt5 is available in Testing/Jessie, but it doesn't work with CMake. Qt5 is best installed using the installer from their webpage, I promise it works much better. Plus, CMake works then.

Yeah both are installed as well as their dev packages.

libv4l-0/testing,unstable,now 1.2.1-2 amd64 [installed]
Collection of video4linux support libraries

libv4l-dev/testing,unstable,now 1.2.1-2 amd64 [installed]
Collection of video4linux support libraries (development files)

libv4l2rds0/testing,unstable,now 1.2.1-2 amd64 [installed,automatic]
Video4Linux Radio Data System (RDS) decoding library

libv4lconvert0/testing,unstable,now 1.2.1-2 amd64 [installed,automatic]
Video4linux frame format conversion library

libx264-142/unstable,now 3:0.142.2452+git08d36b3-dmo1 amd64 [installed,automatic]
x264 video coding library.

libx264-dev/unstable,now 3:0.142.2452+git08d36b3-dmo1 amd64 [installed]
development files for libx264.

It seems that you have all the libraries, but CMake can't find it's special build files for them. Did you install the packages, or the Development packages? You need both to compile OBS for Linux. On Debian, you'll need libv4l2-dev and libv4l and video4linux, or something like that.
 

Noven

New Member
I have these from the list:

libv4l-0/testing,unstable,now 1.2.1-2 amd64 [installed]
Collection of video4linux support libraries

libv4l-dev/testing,unstable,now 1.2.1-2 amd64 [installed]
Collection of video4linux support libraries (development files)

libv4l2rds0/testing,unstable,now 1.2.1-2 amd64 [installed,automatic]
Video4Linux Radio Data System (RDS) decoding library

libv4lconvert0/testing,unstable,now 1.2.1-2 amd64 [installed,automatic]
Video4linux frame format conversion library

v4l-conf/testing,unstable,now 3.103-3 amd64 [installed]
tool to configure video4linux drivers

v4l-utils/testing,unstable,now 1.2.1-2 amd64 [installed]
Collection of command line video4linux utilities


Am I missing something? I seem to have what I need but obs is just not finding them.
 
I have these from the list:

libv4l-0/testing,unstable,now 1.2.1-2 amd64 [installed]
Collection of video4linux support libraries

libv4l-dev/testing,unstable,now 1.2.1-2 amd64 [installed]
Collection of video4linux support libraries (development files)

libv4l2rds0/testing,unstable,now 1.2.1-2 amd64 [installed,automatic]
Video4Linux Radio Data System (RDS) decoding library

libv4lconvert0/testing,unstable,now 1.2.1-2 amd64 [installed,automatic]
Video4linux frame format conversion library

v4l-conf/testing,unstable,now 3.103-3 amd64 [installed]
tool to configure video4linux drivers

v4l-utils/testing,unstable,now 1.2.1-2 amd64 [installed]
Collection of command line video4linux utilities


Am I missing something? I seem to have what I need but obs is just not finding them.

Well, I checked to see what Debian/testing has in it's repos, and it seems like you've got it all. When you compile OBS, do you re-configure as well? Whenever you recompile, it is a good idea to:
$make clean
$./configure <args>
$cmake <args> ..
$make
That should get everything started again, it forces the build-scripts to search for packages again.
 
Top