Jump to content

?'s building mplayer+(ffmpeg+(x264+schroedinger))


alphaomega

Recommended Posts

It has been a while since I've built mplayer and now that it appears

that you have to build mplayer with ffmpeg I have some questions/issues

I can't seem to figure out.

 

Questions:

One of the things that has never been quite clear to me:

 

If I git a version of mplayer i.e.:

git --revision  yyyymmdd ...

Does that mean...

1. I am getting the version of mplayer as it was on yyyymmdd?

--Or--

2. I am getting today's version of mplayer just named yyyymmdd

because that is what I used?

 

I'm going on the assumption that it is #1.

 

Issues:

I am attempting to build mplayer+ffmpeg with x264 and schroedinger built statically into ffmpeg.

 

Everything appears to go okay and mplayer gets built but when configuring mplayer (using no CFLAGS or LDFLAGS since mplayer wants to automatically determine compiler flags) it does not pick up schroedinger for some reason.

 

orc appears to build okay. schroedinger appears to build okay and it detects orc.

It's just that I can't seem to figure out how to get mplayer to detect schroedinder.

 

snippet from mplayer configure output

configuration: --prefix=/usr --mandir=/usr/man --confdir=/etc/mplayer --enable-gui --enable-menu --disable-arts --disable-bitmap-font --language=en --enable-runtime-cpudetection --extra-cflags=-I/tmp/build/tmp-MPlayer/ffmpegdeps/usr/include -DRUNTIME_CPUDETECT --extra-ldflags=-L/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib -lssl -lcrypto -lz -lusb
<SNIP>
Checking for x264 ... yes (in FFmpeg: yes)
Checking for libdirac ... no 
Checking for libschroedinger ... no 

 

snippet from mplayer configure.log

##########################################

============ Checking for x264 ============

#include <inttypes.h>
#include <x264.h>
#if !(X264_BUILD >= 118)
#error We do not support old versions of x264. Get the latest from git.
#endif
int main(void) { x264_encoder_open((void*)0); return 0; }

cc -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -Werror-implicit-function-declaration -O4 -march=i486 -mtune=generic -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize /tmp/mplayer-configure-4370-11197/tmp.c -Ilibdvdread4 -I. -Iffmpeg -I/tmp/build/tmp-MPlayer/ffmpegdeps/usr/include -DRUNTIME_CPUDETECT -O2 -march=i486 -mtune=i686 -D_REENTRANT -I/usr/X11/include -I/usr/include/     -I/usr/include/freetype2  -lm -L/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib -lssl -lcrypto -lz -lusb -ffast-math   -lncurses -lsmbclient -lpng -lz -lmng -lz -ljpeg -lungif -lasound -ldl -lpthread -lcdio_cdda -lcdio -lcdio_paranoia  -lfreetype -lz -lbz2 -lfontconfig  -lfribidi -lass -lz -lbz2 -llzo2 -lmad -lspeex -lgsm -ltheoradec -logg -lmpg123 -lfaad -lrtmp -lopencore-amrnb -lopencore-amrwb   -lXext -lX11 -lpthread -lXss -lXv -lXinerama -lXxf86vm -lXxf86dga -laa -L/usr/lib 
-lcaca -lvga -lSDL -lGL -ldl -lEGL -ldl -lesd   -lfaac  -lfaac -o /tmp/mplayer-configure-4370-11197/tmp -lx264 -lpthread


Result is: yes (in FFmpeg: yes)
##########################################

============ Checking for libdirac ============
Result is: no 
##########################################

============ Checking for libschroedinger ============

#include <schroedinger/schro.h>
int main(void) { schro_init(); return SCHRO_ENCODER_RATE_CONTROL_CONSTANT_QUALITY; }

