Question / Help Compiling on Xubuntu 12.04 Precise?

ZeroLabs

Member
First post and I want to start out with THANK YOU, THANK YOU THANK YOU!!! I am filing for divorce from Webcam Max and winblows at this very moment!

I have successfully installed on Xubuntu 14.04 Trusty from the PPA and use it primarily for live streaming. My box has 4 Logitech webcams and 1 USB video capture dongle. The only hiccup I've run into so far is adding video streams to scenes. Sometimes it hangs at a gray screen, sometimes it works without a hitch. Haven't really found a rhyme or reason yet but I'm looking. I can get a camera that wasn't working to work if I clear the sources and start over adding them back in.

Now my question. I already know the PPA does not work in Precise. Has anyone successfully compiled on Precise from source? Can you offer any tips? Are there any plans to support 12.04 with the PPA?

The reason I'm asking is because of the trouble I ran into described in this thread http://ubuntuforums.org/showthread.php?t=2239564 I want to broadcast mobile but Trusty broke support for my Pantech UML295W. I'm stuck with Precise until they fix it and that does not appear to be very high on their agenda. >:-(
 
it should compile on 12.04 just fine but you will have to get a more up to date ffmpeg. the developer makes a comment about needing a newer version of libav so i believe the same jon severenson ppa provides ffmpeg for 12.04 as well as 14.04, you can always try it. if it doesn't work with a ppa for ffmpeg and it's libraries you may have to compile ffmpeg from source and install it all the shared libraries.

it may just be easier upgrading to 14.04 but i do see your usb issue as unresolved. are you purposely using ipv6? i would try disabling that in network manager. here's a thread of another usb device that's similar i believe: http://ubuntuforums.org/showthread.php?t=2207693
 

ZeroLabs

Member
Yes, same device but those posts go back to Feb. v13.10. Never had a problem until 14.04 came out. I also tried messing with interfaces without success. I guarantee if he upgraded, it's broken again.
 

admalledd

Member
This is my old compile helper script from when I was on 12.04 (upgraded to 14.04 though). Its a bit outdated and probably broken but should point you in the right direction...

https://gist.github.com/admalledd/22096af58ee1eaa301d7

The big key thing is you need to compile ffmpeg and possibly qt5 from source and install those (either system wide or into PATH* injectable directories as my script does) before trying to build obs.

The things to probably update/change from that script would be qt5 stuff (you will probably need more files than just the ones there, I already had some Frankenstein qt5 partial build I was using), and building your own "yasm", "libmp3lame-dev" and "libopus-dev" (check out https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu for some help with ffmpeg compile, that is where most of my script comes from)
 

ZeroLabs

Member
Thanks. Reading through the Linux build instructions and checking for dependencies, despite the fact that I was able to update my ffmpeg with the jon-severinsson PPA and most other other deps are in the repos, qt5 is not but I'm even able to find a PPA for that too! Plodding ahead. I'll post my results here soon.
 

ZeroLabs

Member
I haven't tried compiling yet but I managed to get all of the dependencies loaded with the exception of one, libqt5x11extras5-dev, which has many multi-level dependencies that are just too much to sort through and install one by one. Is there an easier way? Or can I build OBS without it?
 
no, you can't build it without libqt5x11extras5-dev. i mean you can try but don't be surprised when cmake fails.

you're probably running into the same issue i ran into when i tried compiling from source on xubuntu 14.04. it's dependency hell, trust me i know.

Here's my thread documenting my journey. https://obsproject.com/forum/threads/compiling-in-xubuntu-14-04-qt5widgets-missing.20019/

basically there's no way to get around it in ubuntu, you have to resolve all the dependency issues in order to get what you want installed installed. for me that meant uninstalling half of my ubuntu install but i copied the huge list of packages that were required to be removed into a file so that after i sorted out the dependency hell i could just reinstall what i needed. Before you embark on a journey as deep and as nasty as that I would strongly suggest using clonezilla to clone your / partition in case you want to give up half way through so that way you can safely restore your / and all will be well again you just won't have obs-studio.

Good luck either way
 

admalledd

Member
Correct you need libqt5x11extras5-dev, however you don't need to install/remove system dependencies to do so. That was the original point of my build helper script: get all those pesky missing deps and build them outside of system package management (where they would break other system programs).

Just tested the QT5 bit of my script: (lines 265-298) Those links still work and download you a QT5 that should have x11extras inside it. (those are for 64bit, if you need 32bit lemme know, finding those links is a pain) Then you just have to make sure you set up the environment variables for cmake/make to include those:

Code:
export BUILD_DIRECTORY=/path/to/build/directory
export INSTALL_ROOT=/path/to/qt5/and/obs/installation #should be a user controlled directory, eg in their home folder
export PATH=$INSTALL_ROOT/bin:$PATH
export LD_LIBRARY_PATH=$INSTALL_ROOT/lib
export CMAKE_INCLUDE_PATH=$INSTALLROOT/include
export CMAKE_PREFIX_PATH=$INSTALLROOT
export QT_PLUGIN_PATH=$INSTALLROOT/plugins
cd $BUILD_DIRECTORY
cmake -DCMAKE_INSTALL_PREFIX:PATH=$INSTALLROOT /path/to/obs-studio-src
make # replace with "make -j$CORES" where $CORES is how many cores you have, eg quad would be "make -j4"
make install

then after you will need a launcher script because you will still need some of those variables for the new obs to find its libraries.

Code:
export INSTALL_ROOT=/path/to/qt5/and/obs/installation
export PATH=$INSTALL_ROOT/bin:$PATH
export LD_LIBRARY_PATH=$INSTALL_ROOT/lib
export QT_PLUGIN_PATH=$INSTALLROOT/plugins
cd $INSTALL_ROOT
bin/obs

So you would extract the qt5 downloader files and copy all the files/folders in "qt5.3/gcc_64/" to your $INSTALLROOT


The whole point of Linux as a development environment is how you should never need to touch system wide package dependencies if you so choose so long as you have shell. Yea its a bit harder but once you wrap your head around it its kinda easy to figure out. Let me know if you have more questions. I strongly recommend you read through my out-dated build helper script and try to understand what it is doing and why.
 

ZeroLabs

Member
Yes, I spent quite some time looking through your script earlier today. The laptop runs 32 bit and I did find the correct links already, v5.3.2-0.I downloaded the files and extracted to the specified directories. I've been hesitating pulling the trigger because I just don't see the need to build another ffmpeg if I'm already running the jon-severinsson PPA.

Still learning.
 
Top