LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-08-2008, 08:45 PM   #1
Smax
LQ Newbie
 
Registered: Apr 2006
Location: East Texas
Posts: 19

Rep: Reputation: 0
Installing ffmpeg2theora with scons can't find libavcodec


I'm trying for the first time to install ffmpeg2theora using scons. The scons command gives me the following error:

scons: Reading SConscript files ...
Checking for pkg-config... (cached) yes
Checking for ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1... (cached) yes
Checking for libavcodec libavformat libavdevice libpostproc libswscale... (cached) yes
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
OSError: 'pkg-config --cflags --libs "libavcodec"' exited 1:
File "/usr/local/src/svn/ffmpeg2theora/SConstruct", line 122:
env.ParseConfig('pkg-config %s "%s"' % (pkg_flags, lib))
File "/usr/lib/scons-1.1.0/SCons/Environment.py", line 1405:
return function(self, self.backtick(command))
File "/usr/lib/scons-1.1.0/SCons/Environment.py", line 545:
raise OSError("'%s' exited %d" % (command, status))




"locate libavcodec" gives:

/usr/local/include/libavcodec
/usr/local/include/libavcodec/avcodec.h
/usr/local/include/libavcodec/opt.h
/usr/local/lib/libavcodec.a
/usr/local/lib/libavcodec.so
/usr/local/lib/libavcodec.so.51
/usr/local/lib/libavcodec.so.51.45.0
/usr/local/lib/libavcodec.so.51.46.0
/usr/local/lib/libavcodec.so.52
/usr/local/lib/libavcodec.so.52.3.0
/usr/local/lib/pkgconfig/libavcodec.pc



"pkg-config --cflags --libs "libavcodec"" returns:

-I/usr/local/include -L/usr/local/lib -lavcodec

My $PKG_CONFIG_PATH is:
/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/X11R7/lib/pkgconfig:/opt/qt/lib/pkgconfig:/opt/qt-3.3.7/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/lib/pkgconfig

The config.log has:

file /usr/local/src/svn/ffmpeg2theora/SConstruct,line 92:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config...
scons: Configure: (cached) yes

scons: Configure: Checking for ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1...
scons: Configure: (cached) yes

scons: Configure: Checking for libavcodec libavformat libavdevice libpostproc libswscale...
scons: Configure: (cached) yes


I have uninstalled and reinstalled ffmpeg twice. I get the same results using ffmpeg2theora svn and tarball.

I am not familiar with scons or python and I have no clue what to do. Any help would be appreciated.

Last edited by Smax; 11-08-2008 at 08:52 PM. Reason: Additional information
 
Old 11-10-2008, 12:47 AM   #2
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
avcodec.h used to be installed in ffmpeg/avcodec.h, but some time near the beginning of this year it was moved to libavcodec/avcodec.h. It would appear that ffmpeg2theora isn't aware of the change.

The easiest thing to do to get it to compile would be to find in all the source files where you have "#include <ffmpeg/avcodec.h>" and change it to "#include <libavcodec/avcodec.h>"
 
Old 11-11-2008, 05:13 PM   #3
Smax
LQ Newbie
 
Registered: Apr 2006
Location: East Texas
Posts: 19

Original Poster
Rep: Reputation: 0
Thank you for the suggestion. But grep finds no instances of avcodec.h in any file in the source tree.
 
Old 11-11-2008, 06:08 PM   #4
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
I wonder if the warning about libavcodec not being found in PKG_CONFIG_PATH isn't a false lead, since when I run "pkg-config --cflags --libs "libavcodec"" I get the following:
Code:
-I/usr/include/libavutil  -pthread -lavcodec -lz -la52 -lfaac -lfaad -lx264 -lm -ldl -lavutil
I would guess that one of the components of libavcodec is missing, so it's failing to recognize the package.

Did you install ffmpeg via "get_ffmpeg_svn.sh"?
 
Old 11-11-2008, 09:04 PM   #5
Smax
LQ Newbie
 
Registered: Apr 2006
Location: East Texas
Posts: 19

Original Poster
Rep: Reputation: 0
I had already installed ffmpeg via svn. I did use get_ffmpeg_svn.sh to download and compile ffmpeg in the source directory but didn't actually install that one.

Edit to add: I should say by saying I'd already installed ffmpeg via svn I should say that I had just updated the svn files and installed it 10 minutes before I started on ffmpeg2theora.

Edited again: Looking again at your output I should note that when installing ffmpeg I did not enable faac, a52, or x264. I don't know what the -lz is

Last edited by Smax; 11-11-2008 at 09:11 PM.
 
Old 11-11-2008, 09:42 PM   #6
Smax
LQ Newbie
 
Registered: Apr 2006
Location: East Texas
Posts: 19

Original Poster
Rep: Reputation: 0
Just uninstalled ffmpeg and reinstalled it via the script. Got the same results.
 
Old 11-12-2008, 01:03 AM   #7
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
I tried recreating your issue, but after uninstalling the currently installed ffmpeg (which was ffmpeg-svn_13024-i586-2gsb) and building via get_ffmpeg_svn.sh I was able to successfully build ffmpeg2theora without a problem. I also got the same output as you now when running "pkg-config --cflags --libs "libavcodec"" after installing the new ffmpeg.

Which distro are you using? Maybe you're missing the ffmpeg development libraries, and pkg-config is using outdated cache information. I would suggest reinstalling ffmpeg that's provided, and check for ffmpeg-dev* package as well.
 
Old 11-12-2008, 06:38 PM   #8
Smax
LQ Newbie
 
Registered: Apr 2006
Location: East Texas
Posts: 19

Original Poster
Rep: Reputation: 0
I really appreciate the time and effort. It is odd. I've used both of these programs before. Something in the upgrade broke it, I guess. Maybe I can try to find the old versions.

I'm using Linux From Scratch 6.3. Everything I have was compiled from source.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Scons [configure] cant find GL/gl.h in /usr/include (glob2) 1veedo Linux - Games 1 03-15-2008 05:08 PM
can't compile ffmpeg2theora-0.20 -kc- Linux - Software 1 01-02-2008 08:13 AM
ffmpeg2theora configure problem fw12 Linux - Software 1 11-08-2006 04:10 PM
make[1]: *** [ffmpeg2theora] Error 1 jeffman Linux - Software 8 01-27-2005 04:00 PM
ffmpeg pipe to ffmpeg2theora Phorem Linux - Software 1 01-11-2005 08:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration