13 mplayer command lines
Mplayer is the best multimedia playback tool on Linux and BSD systems.
It is used for:
- Watching television
- Viewing your webcam
- Playing any media(audio, video, gif)
- Playing shoutcast streams
- Playing DVD
and more.
1. Play webcam
Quite easy.
$ mplayer tv://dev/video0
It shows the stream on my laptop.
With -vf screenshot filter you can get a snap using ‘S’ key.
2. Play television
It is same as above.
$ mplayer tv://dev/video1
or whatever your TV device is. It can play DVB or plain old cable TV with a TV card.
3. Play an audio file
$ mplayer a.mp3 b.aac c.wav
It can deal with any format.
You can add -softvol-max 1000 -softvol in case your original audio needs amplitude boost.
4. Play a video
$ mplayer foo.mp4 boo.mkv
It does not matter what the video file is. Chances are mplayer can play it.
VP8 or any recorded session from video call, throw it and see.
5. Play a shoutcast stream
$ mplayer -cache 8192 rtsp://<URL>
Sometimes depending on the stream you may have to add the
-playlist flag.
It does not however play radio. garden streams.
6. Play a GIF file
$ mplayer foo.gif
Gif animations are played beautifully by mplayer.
Image viewers don’t, only other choice is the web browser.
7. Seek a file whilst playing
$ mplayer <media>
Now how do you seek forward or backward?
left or right arrow does it, up or down arrow seeks farther ahead.
For next file press ‘.’
8. Volume control
You press 9 and 0 for decrease and increase volume.
With softvol switch it is pretty nice.
I watch my youtube videos using mplayer after I download using yt-dlp
9. Decrease saturation or brightness
With the hue filter you can play with video saturation brightness or contrast using the number keys.
It is in the man page. It is fun to watch a color video in Black and White.
10. Use with infrared remote control
Mplayer can be used with infrared remotes of TV or any other lying around.
Just plug into the input messages and you are done.
11. Mouse control
You can use the mouse wheel for forward/rewind.
12. Mute or pause
I used m to mute and SPACE for pause.
13. Full screen
It is the f key. It toggles between full screen and normal.
To get full screen you need a video driver supporting Xv.
$ mplayer -vo help
is your friend.
That is a wrap.
TL;DR
1. webcam
2. TV
3. audio file
4. video
5. shoutcast stream
6. gif animation
7. seek control
8. volume controls
9. hue, saturation
10. volume control
11. mouse control
12. mute or pause playback
13. full screen
Did you subscribe to my newsletter?