cc -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -Werror-implicit-function-declaration -O4 -march=i486 -mtune=generic -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize /tmp/mplayer-configure-4370-11197/tmp.c -Ilibdvdread4 -I. -Iffmpeg -I/tmp/build/tmp-MPlayer/ffmpegdeps/usr/include -DRUNTIME_CPUDETECT -O2 -march=i486 -mtune=i686 -D_REENTRANT -I/usr/X11/include -I/usr/include/     -I/usr/include/freetype2  -lm -L/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib -lssl -lcrypto -lz -lusb -ffast-math   -lncurses -lsmbclient -lpng -lz -lmng -lz -ljpeg -lungif -lasound -ldl -lpthread -lcdio_cdda -lcdio -lcdio_paranoia  -lfreetype -lz -lbz2 -lfontconfig  -lfribidi -lass -lz -lbz2 -llzo2 -lmad -lspeex -lgsm -ltheoradec -logg -lmpg123 -lfaad -lrtmp -lopencore-amrnb -lopencore-amrwb   -lXext -lX11 -lpthread -lXss -lXv -lXinerama -lXxf86vm -lXxf86dga -laa -L/usr/lib 
-lcaca -lvga -lSDL -lGL -ldl -lEGL -ldl -lesd   -lfaac -lx264 -lpthread  -lfaac -lx264 -lpthread -o /tmp/mplayer-configure-4370-11197/tmp -I/tmp/build/tmp-MPlayer/ffmpegdeps/usr/include/schroedinger-1.0 -I/tmp/build/tmp-MPlayer/ffmpegdeps/usr/include/orc-0.4 -L/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib -lschroedinger-1.0
/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib/libschroedinger-1.0.a(libschroedinger_1.0_la-schromotion8.o): In function `schro_motion_render_u8':
schromotion8.c:(.text+0x1d58): undefined reference to `orc_program_new'
schromotion8.c:(.text+0x1d69): undefined reference to `orc_program_set_constant_n'
schromotion8.c:(.text+0x1d71): undefined reference to `orc_program_set_2d'
<SNIP>
/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib/libschroedinger-1.0.a(libschroedinger_1.0_la-schroarith.o): In function `schro_arith_encode_init':
schroarith.c:(.text+0x151): undefined reference to `orc_memset'
collect2: error: ld returned 1 exit status


Result is: no 
##########################################

 

orc config.log

orc configure output

orc make output

(links expire 30 days from today)

 

schroedinger config.log

schroedinger configure output

schroedinger make output

(links expire 30 days from today)

 

Does anyone have any helpful hints/tips...

Thanks in advance

Cheers

Edited by alphaomega
Link to comment
Share on other sites

What distro are you trying to install it on?

If you are talking about mplayer...

I'm building it on:

Slackware 14.0 release candidate 3

 

If you are talking about x264, orc, or schroedinger...

I'm installing those static libs into /tmp/build/tmp-MPlayer/ffmpegdeps

and hoping that they are automatically found when building mplayer.

 

x264 is detected correctly but not schroedinger.

I'm not quite sure how to get it to detect schroedinger correctly

or if there is some problem I'm over looking when building orc or schroedinger.

 

I've tried adding

/tmp/build/tmp-MPlayer/ffmpegdeps

to ld.so.conf and running ldconfig.

 

I've tried adding

export PKG_CONFIG_PATH="/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib/pkgconfig"

right before the configure line for mplayer.

 

Looking through the various folders in /tmp/build/tmp-MPlayer/ffmpegdeps

there are files there related to both orc and schroedinger.

 

Ex.

in the usr/lib folder I see these files:

liborc-0.4.a

liborc-0.4.la

liborc-test-0.4.a

liborc-test-0.4.la

libschroedinger-1.0.a

libschroedinger-1.0.la

 

in the usr/bin folder I see:

orc-bugreport

orcc

 

and in the usr/include folder I see the various

header files for both orc and schroedinger.

Edited by alphaomega
Link to comment
Share on other sites

Just a shot in the dark, but do you have libschroedinger-dev and libdirac-dev installed?

No. And I have no idea if they are even needed.

It's my understanding that only orc (The Oil Runtime Compiler) was needed by schroedinger.

Will look into it further.

Edited by alphaomega
Link to comment
Share on other sites

I've never had a full install of Mplayer on any of my Slackware installations. I only use the Mplayer plugin for Firefox. I just cheated and built it from a SlackBuild, I believe.

 

