Sunday, April 27, 2014

How to view video in Linux console

How to view video without X in console? Here some tricks about it.

View video in ASCII mode. Mplayer with aalib
Mplayer has a library AAlib, allows you to display graphics in a tabular format using ASCII renderer. The library, by the way, not only supports mplayer, but some games.
Type in console:
mplayer -vo aa file_name.avi
If you will see not whole video try it:

mplayer -vo aa -monitorpixelaspect 0.5 file_name.avi
You can adjust the brightness and contrast using the keys:

1 - decrease contrast;
2 - increase contrast;
3 - Reduce brightness;
4 - increase brightness;
7 - invert image.
You can tune these parameters to best quality.

View video in color ASCII. Mplayer with libcaca
This library supports 16 colors and 256 color pairs.
But libcaca doesn't support adjusting brightness and contrast.
Type in console:
mplayer -vo caca file_name.avi







View video in Matrix mode.Mplayer with matrixview

Library allows you to watch almost ASCII graphics - instead of pixels - matrix.
Support of adjusting brightness and contrast is unknown in this library.

Type in console:
mplayer -vo matrixview file_name.avi
Good view has only videos with contrasting colors sharp transition.

View video in console without X in Framebuffer
These variants has not good view. To get better quality use Framebuffer.
Type in console:
mplayer -vo fbdev2 file_name.avi
For fullscreen mode:
mplayer -vo fbdev2 -zoom -xy 1920 file_name.avi
Here type you display size instead of 1920 parameter, in pixels.






So there are some ways to see video in console.

No comments:

Post a Comment