Ogg/Theora compile and install how-to

Ca. 414 ord.

If you don't know Theora see Theora.

I did:

De-install libogg libvorbis vorbis-tools

cvs -d :pserver:anoncvs@xiph.org:/usr/local/cvsroot login
CVS password: anoncvs
cvs -d :pserver:anoncvs@xiph.org:/usr/local/cvsroot -z 9 co ogg
cd ogg
sudo make install
cd ..

cvs -d :pserver:anoncvs@xiph.org:/usr/local/cvsroot -z 9 co vorbis
cd vorbis
sudo make install
cd ..

cvs -d :pserver:anoncvs@xiph.org:/usr/local/cvsroot -z 9 co theora
cd theora
cd examples
gcc -O2 -D_REENTRANT -o player_example player_example.o -Wl,-rpath -Wl,/usr/lib ../lib/.libs/libtheora.a /usr/local/lib/libvorbis.a /usr/local/lib/libogg.a -L/usr/lib /usr/lib/libSDL.a -L/usr/kde/3/lib -lartsc -L/usr/X11R6/lib /usr/kde/3/lib/libartsc.a /usr/lib/libesd.a /usr/lib/libaudiofile.a /usr/lib/libasound.so -lm -lX11 -lXext -lvga -ldl -lpthread # without -static
cd ..
sudo make install
cd ..



I ran into every problem described in theora/README. The solution is described above.


I had problem with -lartsc:

gcc: /usr/kde/3/lib/libartsc.a: No such file or directory

This file is only installed if you --enable-static when compiling arts (the KDE sound daemon). Using Gentoo Linux I simply changed /usr/portage/kde-base/arts/arts-1.0.4.ebuild:

*** arts-1.0.4.ebuild~ Wed Oct 16 21:20:21 2002
--- arts-1.0.4.ebuild Sat Nov 23 11:51:59 2002
*** 24,29 ****
--- 24,30 ----
   use alsa && myconf="$myconf --enable-alsa" || myconf="$myconf --disable-alsa"
+ myconf="$myconf --enable-static"
   src_unpack() {

And then I did: emerge arts before compiling Theora.

player_example and -static

The player_example is linked with -static as default. While the compile works for me, the resulting binary does not. It gives the following errors when run:

$ examples/player_example < fiatlux.theora.ogg
sh: examples/player_example: No such file or directory

And although the compiler should link statically file says otherwise:

$ file examples/player_example
examples/player_example: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), not stripped
$ ldd examples/player_example
/usr/bin/ldd: examples/player_example: No such file or directory
$ strace examples/player_example < fiatlux.theora.ogg
execve("examples/player_example", ["examples/player_example"], [/* 44 vars */]) = 0
strace: exec: No such file or directory

The solution to all this seems to be linking the player without -static.

Convert a .mpg to .ogg

Let us convert fiatlux_320x176.mpg to theora.ogg-format.

rm stream.yuv
mkfifo -m 660 stream.yuv

rm stream.wav
mkfifo -m 660 stream.wav

mplayer -ao pcm -aofile stream.wav -vo null $FILE &
mplayer -ao null -nosound -vo yuv4mpeg $FILE &
examples/encoder_example -v 1 -a 1 stream.wav stream.yuv > fiatlux.theora.ogg

Play a .theora.ogg-file

The .theora.ogg-file should be supplied on stdin:

examples/player_example < fiatlux.theora.ogg

Sidst ændret Sun Nov 24 02:55:26 2002