A cheat for you, maybe --> http://connie.slackware.com/~alien/slackbuilds/ (see Mplayer + Schrodinger) :)

Thanks...I've been there already looking through stuff for ideas

but the versions there are a little old (for example the version

of schroedinger there is 1.0.3 and was built for slackware 12.1).

 

 

Link to comment
Share on other sites

I came across some information which indicated that I needed to

change the pkg_config lines in the configure file for ffmpeg

so that orc's library could be used with static linking.

 

from:

pkg_config --libs

to:

pkg_config --static --libs

 

Am testing it now...

 

edit:

it did not work.

configure mplayer still does not pick up schroedinger...

and there are still all those undefined references

listed in the config.log for mplayer.

 

How exactly I am supposed to handle ffmpeg is confusing me.

When building...

I extract mplayer to a folder named mplayer.

I then extract ffmpeg to a folder named ffmpeg inside the mplayer folder.

I then extract x264, orc, and schroedinger into folders inside the ffmpeg folder.

 

I then enter the folders (x264, orc, and schroedinger) and

configure, make, and then make install to the temporary folder.

 

I do not do anything in the ffmpeg folder (no configure, make, or make install).

 

I then do a configure, make, and make install in the mplayer folder.

Everything appears to work except for schroedinger being detected by mplayer.

 

 

Edited by alphaomega
Link to comment
Share on other sites

No. And I have no idea if they are even needed.

It's my understanding that only orc (liboil) was needed by schroedinger.

Will look into it further.

In my minuscule experience of compiling, usually the corresponding -dev package is needed.

Link to comment
Share on other sites

V.T. Eric Layton

Thanks...I've been there already looking through stuff for ideas

but the versions there are a little old (for example the version

of schroedinger there is 1.0.3 and was built for slackware 12.1).

 

Just download the newer sources and modify the SlackBuild script accordling. Easy-peasy! :)

Link to comment
Share on other sites

Just download the newer sources and modify the SlackBuild script accordling. Easy-peasy! :)

I wish it were easy-peasy.

 

The version at the site is 1.0.3 Requires liboil.

Version 1.0.6 Requires liboil-0.3.16.

Version 1.0.9 Complete conversion to Orc and removal of liboil dependency.

Version 1.0.10 and 1.0.11 Requires Orc

 

I'm building schroedinger as a static lib for ffmpeg (which will be a static lib for mplayer).

 

So that slackbuild script would need quite a few changes because of the Orc dependency

which would pretty much leave me where I am at now :bangin:

Link to comment
Share on other sites

No, I just wanted to learn something new.

Fair enough. I'm too lazy to build something when I can get something else to do the same thing for less effort and/or cost. :whistling: ;)

Link to comment
Share on other sites

V.T. Eric Layton

AH! Well, if it was a learning project, carry on. That's something altogether different from just trying to fulfill a need. :)

Link to comment
Share on other sites

Sadly, I am having no luck finding anything helpful to get mplayer to build with a static schroedinger.

Even when using Alien Bob's build scripts as a starting point...I am still having no luck.

 

There are two build scripts I have looked at:

One which builds mplayer with a static ffmpeg and one which builds ffmpeg with other static libs.

 

What I have been trying to do is basically combine the two such that I have:

mplayer with a static ffmpeg and with the other static libs in ffmpeg.

 

It works and mplayer does detect some of the other static libs but

I just can't figure out why it does not pick up the schroedinger libs.

 

I've tried several things to get mplayer to pick up the static schroedinger libs:

 

1. I've tried exporting the PKG_CONFIG_PATH before running configure for mplayer.

export PKG_CONFIG_PATH="/path-to-static-libs/pkgconfig"

 

2. I've tried running "pkg-config --cflags --libs schroedinger-1.0" and adding those

options to the "--extra-cflags=" for mplayer.

 

3. I've tried adding "-lpthread -lorc-0.4 -lm -lrt" to the "--extra-ldflags=" for mplayer.

 

Nothing I've tried has worked.

The static libs for schroedinger are created.

When building schroedinger it does detect the static orc libs and builds.

configure for mplayer just doesn't pick them up for some reason.

 

I know I could just install Alien Bob's slackbuilds but his

mplayer build uses the internal ffmpeg and not the external

ffmpeg with the additional static libs.

 

I've even tried building mplayer so that is uses the external

ffmpeg with the additional static libs without success.

 

For now, I am at a loss. :(

 

I will post the most recent script I'm using to build mplayer as soon

as I clean out all the comments, junk, etc. (so it's easier to follow)

in case anyone might be able to spot what I'm missing.

 

Cheers

Link to comment
Share on other sites

Here is the test script I am currently using (I've stripped it down to just mplayer, ffmpeg, orc, and schroendinger):

#!/bin/sh
ARCH="i486"
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""

rm -rf /tmp/build/tmp-MPlayer/*
mkdir -p /tmp/build/tmp-MPlayer/ffmpegdeps/usr/{bin,include,lib,man}

cd /tmp/build/tmp-MPlayer
tar -xvf /home/alpha/Documents/Downloads/alien/mplayer/MPlayer-20120701.tar.xz

cd /tmp/build/tmp-MPlayer/MPlayer-20120701
tar -xvf /home/alpha/Documents/Downloads/alien/mplayer/ffmpeg-20120514.tar.xz

cd /tmp/build/tmp-MPlayer/MPlayer-20120701/ffmpeg
tar -xvf /home/alpha/Documents/Downloads/alien/mplayer/orc-0.4.16.tar.gz
tar -xvf /home/alpha/Documents/Downloads/alien/mplayer/schroedinger-1.0.11.tar.gz

cd /tmp/build/tmp-MPlayer/MPlayer-20120701/ffmpeg/orc-0.4.16

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="$SLKLDFLAGS" \
./configure \
 --prefix=/tmp/build/tmp-MPlayer/ffmpegdeps/usr \
 --libdir=/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib \
 --enable-static \
 --disable-shared \
 --program-prefix= \
 --program-suffix= \
 --build=$ARCH-slackware-linux \
 2>&1 | tee /tmp/build/tmp-MPlayer/configure-MPlayer_orc.log
make 2>&1 | tee /tmp/build/tmp-MPlayer/make-MPlayer_orc.log
make install 2>&1 | tee -a /tmp/build/tmp-MPlayer/make-MPlayer_orc.log

cd /tmp/build/tmp-MPlayer/MPlayer-20120701/ffmpeg/schroedinger-1.0.11

# Do not try to build the testsuite, it gives errors about multiple definitions:
cat /home/alpha/Documents/Downloads/alien/mplayer/schroedinger_notests.patch | patch -p1 --verbose \
 2>&1 | tee /tmp/build/tmp-MPlayer/patch-MPlayer_schroedinger.log

## Slackware uses a newer aclocal:
autoreconf -vif

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="-L/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib" \
PKG_CONFIG_PATH="/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib/pkgconfig" \
./configure \
 --prefix=/tmp/build/tmp-MPlayer/ffmpegdeps/usr \
 --libdir=/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib \
 --enable-static \
 --disable-shared \
 --program-prefix= \
 --program-suffix= \
 --build=$ARCH-slackware-linux \
 2>&1 | tee /tmp/build/tmp-MPlayer/configure-MPlayer_schroedinger.log
make 2>&1 | tee /tmp/build/tmp-MPlayer/make-MPlayer_schroedinger.log
make install 2>&1 | tee -a /tmp/build/tmp-MPlayer/make-MPlayer_schroedinger.log

cp schroedinger.pc \
 /tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib/pkgconfig/schroedinger.pc
cp schroedinger.pc \
 /tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib/pkgconfig/schroedinger-1.0.pc
( cd /tmp/build/tmp-MPlayer/ffmpegdeps/usr/include
 ln -sf schroedinger-1.0/schroedinger
)

cd /tmp/build/tmp-MPlayer/MPlayer-20120701

LDFLAGS="" \
CXXFLAGS="" \
CFLAGS="" \
./configure \
 --prefix=/usr \
 --mandir=/usr/man \
 --confdir=/etc/mplayer \
 --enable-gui \
 --enable-menu \
 --disable-arts \
 --disable-bitmap-font \
 --language=en \
 --enable-runtime-cpudetection \
 --extra-cflags="-I/tmp/build/tmp-MPlayer/ffmpegdeps/usr/include -I/tmp/build/tmp-MPlayer/ffmpegdeps/usr/include/schroedinger -I/tmp/build/tmp-MPlayer/ffmpegdeps/usr/include/orc-0.4  -L/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib -lschroedinger-1.0  -DRUNTIME_CPUDETECT" \
 --extra-ldflags="-L/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib -lssl -lcrypto -lz -lusb -lpthread -lorc-0.4 -lm -lrt" \
 2>&1 | tee /tmp/build/tmp-MPlayer/configure-MPlayer.log

# I'm currently not doing a make or make install on mplayer
# until I figure out why schroedinger is not detected

I am running it like so:

./mymplayerbuild >mymplayerbuild.log

But configure for mplayer does not pick up schroedinger:

Checking for libdirac ... no

Checking for libschroedinger ... no

Complete mymplayerbuild.log (expires 30 days from now): mymplayerbuild.log

This is what I see at the command line when "autoreconf -vif" is run when building schroendinger

(I'm not sure how to handle this or if this is part of the problem) :

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
/usr/share/aclocal/imlib.m4:9: warning: underquoted definition of AM_PATH_IMLIB
/usr/share/aclocal/imlib.m4:9:   run info '(automake)Extending aclocal'
/usr/share/aclocal/imlib.m4:9:   or see http://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
/usr/share/aclocal/imlib.m4:9: warning: underquoted definition of AM_PATH_IMLIB
/usr/share/aclocal/imlib.m4:9:   run info '(automake)Extending aclocal'
/usr/share/aclocal/imlib.m4:9:   or see http://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
schroedinger/Makefile.am:163: `%'-style pattern rules are a GNU make extension
testsuite/Makefile.am:151: `%'-style pattern rules are a GNU make extension
autoreconf: Leaving directory `.'

 

Does anyone have any ideas?

Thanks in advance

Cheers

Edited by alphaomega
Link to comment
Share on other sites

I'm getting closer...

configure for mplayer is picking up the static schroedinger lib.

Checking for libdirac ... no

Checking for libschroedinger ... yes

I edited the configure file for mplayer (though I'm not sure if that is the correct way of fixing the issue).

sed -i -e "s/pkg_config --silence-errors --libs schroedinger-1.0/pkg_config --silence-errors --static --libs schroedinger-1.0/" \
 configure

And I exported the PKG_CONFIG_PATH before configuring mplayer.

export PKG_CONFIG_PATH="/tmp/build/tmp-MPlayer/ffmpegdeps/usr/lib/pkgconfig"

Link to comment
Share on other sites

I'm getting closer...

Actually not. :(

 

Although configure for mplayer does detect schroedinger...

looking through the list of available codecs I am not seeing it.

 

$ ./mplayer -vc help | grep -i 'schro\|dirac'

ffdirac     ffmpeg    working   FFmpeg Dirac  [dirac]                                                                                        
fflibschroedinger ffmpeg    working   Dirac (through FFmpeg libschroedinger)  [libschroedinger]                                              
fflibdirac  ffmpeg    working   Dirac (through FFmpeg libdirac)  [libdirac]                                                                  

These are the same ones listed in Slackware's mplayer executable.

To my understanding they only decode (no encode).

 

$ objdump -T ./mplayer | grep -i schro

08a4de00 g    DF .text  000000a3  Base        schro_decoder_set_picture_order
08a7e5d0 g    DF .text  00000006  Base        schro_encoder_get_frame_stats_size
08a64450 g    DF .text  0000024b  Base        schro_params_init
08aa99a0 g    DF .text  00000678  Base        schro_frame_ssim
08a4e1d0 g    DF .text  0000003d  Base        schro_decoder_need_output_frame
08a5d9a0 g    DF .text  00000f16  Base        schro_decoder_decode_lowdelay_transform_data_fast
<SNIP>

These are in the mplayer executable I built.

They are not listed in Slackware's mplayer executable.

 

Oh well...

Edited by alphaomega
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...