MPlayer has a very rich input command processing subsystem that can be manipulated with the keyboard, mouse, joystick or LIRC remote control. You also can customize several keyboard keys to invoke MPlayer's controls.
The following provides the list of keys that can be configured. The defaults are very sensible, and you may not need to change them:
$ mplayer -input keylist
You also can find MPlayer's controls for seeking, volume control, brightness correction and other things with the following command:
$ mplayer -input cmdlist
The slave.txt file that comes with MPlayer's documentation explains how to customize the input.conf and menu.conf files that come with the MPlayer package in your Linux distribution.
You also can have MPlayer accept input commands from a FIFO file (FIFO stands for First In, First Out). This comes in handy when it is reading the media from the standard input:
$ mkfifo /tmp/fifo $ cat playlist.txt | mplayer -input ↪file:/tmp/fifo -cache 8192 -playlist -
Typing the following mutes and executes it again with the audio unmuted:
$ echo 'mute' > /tmp/fifo
You can use the mouse for the usual seek operations. The mouse wheel is configured by default to seek files in both directions.
Apropos of input methods, MPlayer has excellent support for on-screen display (OSD). I normally use only the superb scalable TTF fonts. These are not available on the MPlayer Web site.
The following command displays a timer:
$ mplayer -osdlevel 3 -font ↪/home/girish/.ttffonts/Comicbd.ttf video.avi
See Figure 2 for a sample of this display.
You can create a custom menu to browse using the keyboard with the OSD facility. It even has a console where you can enter MPlayer slave commands.
As you can see, the scalability of the OSD fonts does not break with the video scale filter.
Here is how to create this kind of configuration. First, set up most everything in the config file. Here is my ~/.mplayer/config file:
# Write your default config options here! # Use Matrox driver by default. vo=sdl font=/home/girish/.ttffonts/comicbd.ttf vf=hue,eq,screenshot #menu-startup=yes menu=yes subfont-autoscale=3 subfont-osd-scale=8 subfont-text-scale=8 subpos=50 spuaa=4 osdlevel=3 # I love doing headstand (Sirsasana) while watching videos. #flip=yes # Decode/encode multiple files from PNG, # start with mf://filemask mf=type=png:fps=25 # Eerie negative images are cool. #vf=eq2=1.0:-0.8
The input configuration and menu configuration are stored separately in input.conf and menu.conf, respectively. The menu.conf file needs to have a section that looks something like this:
<cmdlist name="main" title="MPlayer OSD menu" ptr="<>" > <e name="Pause" ok="pause"/> <e name="Prev/Next" ok="pt_step 1" cancel="pt_step -1"/> <e name="Jump to ..." ok="set_menu jump_to"/> <e name="Open ..." ok="set_menu open_file"/> <e name="Open playlist ..." ok="set_menu open_list"/> <e name="Help" ok="set_menu man"/> <e name="Pref" ok="set_menu pref_main"/> <e name="Properties" ok="set_menu properties"/> <e name="Console" ok="set_menu console0"/> <e name="Quit" ok="quit"/> </cmdlist>
You need this line in input.conf in order to tell MPlayer what event invokes the menu. The setting here invokes the menu if you click the left-mouse button:
MOUSE_BTN0 menu main
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released
- Parsing an RSS News Feed with a Bash Script
- Rogue Wave Software's Zend Server
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide