Help compiling OBS-Redux

Okay have been trying to compile this and i just can't seem to get some things to work.

So i will start with what i got.

I have Visual Studio 2013 up and running,
I have installed QT5 from here: https://qt-project.org/downloads
I have downloaded ffmpeg resp from here: git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

I have also made Windows Enviroments path pointing to QT5 install path, and ffmpeg path.

However, here i am stuck.
I don't understand how i am supposed to build ffmpeg, even though i look at the guide at the site,
i have Cygwin, so i know normally how to compile, but it seems it doesn't work with just ./Configure make install.

Also, i have no idea how to build QT5, it seems to already be built, which makes me think i may be doing that wrong.

So hopefully someone can help me step by step or give me some hints.

Thanks
 

Jack0r

The Helping Squad
The Redux is not ready for testing yet. And until we reach this point we cannot offer support or help.
As soon as the first test versions are ready we will probably also have guides how to compile it. Although I would guess the Windows version will probably be compiled for download, no need to compile it yourself.
 

paibox

heros in an halfshel
There are prebuilt Qt binaries for Visual Studio 2013 already, so I assume you downloaded those, no need to build that. As for ffmpeg, I would recommend cross-compiling it.

However, if you're trying to build obs-studio just to use it, you have to be aware that it is not ready for public testing. We will release test builds when it is. If your aim is to help develop, or develop for (plugins, etc.) obs-studio, I would recommend dropping by the development chat linked in a sticky thread on this forum.
 
I know it's still in, early-alpha, i am not expecting it to do what i want, i pretty much just want to fiddle around and play with it. I like to experiment and see what can be done.

But from that, it seems my only real issue is ffmpeg?

I kinda got some to work, i downloaded the Dev from here: http://ffmpeg.zeranoe.com/builds/
And used those i couldn't find out to make them myself, however there are still some missing, x264.h, which i don't think you should get from compiling anything, so not sure where i should get that?

It asks for it when i try to compile OBS-Redux, i have succeded with some stuff, i got some .dll files and wintest.exe.

But i guess i should continue the questions on the chat instead then?
 

paibox

heros in an halfshel
You're sort of dodging the question, so I'll just say probably not. We do not provide support for getting it compiled just so you can play around with it, it would waste too much time.

Once again, test builds will be made available when it's ready for testing.
 
Seems i must have misinterpreted what you meant, i apologies, will prevent myself from wasting the resources of the developers.

Thanks:)
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I'll try to update the main build instructions for it and find some good distributions on ffmpeg/x264 on the net when I'm back on my main computer.
 
Great, don't waste to much time on it though, as said before, wasting your time isn't my intention.

Other than that, i can say that i have been able to somewhat build it, everything builds except x264.
The application itself seems to boot but asks for "locale/en.txt", which i have put there.

But it's probably me messing up as i have pretty much bypassed all the problems;P
Can at least see the GUI for like a sec, so i am happy with that;)
 

GranoblasticMan

New Member
Just an FYI, I was having issues getting FFmpeg and x264 to compile until I found this howto:

http://www.helyar.net/2014/compile-ffmpeg-64-bit-on-windows-with-msysmingw-w64/

