How to use OF witohout ffmpeg library

Hi everyone, :cry:

any suggestion ?

All help would be really apreciated :smiley: :roll:

you should be able to compile oF to use any not very old version of ffmpeg.

if you open the codeblocks project in the text editor at the end of the file you’ll find:

  
		  
<Extensions>  
	<lib_finder>  
		<lib name="gstreamer-0.10" />  
		<lib name="gstreamer-video-0.10" />  
		<lib name="gstreamer-base-0.10" />  
		<!--lib name="gstreamer-app-0.10" /-->  
		<lib name="libavcodec" />  
		<lib name="libavformat" />  
		<lib name="libavutil" />  
		<lib name="libswscale" />  
	</lib_finder>  
	<code_completion />  
	<envvars />  
	<debugger />  
</Extensions>  

delete the lines refering to ffmpeg: libavcode, libavformat, libavutil and libswscale.

then in the codeblocks add the search paths and libraries pointing to your own version of ffmpeg.

you can have problems with gstreamer but don’t think so as ffmpeg is loaded from a plugin so i suppose it will be loaded as a shared library on runtime.

Thanks arturo , but i haven’t these lines

what I have is :

  
  
<Extensions>  
	<code_completion />  
	<envvars />  
	<lib_finder disable_auto="1" />  
	<debugger />  
</Extensions>  
  
  

But maybe the problem is that i haven’t linked my own ffmpeg, however, I don’t know if the missing include files such as ofMain.h , … is due to missing ffmpeg lib.

the you are in 005 right? anyway it should be just a matter of changing the compiler and linker search paths to point to the ffmpeg libraries the other software is using. it shouldn’t have any problem with finding ofMain.h unless you’ve deleted some other search paths

so you have the right files there:

  
usr/lib/libavformat.so  
usr/lib/libavutil.so  
usr/lib/libavformat.so.52  
usr/lib/libavcodec.so.51  
usr/lib/libavcodec.so  
usr/lib/libavutil.so.49  
usr/lib/libavdevice.so.52  

and the includes too, only thing is of 006 needs gstreamer to work, perhaps you need to install it in that machine.

also the project file seems weird, this lines:

  
<Extensions>  
   <lib_finder>  
      <lib name="gstreamer-0.10" />  
      <lib name="gstreamer-video-0.10" />  
      <lib name="gstreamer-base-0.10" />  
      <!--lib name="gstreamer-app-0.10" /-->  
      <lib name="libavcodec" />  
      <lib name="libavformat" />  
      <lib name="libavutil" />  
      <lib name="libswscale" />  
   </lib_finder>  
   <code_completion />  
   <envvars />  
   <debugger />  
</Extensions>  

should be there, and you won’t need to configure in codeblocks as 006 is setup to use the libraries in /usr/bin and the includes in /usr/include for ffmpeg and gstreamer. Indeed is what those lines in the cbp do.

I ve added manually all these libraries to the project ( project > build options > linker settings), I ve also added in “search directories” all the include folders. But it doesn’t work, i still need gstreamer.

But actually, i already have the libraries that gstreamer0.10-ffmpeg installs ( libavcode, libavformat , etc) in the multitouch ffmpeg version… So if I try to install them I get broken packets, which is normal.

Now, I ve tried with OF 005, it seems to work better than 006 , i dont recieve any error related to ffmpeg or gstreamer, in fact ffmpeg libraries and includes seem to be correctly linked . . ( from the multitouch software) .
But now i ve gotten an error, " cannot find -lraw1394" so i ve decided to try and erase the -lraw1394 in linker settings, but now i have “cannot find -lglut” while in /usr/lib/ I have libglut.so.3 & libglut.so.3.8 …

:

what linux are you using? you don’t really need to install gstreamer-ffmpeg the only gstreamer packages you need to install for oF to compile are libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev in ubuntu or debian, the names can change in your distribution.

I use ubuntu 8.10

take a look to my edited text:

Now, I ve tried with OF 005, it seems to work better than 006 , i dont recieve any error related to ffmpeg or gstreamer, in fact ffmpeg libraries and includes seem to be correctly linked . . ( from the multitouch software) .
But now i ve gotten an error, " cannot find -lraw1394" so i ve decided to try and erase the -lraw1394 in linker settings, but now i have “cannot find -lglut” while in /usr/lib/ I have libglut.so.3 & libglut.so.3.8 …

Thanks a lot for everything arturo :roll:

try with:

cd /usr/lib
sudo ln -s libglut.so.3 libglut.so

Making that link solved the problem, but I continue having library problems, now I need to link Xxf86vm “-lXxf86vm” but i don’t have this library, so I tried to install by synaptic but I don’t have this package in my repository, then I ve tried to download it manually , but i have problems installing it ( /.configure works fine but /.make install doesn’t find the target . . . )

I know it’s not an OF problem, but do u know any way to get the library ?

I supose I ll need more libraries once installed this one :frowning:

i don’t understand why you’re having so many problems being in ubuntu. you should just need to execute the install_dependencies script in the scripts folder.

there’s a tool called apt-file that will tell you in what package is a library:

sudo apt-get install apt-file
sudo apt-file update
sudo apt-file search libXxf86vm.so

in this case the package is: libxxf86vm-dev

well… little by little. …

it seems I have the correct library:

  
  
@oriol-laptop:~$ sudo apt-file search libXxf86vm  
libxxf86vm-dev: /usr/lib/libXxf86vm.a  
libxxf86vm-dev: /usr/lib/libXxf86vm.so  
libxxf86vm1: /usr/lib/libXxf86vm.so.1  
libxxf86vm1: /usr/lib/libXxf86vm.so.1.0.0  
libxxf86vm1-dbg: /usr/lib/debug/usr/lib/libXxf86vm.so.1.0.0  
  

now , I need force codebloks to detect it (“cannot find -lXxf86vm”). I ve tried again to add the path in the linker settings, but it hasnt worked. .

I’m hopeful to solve these problems and start working on ubuntu with OF … at leas it seems that 005 doesn’t need gstreamer . .

thanks again :oops:

have you installed the dev package? that’s what contains the .so and .a:

sudo apt-get install libxxf86vm-dev

oopsss … i thought that it was already installed (novice mistake) … ok ! now i ve installed the packet and i ve finally compiled OF !!! :cry: (little by little … )

If I compile any of the OF 005 examples I get the following message:

  
  
/bin/oscSenderExample_debug: error while loading shared libraries: libfmodex.so: cannot open shared object file: No such file or directory  
  

I ve looked for that library using apt-file but I don’t get any response. Also i 've taken a look to synaptic but there is nothing and oubviouslly i can’t download it with apt-get.

that is in export/libs, is part of oF and should get copied automatically every time you compile your examples to yourapp/bin/libs. in case it isn’t there just copy it manually, but it’s really weird.

it’s really strange, in fact I have this library inside export/libs and also inside /bin/lib of my compiled app’s.

oh, yes in 005 you can’t run the apps from codeblocks, you need to run them with the clicktolaunch script in the bin folder. also you can make codeblocks automatically run them when it finish compiling, read the readme.txt file for instructions on how to do that

guau perfect ! many thanks arturo ! now it works!!

and also i have changed the custom variables and now i can run the applications from cb

Thanks :smiley: