MPlayer: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (Mplayer moved to MPlayer: capitalization)
(various adjustments for clarification)
Line 1: Line 1:
It is possible to install MPlayer on the XO, without any recompiling.
It is possible to install Mplayer on the XO, without any recompiling. The process is still long and convoluted, and will load in a large group of dependencies. As always, MPlayer, or anything functional, may not respect the patent laws of your jurisdiction; make things work at your own risk. This will require a live internet connection, and some quality time with the terminal activity. While you're here, you can also install VLC, the two both have their uses (for example, "vlc -I skins2 *.mp3" gives a tiny floating window to play music).
The process is relatively tedious, and will require loading in a large group of dependencies.


Note that MPlayer, or anything functional, may not respect the patent laws of your jurisdiction; make things work at your own risk.
First start with installing the [http://rpm.livna.org/livna-release-7.rpm livna repository] package, download it and install with "rpm -i".


== Installation ==
Next, run a "yum update" to update the package database.


This will require a live internet connection, and some quality time with the terminal activity.
Now, try to "yum install mplayer". It won't work, but it will tell you what dependencies are missing.


* install the Livna repository package: <code># rpm -i http://rpm.livna.org/livna-release-7.rpm</code>
[http://rpm.pbone.net/index.php3/stat/4/idpl/5528126/com/libdvdnav-4.1.1-2.fc7.i386.rpm.html libdvdnav-4] lives outside any known repository. Download (wget, click) it manually and again use "rpm --nodeps -i".
* perform an update of the package database: <code># yum update</code>
* [''optional / obsolete''] try to install MPlayer: <code># yum install mplayer</code> - it won't work, but it will list the missing dependencies
* the required [http://rpm.pbone.net/index.php3/stat/4/idpl/5528126/com/libdvdnav-4.1.1-2.fc7.i386.rpm.html libdvdnav-4] lives outside any known repository - download it manually (<code>wget</code> or click) and again use <code>rpm --nodeps -i</code>
* install MPlayer: <code># yum install mplayer</code> - now it should work


Redo "yum install mplayer", and now it should work. It's not sugarified, but the sugar GUI still gets along with a placeholder icon in the running app ring.
This is not yet "Sugar-ified", but the [[Sugar]] GUI will simply use a placeholder icon in the running app ring.


== Configuration ==
Mplayer's default settings need a little modification..


MPlayer's default settings need a little modification.
In your '''~/.mplayer/config''' put
Modify or create the files as listed below:
#A little cache helps with slower flash drives
cache=1024
#the window manager will always give fullscreen,
#but telling that to mplayer gives the right aspect ratio
fs=yes


{{Box File|1=~/.mplayer/config|
And for your '''~/.mplayer/input.conf''' you can put (modified from the /etc/mplayer example, the early KP* bindings are all that really matter)
2=
<pre style="margin: 5px; border: none; padding: 0; background: none;">
# cache to help with slower flash drives
cache=1024


# fullscreen mode
##
fs=yes
## MPlayer input control file
</pre>
##
}}
## You are able to redefine default keyboard/joystick/mouse/LIRC bindings, or
Note: The window manager will always give fullscreen, but the MPlayer setting ensures using the right aspect ratio.
## add new ones here.
{{Box File|1=~/.mplayer/input.conf|
## See DOCS/tech/slave.txt for possible commands that can be bound.
2=
## Also see mplayer -input cmdlist for other possible options.
<pre style="margin: 5px; border: none; padding: 0; background: none;">
## The file should be placed in the $HOME/.mplayer directory.
##
##
## MPlayer input control file
##
RIGHT seek +10
## You are able to redefine default keyboard/joystick/mouse/LIRC bindings, or
KP6 seek +10
## add new ones here.
LEFT seek -10
## See DOCS/tech/slave.txt for possible commands that can be bound.
KP4 seek -10
## Also see mplayer -input cmdlist for other possible options.
DOWN seek -60
## The file should be placed in the $HOME/.mplayer directory.
KP2 seek -60
##
UP seek +60

KP8 seek +60
PGUP seek 600
RIGHT seek +10
PGDWN seek -600
KP6 seek +10
LEFT seek -10
KP3 pause
KP4 seek -10
KP7 volume -1
DOWN seek -60
KP9 volume +1
KP2 seek -60
KP1 osd
UP seek +60
KP8 seek +60
m mute
PGUP seek 600
# switch_audio # switch audio streams
PGDWN seek -600
+ audio_delay 0.100
KP3 pause
- audio_delay -0.100
KP7 volume -1
[ speed_mult 0.9091 # scale playback speed
KP9 volume +1
] speed_mult 1.1
KP1 osd
{ speed_mult 0.5

} speed_mult 2.0
m mute
BS speed_set 1.0 # reset speed to normal
# switch_audio # switch audio streams
q quit
+ audio_delay 0.100
ESC quit
- audio_delay -0.100
ENTER pt_step 1 1 # skip to next file
[ speed_mult 0.9091 # scale playback speed
p pause
] speed_mult 1.1
. frame_step # advance one frame and pause
{ speed_mult 0.5
SPACE pause
} speed_mult 2.0
HOME pt_up_step 1
BS speed_set 1.0 # reset speed to normal
END pt_up_step -1
q quit
> pt_step 1 # skip to next file
ESC quit
< pt_step -1 # previous
ENTER pt_step 1 1 # skip to next file
INS alt_src_step 1
p pause
DEL alt_src_step -1
. frame_step # advance one frame and pause
o osd
SPACE pause
I osd_show_property_text "${filename}" # display filename in osd
HOME pt_up_step 1
z sub_delay -0.1 # subtract 100 ms delay from subs
END pt_up_step -1
x sub_delay +0.1 # add
> pt_step 1 # skip to next file
9 volume -1
< pt_step -1 # previous
/ volume -1
INS alt_src_step 1
0 volume 1
DEL alt_src_step -1
* volume 1
o osd
1 contrast -1
I osd_show_property_text "${filename}" # display filename in osd
2 contrast 1
z sub_delay -0.1 # subtract 100 ms delay from subs
3 brightness -1
x sub_delay +0.1 # add
4 brightness 1
5 hue -1
9 volume -1
6 hue 1
/ volume -1
0 volume 1
7 saturation -1
* volume 1
8 saturation 1
1 contrast -1
( balance -0.1 # adjust audio balance in favor of left
2 contrast 1
) balance +0.1 # right
3 brightness -1
d frame_drop
4 brightness 1
r sub_pos -1 # move subtitles up
5 hue -1
t sub_pos +1 # down
6 hue 1
#? sub_step +1 # immediately display next subtitle
7 saturation -1
#? sub_step -1 # previous
8 saturation 1
#? sub_scale +0.1 # increase subtitle font size
#? sub_scale -0.1 # decrease subtitle font size
( balance -0.1 # adjust audio balance in favor of left
) balance +0.1 # right
f vo_fullscreen
d frame_drop
T vo_ontop # toggle video window ontop of other windows
w panscan -0.1 # zoom out with -panscan 0 -fs
r sub_pos -1 # move subtitles up
e panscan +0.1 # in
t sub_pos +1 # down
#? sub_step +1 # immediately display next subtitle
s screenshot # take a png screenshot with -vf screenshot
# S will take a png screenshot of every frame
#? sub_step -1 # previous
#? sub_scale +0.1 # increase subtitle font size
#? sub_scale -0.1 # decrease subtitle font size
h tv_step_channel 1
f vo_fullscreen
l tv_step_channel -1
T vo_ontop # toggle video window ontop of other windows
n tv_step_norm
w panscan -0.1 # zoom out with -panscan 0 -fs
b tv_step_chanlist
e panscan +0.1 # in
s screenshot # take a png screenshot with -vf screenshot
##
# S will take a png screenshot of every frame
## GUI

##
h tv_step_channel 1
l tv_step_channel -1
#l gui_loadfile
n tv_step_norm
#t gui_loadsubtitle
b tv_step_chanlist
#a gui_about

#s gui_stop
##
#p gui_playlist
## GUI
#r gui_preferences
##
#c gui_skinbrowser

#l gui_loadfile
##
#t gui_loadsubtitle
## Joystick section
#a gui_about
## WARNING: joystick support has to be explicitly enabled at
#s gui_stop
## compiletime with --enable-joystick
#p gui_playlist
##
#r gui_preferences
#c gui_skinbrowser
JOY_RIGHT seek 10

JOY_LEFT seek -10
##
JOY_UP seek 60
## Joystick section
JOY_DOWN seek -60
## WARNING: joystick support has to be explicitly enabled at
JOY_BTN0 pause
## compiletime with --enable-joystick
JOY_BTN1 osd
##
JOY_BTN2 volume 1

JOY_BTN3 volume -1
JOY_RIGHT seek 10
JOY_LEFT seek -10
JOY_UP seek 60
JOY_DOWN seek -60
JOY_BTN0 pause
JOY_BTN1 osd
JOY_BTN2 volume 1
JOY_BTN3 volume -1
</pre>
}}
(modified version of the <code>/etc/mplayer</code> example - the early KP* bindings are all that really matter)

== Further Steps ==

While you're here, you can also install [[VLC]], the two both have their uses (for example, <code>vlc -I skins2 *.mp3</code> gives a tiny floating window to play music).

Revision as of 11:06, 28 January 2008

It is possible to install MPlayer on the XO, without any recompiling. The process is relatively tedious, and will require loading in a large group of dependencies.

Note that MPlayer, or anything functional, may not respect the patent laws of your jurisdiction; make things work at your own risk.

Installation

This will require a live internet connection, and some quality time with the terminal activity.

  • install the Livna repository package: # rpm -i http://rpm.livna.org/livna-release-7.rpm
  • perform an update of the package database: # yum update
  • [optional / obsolete] try to install MPlayer: # yum install mplayer - it won't work, but it will list the missing dependencies
  • the required libdvdnav-4 lives outside any known repository - download it manually (wget or click) and again use rpm --nodeps -i
  • install MPlayer: # yum install mplayer - now it should work

This is not yet "Sugar-ified", but the Sugar GUI will simply use a placeholder icon in the running app ring.

Configuration

MPlayer's default settings need a little modification. Modify or create the files as listed below:

 File: ~/.mplayer/config
# cache to help with slower flash drives
cache=1024

# fullscreen mode
fs=yes

Note: The window manager will always give fullscreen, but the MPlayer setting ensures using the right aspect ratio.

 File: ~/.mplayer/input.conf
##
## MPlayer input control file
##
## You are able to redefine default keyboard/joystick/mouse/LIRC bindings, or
## add new ones here.
## See DOCS/tech/slave.txt for possible commands that can be bound.
## Also see mplayer -input cmdlist for other possible options.
## The file should be placed in the $HOME/.mplayer directory.
##

RIGHT seek +10
KP6 seek +10
LEFT seek -10
KP4 seek -10
DOWN seek -60
KP2 seek -60
UP seek +60
KP8 seek +60
PGUP seek 600
PGDWN seek -600
KP3 pause
KP7 volume -1
KP9 volume +1
KP1 osd

m mute
# switch_audio          # switch audio streams
+ audio_delay 0.100
- audio_delay -0.100
[ speed_mult 0.9091	# scale playback speed
] speed_mult 1.1
{ speed_mult 0.5
} speed_mult 2.0
BS speed_set 1.0	# reset speed to normal
q quit
ESC quit
ENTER pt_step 1 1       # skip to next file
p pause
. frame_step            # advance one frame and pause
SPACE pause
HOME pt_up_step 1
END pt_up_step -1
> pt_step 1             # skip to next file
< pt_step -1            #         previous
INS alt_src_step 1
DEL alt_src_step -1
o osd
I osd_show_property_text "${filename}"     # display filename in osd
z sub_delay -0.1        # subtract 100 ms delay from subs
x sub_delay +0.1        # add
9 volume -1
/ volume -1
0 volume 1
* volume 1
1 contrast -1
2 contrast 1
3 brightness -1
4 brightness 1
5 hue -1
6 hue 1
7 saturation -1
8 saturation 1
( balance -0.1          # adjust audio balance in favor of left
) balance +0.1          #                                  right
d frame_drop
r sub_pos -1            # move subtitles up
t sub_pos +1            #                down
#? sub_step +1		# immediately display next subtitle
#? sub_step -1		#                     previous
#? sub_scale +0.1	# increase subtitle font size 
#? sub_scale -0.1	# decrease subtitle font size                  
f vo_fullscreen
T vo_ontop              # toggle video window ontop of other windows
w panscan -0.1          # zoom out with -panscan 0 -fs
e panscan +0.1          #      in
s screenshot            # take a png screenshot with -vf screenshot
					 # S will take a png screenshot of every frame

h tv_step_channel 1
l tv_step_channel -1
n tv_step_norm
b tv_step_chanlist

##
## GUI
##

#l gui_loadfile
#t gui_loadsubtitle
#a gui_about
#s gui_stop
#p gui_playlist
#r gui_preferences
#c gui_skinbrowser

##
## Joystick section
## WARNING: joystick support has to be explicitly enabled at
##          compiletime with --enable-joystick
##

JOY_RIGHT seek 10
JOY_LEFT seek -10
JOY_UP seek 60
JOY_DOWN seek -60
JOY_BTN0 pause
JOY_BTN1 osd
JOY_BTN2 volume 1
JOY_BTN3 volume -1

(modified version of the /etc/mplayer example - the early KP* bindings are all that really matter)

Further Steps

While you're here, you can also install VLC, the two both have their uses (for example, vlc -I skins2 *.mp3 gives a tiny floating window to play music).