Difference between revisions of "Ffmpeg on Fulong"

From In The Wings
Jump to navigation Jump to search
 
Line 19: Line 19:
 
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
 
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
 
</pre>
 
</pre>
No problems, and subversion worked like a charm! Now to actually compile ffmpeg. Unfortunately, it breaks when it gets to doing a framehook against imlib2. Go figure, seeing as the build for THAT software was a bit sketchy itself because of a slightly munged dependency:
+
No problems, and subversion worked like a charm! Now to actually compile ffmpeg. Something interesting to note in the configuration is the following:
 +
<pre>
 +
ARCH                      unknown (generic)
 +
</pre>
 +
Go figure. This is a Chinese MIPS processor. Too bad it couldn't figure out the MIPS part at least.
 +
 
 +
Unfortunately, it breaks when it gets to doing a framehook against imlib2. Go figure, seeing as the build for THAT software was a bit sketchy itself because of a slightly munged dependency:
 
<pre>
 
<pre>
 
gcc -fPIC -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith  
 
gcc -fPIC -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith  
Line 57: Line 63:
 
./configure --disable-vhook
 
./configure --disable-vhook
 
</pre>
 
</pre>
 +
A simple make after this seemed to get right by the problem area, but I am not sure I trust the build at this point so I stop the build, do a make clean, and restart the build from the beginning to be sure that the new options take effect across the entire build instead of just in the second half.

Latest revision as of 15:19, 19 December 2007

Introduction

OK... so I was looking for things to do with the Fulong, so I headed over to Freshmeat and found something that interested me, namely a program called Clive.

Building

Well, reading up on this thing a bit more, it turns out that one of the options for it is to push the files through ffmpeg and urlgrabber in order to reencode them. urlgrabber is just a python script, so no big deal there, but I needed ffmpeg.

It turns out that ffmpeg is only available via svn (i.e. Subversion), and of course the Fulong doesn't have THAT installed. So now I have to install Subversion. Welcome to dependency hell. Subversion in turn requires apr and apr-util, both of which are parts of the Apache Portable Runtime. So I go and grab those. apr compiles and installs without problem with a simple configure and make. apr-util required a bit more finesse on the configure line because it depended on apr:

apr and apr-util

./configure --with-apr=/home/src/apr-1.2.12

subversion

OK, so we have the dependencies of subversion down. Now to build subversion. Of course, a bit more finessing on the configure line is involved here:

./configure --with-apr=/home/src/apr-1.2.12 --with-apr-util=/home/src/apr-util-1.2.12

ffmpeg

Well, that built, so now I was able to grab the subversion version of ffmpeg:

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

No problems, and subversion worked like a charm! Now to actually compile ffmpeg. Something interesting to note in the configuration is the following:

ARCH                      unknown (generic)

Go figure. This is a Chinese MIPS processor. Too bad it couldn't figure out the MIPS part at least.

Unfortunately, it breaks when it gets to doing a framehook against imlib2. Go figure, seeing as the build for THAT software was a bit sketchy itself because of a slightly munged dependency:

gcc -fPIC -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith 
-Wredundant-decls -Wno-pointer-sign -O3 -I"/home/src/ffmpeg" -I"/home/src/ffmpeg" -I"/home/src/ffmpeg"/libavutil 
-I"/home/src/ffmpeg"/libavcodec -I"/home/src/ffmpeg"/libavformat -I"/home/src/ffmpeg"/libswscale -I"/home/src/ffmpeg"/libavdevice
 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -DHAVE_AV_CONFIG_H `imlib2-config --cflags` `freetype-config 
--cflags` -c -o vhook/imlib2.o vhook/imlib2.c
In file included from vhook/imlib2.c:48:
/home/src/ffmpeg/libavformat/framehook.h:25:2: warning: #warning VHOOK is deprecated. Please help porting libmpcodecs or a better
 filter system to FFmpeg instead of wasting your time writing new filters for this crappy one.
In file included from vhook/imlib2.c:60:
/usr/local/include/Imlib2.h:107: error: expected ')' before '*' token
/usr/local/include/Imlib2.h:108: error: expected ')' before '*' token
/usr/local/include/Imlib2.h:109: error: expected ')' before 'colormap'
/usr/local/include/Imlib2.h:110: error: expected ')' before 'drawable'
/usr/local/include/Imlib2.h:111: error: expected ')' before 'mask'
/usr/local/include/Imlib2.h:136: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/Imlib2.h:137: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/Imlib2.h:138: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'imlib_context_get_colormap'
/usr/local/include/Imlib2.h:139: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'imlib_context_get_drawable'
/usr/local/include/Imlib2.h:140: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'imlib_context_get_mask'
/usr/local/include/Imlib2.h:169: error: expected ')' before '*' token
/usr/local/include/Imlib2.h:170: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/Imlib2.h:208: error: expected ')' before '*' token
/usr/local/include/Imlib2.h:210: error: expected ')' before '*' token
/usr/local/include/Imlib2.h:213: error: expected ')' before 'pixmap'
/usr/local/include/Imlib2.h:239: error: expected ')' before 'mask'
/usr/local/include/Imlib2.h:242: error: expected ')' before '*' token
/usr/local/include/Imlib2.h:245: error: expected ')' before 'mask'
/usr/local/include/Imlib2.h:255: error: expected ')' before 'mask'
vhook/imlib2.c: In function 'Configure':
vhook/imlib2.c:167: warning: suggest parentheses around assignment used as truth value
make: *** [vhook/imlib2.o] Error 1

In particular I love the bit about vhook being deprecated. Well, let's try configuring without vhook. I really don't care all that much about imlib2 anyway, so let's try without it.

./configure --disable-vhook

A simple make after this seemed to get right by the problem area, but I am not sure I trust the build at this point so I stop the build, do a make clean, and restart the build from the beginning to be sure that the new options take effect across the entire build instead of just in the second half.