For Cygwin, it should be fairly similar as long as you have all the packages needed (for example, ffmpeg.org references some packages that don't seem to be in either the standard repository OR Cygwin Ports? I'll have to give compilation under Cygwin a try after I'm done testing it out with my mingw setup)
 
It only shows FFmpeg, which i solved by using pre-compiled builds.

Also i am doing a 32bit build, as that's what i am closest to achieving, would have to redo everything for 64bit.

Tell me if you get it working, and if you do, it would be nice if you could post the compiled obs-redux.
 

JPL

Member
Trying to consolidate "build on Ubuntu" steps into this thread, based on thedopefish's post from the OBS redux thread:

Code:
sudo apt-add-repository ppa:jon-severinsson/ffmpeg
sudo apt-get update
sudo apt-get install ffmpeg libqt5widgets libqt5gui libqt5core libqt5x11extras-dev libswresample-dev libswscale-dev libavformat-dev
git clone https://github.com/jp9000/obs-studio.git obs-studio
cd obs-studio
mkdir cmbuild
cd cmbuild
cmake ..
make

In Ubuntu 14.04 64-bit this gets me all the way compiled, but fails during the linking stage:

Code:
Linking C shared library libobs.so
/usr/bin/ld: /usr/local/lib/libswscale.a(swscale.o): relocation R_X86_64_PC32 against symbol `ff_M24A' can not be used when making a shared object; recompile with -fPIC

In my attempts to fix this, I tried removing the FFmpeg PPA from the steps above, and compiling FFmpeg and x264 from scratch, using the --enable-pic / -fPIC settings that error recommends, for both those projects and for compiling OBS-redux itself. But I still get that same error, and that's where I'm stuck. (and yeah, i'm making sure OBS is using the versions of those deps that I compiled rather than some other version)

I asked thedopefish if they were running 32-bit or 64-bit Ubuntu 14.04, as that's the only significant detail I could think might make the difference, but didn't hear back. Has anyone else tried the above steps on Ubuntu and gotten a different result?
 
Last edited:

admalledd

Member
EDIT:: see bottom of post for build_deps.sh helper script link


For me I had to compile both qt5 and ffmpeg myself. For ffmpeg I followed the https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu and I think I also did --enable-shared or some such (not just -fPIC)

for QT5 that was mostly because my linux mint 16 does not have libqt5x11extras5-dev or whatever that was, had to compile it myself by hand.


Next thing I had to do was edit the generated make flag file from cmake in $(SRC_DIR)/obs/CmakeFiles/obs.dir/flags.cmake to make sure that it used the correct include directory for my QT5. (because some apps use the system one just fine, but my built one doesn't work for those... joy!)

Due to Cmake being terrible at finding things that are custom built, here is basically what my build script wrapper looks like:

Code:
#!/bin/bash
export LD_LIBRARY_PATH=/home/admalledd/dev/ffmpeg_build/lib/:/home/admalledd/dev/qt5/qtbase/lib/
export CMAKE_INCLUDE_PATH=/home/admalledd/dev/ffmpeg_build/include/:/home/admalledd/dev/qt5/qtbase/include/
export CMAKE_PREFIX_PATH=/home/admalledd/dev/ffmpeg_build/:/home/admalledd/dev/qt5/qtbase/


~/bin/cmake-2.8.12.2-Linux-i386/bin/cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/admalledd/bin/streaming/obs-studio/build/test123/ .


I now only get stuck on something that is a bug in my QT5 version(?) "undefined reference to 'QString::toUtf8_helper(QString const&)'" sadly my computer is too weak to compile big things like QT5 again while I am in this heat wave...


In the end for linux users on ubuntu based systems I hope to just make either my own PPA with all the required packages (ffmpeg, qt5 if needed?, and a pre-built obs) or at least a "GET_BUILD_DEPS_LINUX.sh" file that people can tweak a bit for their own system (but should by default get the tricky ffmpeg and libqt5x11extras5 ready) and also echo/list out what the environment vars for building with those custom deps would be (basically my run script above). I was planning on starting all of this in a week or three when I finally upgrade to a 14.04 based OS. I hope that instead we can just find a list of PPAs to use.

EDIT:: did most of my initial work, got that "build_deps.sh" file now: https://gist.github.com/admalledd/22096af58ee1eaa301d7 its very fragile to sys changes and such, but hopefully if it does break in the future at least provides a good starting point.
 
Last edited:
  • Like
Reactions: JPL

JPL

Member
For me I had to compile both qt5 and ffmpeg myself. For ffmpeg I followed the https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu and I think I also did --enable-shared or some such (not just -fPIC)

A-ha, using --enable-shared and --enable-pic for compiling x264 and ffmpeg worked for me, and I was able to successfully stream from Ubuntu just now!

This unfortunately means that for the moment, compiling FFmpeg and its dependencies is the best option. But if you set up a PPA with the right packages then that will get easier, and the pre-OBS-compilation steps should be as simple as a few apt-gets.
 
Top