Language Selection

English French German Italian Portuguese Spanish

MiniTutor: MPlayer and Video Output

Filed under
Howtos

'There are dozen of available video output drivers and video output options, it will take at least several pages to explain everything about them, but as you can always read more complete manuals and also the MPlayer man pages, the current minitutor is only shows some important and interesting video output you can use to play around your favorite movies and files.

The MPlayer offers dozen of video output options you can use to change the way the video file is showed such as '-brightness', '-contrast', '-fs' fullscreen playback, '-geometry', '-saturation' and more. For example, you can play a video file by setting its color to grayscale and fullscreen by using 'mplayer -fs -saturation -100 file.mpeg'.
Some of these video output options can be also used to video output drivers, you need to read the man page to see what you can use.

The MPlayer video output drivers (-vo) are interfaces to different video ouput facilities, and the syntax to use with -vo option is '-vo driver1:suboption1=value'. The options you can use are great not only to get a better displayed image but also to play around and get pieces of your video file, or even play video out of X Server.

Play video out of X, out of the graphical mode, it's a very important feature we have on MPlayer. In order to play a video file out of X you can use some video output options, such as 'vesa' and fbdev'. The 'fbdev' plays your video file by using the kernel framebuffer and a device you may or may not specify at command line, for example 'mplayer -vo fbdev file.mpeg'.

Another great feature are the options to save the video output to a non video file, for example images and/or an animated gif. In order to save a video file to an animated gif you need to use the option 'gif89a', for example you can use a line like 'mplayer -vo gif89a:15.0:movie.gif file.mpeg'. In the example we change the default output filename which is out.gif to movie.gif and also set the framerate to 15.0 instead of use the default 5.0.

There are also drivers for X you can use to get a better image of your video file, such as 'sdl' which uses the SDL library and 'gl' to use OpenGL driver. Also you can use the 'null' to produces no video output and some others.

One very interesting driver is 'aa', the ASCII art video output driver that works on a text console. You can get very intriguing pictures from your video in ASCII art (picture below). It's really an impressive driver specially because it has several options you can count such as 'extended' which uses all 256 characters, 'driver' which is used to select the aalib driver (X11, curses, linux), and more. The ASCII Art MPlayer accepts rendering options, dithering options, monitor parameters, size options, attributes, font options, and others. It almost a player inside the player. An example: mplayer -vo aa:bold:driver=curses:contrast=50 file.mpeg.

The video output options and video output drivers are only a small percent of the MPlayer's power.
Read the man page and search for other options you can use, and also do not forget to take a look at Mencoder, the MPlayer video encoder.

You have a powerful video and audio player, fell free to play and play around it.

The MPlayer homepage: HERE
Minitutor from: GoblinX Minitutors

More in Tux Machines

today's howtos

Linux 4.15, Linux 4.16, and Linux Foundation's CNCF and CII

  • Linux 4.15 Gets Fixed To Report Current CPU Frequency Via /proc/cpuinfo
    A change recently in the Linux kernel led the CPU MHz reported value via /proc/cpuinfo to either be the nominal CPU frequency or the most recently requested frequency. This behavior changed compared to pre-4.13 kernels while now it's been fixed up to report the current CPU frequency.
  • Linux 4.16 Will Be Another Big Cycle For Intel's DRM Driver
    We are just through week one of two for the Linux 4.15 merge window followed by eight or so weeks after that before this next kernel is officially released. But Intel's open-source driver developers have already begun building up a growing stack of changes for Linux 4.16 when it comes to their DRM graphics driver.
  • CNCF Wants You to Use 'Certified Kubernetes'
  • Open Source Threat Modeling
    Application threat modeling is a structured approach to identifying ways that an adversary might try to attack an application and then designing mitigations to prevent, detect or reduce the impact of those attacks. The description of an application’s threat model is identified as one of the criteria for the Linux CII Best Practises Silver badge.

Linux World Domination and Microsoft Corruption in Munich

Programming/Development: 'DevOps', NumPy, Google SLING

  • 5 DevOps leadership priorities in 2018
    This week, DevOps professionals gathered in San Francisco to talk about the state of DevOps in the enterprise. At 1,400 attendees, the sold-out DevOps Enterprise Summit has doubled in size since 2014 – a testament to the growth of the DevOps movement itself. With an ear to this event and an eye on the explosion of tweets coming out of it, here are five key priorities we think IT leaders should be aware of as they take their DevOps efforts into the new year.
  • NumPy Plan for dropping Python 2.7 support
    The Python core team plans to stop supporting Python 2 in 2020. The NumPy project has supported both Python 2 and Python 3 in parallel since 2010, and has found that supporting Python 2 is an increasing burden on our limited resources; thus, we plan to eventually drop Python 2 support as well. Now that we're entering the final years of community-supported Python 2, the NumPy project wants to clarify our plans, with the goal of to helping our downstream ecosystem make plans and accomplish the transition with as little disruption as possible.
  • Google SLING: An Open Source Natural Language Parser
    Google Research has just released an open source project that might be of interest if you are into natural language processing. SLING is a combination of recurrent neural networks and frame based parsing. Natural language parsing is an important topic. You can get meaning from structure and parsing is how you get structure. It is important in processing both text and voice. If you have any hope that Siri, Cortana or Alexa are going to get any better then you need to have better natural language understanding - not just the slot and filler systems currently in use.