On Linux, a good way to play video recordsdata with the terminal. Going this route means you bypass the entire fancy UI parts in favor of simplicity. Introducing Mplayer, it’s a strong command-line based mostly video participant that you should use to play video from the Terminal. It helps many various media codecs, and works very properly on computer systems which can be low on RAM.
Set up Mplayer
Earlier than utilizing Mplayer, you’ll want to put in it in your PC. Observe the directions under subsequent to your Linux distribution. Remember the fact that you’ll have to be operating Ubuntu, Debian, Arch Linux, Fedora, or OpenSUSE.
Ubuntu
sudo apt set up mplayer
Debian
sudo apt-get set up mplayer
Arch Linux
sudo pacman -S mplayer
Fedora
sudo dnf set up mplayer
OpenSUSE
sudo dnf set up mplayer
Construct From Supply
Must construct Mplayer from supply? To achieve this, you’ll have to first set up a pair packages. These packages are vital for the construct course of. Open up your package deal supervisor, seek for “build-essential”, “subversion”, “check install”, “yasm”, “dockbook-xml”, “git”, “xsltproc” and “libxm2-utils”.
Word: Should you can’t discover these dependencies in your model of Linux, consider looking at the official Mplayer website for guidance.
When all of the dependencies are taken care of, obtain the newest model of the supply code.
cd mplayer
Run configure. The configure script will scan your Linux PC and put together it for the construct course of.
./configure
Subsequent, use the make command to compile the supply code.
make
Set up this system with:
make set up Every time there's a Mplayer replace you may have to re-run the constructing course of. For extra data on compiling Mplayer from supply, check the website.
Utilizing Mplayer
The Mplayer instrument is straightforward but highly effective. It’s a command-line based mostly app, so to work together with it you’ll have to open up a terminal window. Contained in the terminal, use ls to view the /dwelling/ listing. House is the idea for many recordsdata saved on a Linux PC so this can be a good place to start out. In this tutorial, we’ll assume video recordsdata are in /dwelling/username/Movies/.
ls
Ls reveals that there’s a “Video” folder. The subsequent step is to make use of the CD command to alter working directories.
cd ~/Movies
Shifting the terminal into Movies solely makes it in order that the terminal works from that listing. You’ll have to run ls once more to view the names of video recordsdata.
ls
Mplayer works with almost each video codec on Linux, because it makes heavy use of the FFmpeg encoding instrument. Use the mouse to spotlight the identify of the video recordsdata. Alternatively, pipe the entire video file names to a textual content file.
ls > video-files.txt
Open up video-files.txt in Gedit (or no matter GUI textual content editor instrument you employ on Linux).
Now that you simply’ve acquired an inventory of file-names, use the mplayer command to playback a file. Listed below are some playback examples to comply with.
mplayer video1.mp4
or
mplayer video2.avi
or
mplayer video.3gp
or, play a number of recordsdata with:
mplayer video1.mp4 video2.avi video3.3gp
Operating a primary playback command (like above) opens up a GUI window and immediately begins the video. To stop the video, shut the window. Alternatively, the participant will be stop by urgent “Q” on the keyboard.
MPlayer Keyboard Shortcuts
On condition that Mplayer is primarily command-oriented, it depends closely on shortcuts. Should you’re new to utilizing a program like Mplayer, comply with together with the submit to get acclimated.
Playback
To skip by a video (again or ahead), use left or proper arrow keys. Up and down arrow keys additionally skip again and ahead within the video playback. Urgent house on the keyboard pauses playback, and f switches Mplayer to full-screen mode. Moreover, customers can skip between recordsdata by urgent < and >. The < goes left within the playlist, and > goes proper.
Quantity
Mplayer has a number of completely different audio settings. To management the amount ranges for enjoying movies, use 0 and 9. The quantity 9 within the quantity row decreases quantity, and the 0 will increase it. To mute issues altogether, press m. Want to change between audio tracks? Hit the # key.
The Mplayer video instrument has fairly good audio stability management. Customers can shift the stability round (left and proper) simply with the press of a button. To shift the stability of the audio in a video to the left, press Shift + ( to maneuver left, and Shift + ) to maneuver proper.
Video
The Mplayer video instrument has a number of video-specific settings. These settings pertain to the distinction, hue, saturation, framerate, and brightness of the video. To manipulate the distinction ranges in Mplayer, use 1 and 2. The 1 key decreases distinction, whereas 2 will increase it.
Brightness, hue, and saturation work roughly in the identical method, and have shortcuts on the quantity row as properly. Change brightness ranges in Mplayer with 3 and 4, hue ranges with 5 and 6, and saturation with 7 and 8.
Together with the visible settings coated above, the person can change “frame drop” settings in Mplayer by urgent d.
Subtitles
Subtitles are vital in video playback, particularly for customers that lack the flexibility to listen to. As standard, with Mplayer, the whole lot is completed by shortcut. To view subtitles on any given video, press the v key. If a video file helps a number of subtitle tracks, change between them with j.
The y button tells Mplayer to skip ahead within the subtitle line, whereas g strikes backward.
Customers even have management over the subtitle delay. To add a +0.1 second delay to subtitles in Mplayer, press the x button. Lower the delay (-0.1 sec) with z.