[Atrix 4G General] supRyze:
mplayer-omx

The MXPlayer is the musthave android application, I use it myself while not on lapdock.

But with the lapdock I think it is bad idea to use it in aiw, and it is because:

1) I see a flicker while playing videos in MXPlayer via aiw.

2) Native resolution of atrix phone is 960x540 and then it is rescaled to 1366x768, do not forget that the original video could be 720x400.

So the video was rescale twice thus the quality has been already degraded.

The only good point is that it works out of the box.

For any case when "Entertainment center" is usable it should be used, but these are not many cases. :(

I guess I forgot that not many users of Gentop2 are experienced in linux, though that should be as a given.

But If you would succeed building, it will be great by producing feedback and double checking if it is usable indeed.

The usual approach of installing opensource applications is to get them from repository, but if they are not there...

One can build it from source codes downloaded.

Using MPlayer as example, one should (everything is done on the atrix itself):

1) download sources from their web site www . mplayerhq . hu,

I downloaded "http : // www . mplayerhq . hu /MPlayer/releases/MPlayer-1.1.tar.gz" to the adas home directory.

One can do it using browser or wget standard utility.

2) unpack it in the home directory with the "tar zxf MPlayer-1.1.tar.gz" command. The "MPlayer-1.1" folder should appear.

3) go to that directory with "cd MPlayer-1.1" command.

4) one can apply additional patches or use a vanilla version without any modifications.

I applied the OMX_mplayer.patch which I described in my previous post.

It was done using "patch -p1 <../OMX_mplayer.patch" command, of course the patch itself was downloaded before to the same directory as sources.

5) at this point the common way is a

"./configure; make; sudo make install"

combo, a better aproach is to use "checkinstall" scripts but I dont think

we can afford it on atrix and I dont know how checkinstall behaves on gentoo.

So I was using configure optimization parameters from /etc/make.conf and first command looks like:

./configure --enable-menu --extra-cflags="-march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=softfp"

Once it finished, I used "make -j3" to launch build proccess.

After the build completes without error, mplayer binary should appear and it could be checked inplace to understand if it's worth installing.

If it works as expected, one should install it to the system directories with the "sudo make install" command.

P.S.: Why did I supply configure with "--enable-menu" flag?

I think it is a remnant of my tries to enable OSD in mplayer. Only after investigating "libvo/vo_omx.c" I found out that draw_osd(void) function was empty and switch to git version of that file.

P.P.S.: As before remove spaces from the links, I still cant post web-links.

---------- Post added at 11:00 PM ---------- Previous post was at 10:20 PM ----------

The build process should complete in half of an hour.

The exact number on my atrix were:

real	26m46.044s
user	50m36.290s
sys	1m51.270s
adas@atrix ~/src/MPlayer-1.1 $ ./mplayer

A couple of words about usage:

A generic way of using mplayer on the command line is "$ mplayer -vo omx Movie.avi".

But many default options can be brought to "~/.mplayer/config" configuration file. The contents of my file is the following:

adas@atrix ~/src/MPlayer-1.1 $ cat ~/.mplayer/config
# Write your default config options here!
vo=omx
cache=1024
af=scaletempo
lavdopts="threads=2:skiploopfilter=all"
fontconfig=yes
ass=yes

The "af=scaletempo" just means that I usually use "]" key or "-speed" parameter to increase speed in movies, and can be omitted for a common user.

The next step is to modify the "/etc/mc/mc.ext" file so as when one clicks enter while cursor is placed on the media file the mplayer will be lauched.

Of course it concerns only "Midnight Commander", I don't use gui "File manager".

Whatever it was on the 487 line, now it looks as following:

include/video
Open=(mplayer %f)
#Open=(gtv %f >/dev/null 2>&1 &)
#Open=(xanim %f >/dev/null 2>&1 &)

### Documents ###

I remember the default command was mplayer blablablah with a "&" character on the end

which is not that we want since MPlayer goes fullscreen and should preserve keyboard focus.

With the default mc.ext file, the mc just gets back the focus after launching mplayer in the background,

so any keyboard input doesn't go to mplayer but to the mc instead,

and there is no way to quit the mplayer other than "killall mplayer" command.

This is why mc.ext should be modified.

P.P.P.S.:

By the way I forgot that I made symlinks for openmax includes:

$ sudo -s
# cd /usr/include
# ln -s openmax OpenMAX
# cd openmax
# ln -s il IL

Otherwise one can correct mplayer sources #include directives.

P.P.P.P.S.:

Sometimes mplayer uses ffmpeg ffodivx for xvid encoded videos and in that case user will see a black screen.

That can be solved by providing "-vc xvid" command line argument. Yet using xvid for all divx avi-files is bad idea because xvid-decoder can be slower than ffmpeg.

That's a true mystery why the svn version of mplayer from my distro on my PC selects them right but stable 1.1 on lapdock does not.