Blog karp0tt

GNU/Linux configurations

Improved mplayer with ffmpeg-mt for ordered chapters

The method described in my previous post is still working, but there are several issues regarding ffmpeg-mt and mplayer.

1. That mplayer includes a libass version old enough to have been written at the same time the pharaos were born
2. That git version for ffmpeg-mt isn’t compiling properly and it needs a git reset to an older version.
3. Outdated.
4. I wanted to write a new post :p

First some dependencies:
# emerge -av git
# emerge -av1 autoconf automake freetype libpng libtool lzo ncurses zlib

Now the actual build-scripts for mplayer:
$ git clone git://

Since the usual (./configure make make install) is outdated for this one, consult the README for the scripts actual build configuration.

Activate (and download) the source code for mplayer and ffmpeg-mt:
$ cd mplayer-build
$ ./init
$ ./enable-mt

The files “mplayer_options” and “common_options” should only be edited, if you know what you’re doing.

I recommend adding
(needed for screenshots) to ffmpeg_options (see ./ffmpeg/configure –help for more) and editing script/ffmpeg-config to match your processors CFLAGS (native is a common flag since gcc-4.2, but change it only, when you know your processors CFLAGS).

Since my processor is core2 compatible, I did the following:
sed -i 's#-–cpu=native#-–cpu=core2#' script/ffmpeg-config

Now the only thing needed is just make the script does the rest for you.
$ make

After that’s done, you can find the mplayer executable in the mplayer subdirectory.

Copy or link it to some directory in your $PATH or do, what you want to do with it and enjoy your newly compiled mplayer with multithreading and ordered chapters support.


Written by body0r

October 31, 2009 at 11:00 pm

8 Responses

Subscribe to comments with RSS.

  1. […] with 8 comments Outdated, for the new recommended way check this post. […]

  2. Hi! Thank you for this guide, but it does not work for me. When I’m run “./init”, I get this error:

    Synchronizing submodule url for ‘mplayer’
    error: pathspec ‘4a35807e7272ee61882e597003a512e07f004f27’ did not match any file(s) known to git.
    Unable to checkout ‘4a35807e7272ee61882e597003a512e07f004f27’ in submodule path ‘mplayer’
    Traceback (most recent call last):
    File “./init”, line 77, in
    File “./init”, line 59, in main
    File “/home/b3nd3r/my/src/mplayer-build/script/”, line 52, in submodule_clone
    check_call(‘git submodule update’.split()+[name])
    File “/usr/lib/python2.6/”, line 488, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command ‘[‘git’, ‘submodule’, ‘update’, ‘mplayer’]’ returned non-zero exit status 1

    I use Gentoo, unstable.
    Portage (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r0, 2.6.31-gentoo-r4 i686)

    Which versions you use? Maybe some versions is not work with this script?


    November 4, 2009 at 9:10 pm

  3. Those are some errors about git
    But, I don’t know why, I’ve tested it right now and it checked out with no problems (same submodule-version)

    I’m on Funtoo unstable.
    Git has the same version

    Maybe you could try it again after recompiling git?


    November 5, 2009 at 5:36 am

  4. Hi!

    I recompiled git, but got the same errors.


    November 7, 2009 at 9:08 am

  5. Hi again.

    I solve the problem. I found a solution on this sites (sorry for links):

    I changed in my .bashrc GREP_OPTIONS from “–color=always” to “–color=auto” and it’s works!


    November 7, 2009 at 9:48 am

  6. ah, the old color problem within bash :~

    Didn’t think someone would still use directory colors, but then, I’m using zsh for quite a while now.


    November 10, 2009 at 4:24 am

  7. Worked like a charm. Thanks for the guide!


    November 11, 2009 at 7:09 pm

  8. […] the original post:  Improved mplayer with ffmpeg-mt for ordered chapters « Blog karp0tt By admin | category: mplayer | tags: compiling-properly, git-reset, git-version, […]

Comments are closed.

%d bloggers like this: