[osg-users] Problem compiling latest trunk, ffmpeg problem

J.P. Delport jpdelport at csir.co.za
Mon Mar 2 04:34:28 PST 2009


Hi,

Robert Osfield wrote:
> Hi J.P,
> 
> I'm currently looking at introducing using of sws_scale, but don't
> find these methods in the ffmpeg I built.  Looking at the links to the
> mailing list thread you provided I could quite work out whether these
> methods require the sws library to be built, or whether there would be
> sws_ functions in other ffmpeg libs, and if so then would have to
> guess that they are only in an svn rev later/earlier than the one I
> have.
> 
> Could you provide any more clarity on which rev of ffmpeg I'd need +
> and what build options.  

The one I compiled with LGPL only, has the sws functions in libavcodec.so.

nm ./libavcodec/libavcodec.so | grep sws
0008c1b0 T sws_freeContext
0008d1f0 T sws_getCachedContext
0008d0f0 T sws_getContext
0008caf0 T sws_scale

I compiled it using the debian source from:
http://www.debian-multimedia.org/

So I recompiled the debian package (not straight from svn). The source 
package was called ffmpegcvs-20090128. I don't think it differs too much 
from the svn repo.

I disabled the following in the debian rules file:
swscaler, gpl, postproc, x264, faad

I also paste my instructions I saved for myself at the bottom.

> My aim is to be able to use off the self
> versions of ffmpeg from linux repositories as well svn versions of
> ffmpeg.

This is going to depend a lot on what the repositories compile by 
default. I know the debian ones from http://www.debian-multimedia.org/ 
has swscaler compiled in by default. So has the ubuntu packages if I 
remember correctly. A guy here that uses gentoo does not have swscale, 
but has the lgpl version.

To cover everything we would need to check:
if (img_resample available) {
	use it (Tanguys code)
	do not link to swscale
} else {
	use swscale
	if (swscale in libavcodec) {
		do not link to swscale
	} else {
		link to swscale
	}
}

The img_resample check can prob be made by using ffmpeg version info 
from the headers.

I'm not certain how to check for where swscale lives.

jp

---8<---
compile lgpl only version

set sources:
deb-src http://www.debian-multimedia.org/ sid main

mkdir ffmpeg-lgpl
cd ffmpeg-lgpl
sudo apt-get source ffmpeg

cd ffmpegcvs-20090128/debian

edit 'rules' and remove --enable-swscaler and --enable-gpl and 
--enable-postproc and x264 and faad
edit 'control' and remove libswscale packages

$ cd ..

get build deps
$ sudo apt-get build-dep ffmpeg

build
$ sudo dpkg-buildpackage -uc -b

One gotcha, we need the swscale header to be installed even in 
libswscale is not installed. The header is LGPL tho.
---8<---


> 
> Robert.

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.




More information about the osg-users mailing list