MPlayer / MEncoder
Paul Hänsch
FUB Course: Digital Video
Contents
- Intro
- MPlayer for Users
- Shortcuts | Invocation | Output Drivers | Video Filters | Additional Codecs | Config Files
- MEncoder for Users
- Invocation | Output Container | Video Codec | Audio Codec
- For Developers
- Future Development
Intro
http://mplayerhq.hu
MPlayer for Users - Shortcuts
- [Up], [Down], [Left], [Right], [PgUp], [PgDown] - Seek by 10 seconds, 1 minute or 10 minutes
- [space], m, f - Toggle pause, mute, fullscreen
- 9, 0 - Adjust volume
- o, v - Toggle OSD, subtitles
- # - Cycle through audio channels (languages)
- +, - - Adjust audio-/video- delay
- q - quit
MPlayer for Users - Invocation
Simple files:
mplayer video1.avi video2.mkv dvdrip.iso
- supports a lot of video file formats including dvd- and cd- images
Web-URL:
mplayer http://example.com/video.mpg
- also supports: FTP, RTSP, SMB, …
MPlayer for Users - Invocation
Image sequence:
mplayer mf://*.jpg -mf fps=15
- supports jpeg, tga, png, …
Webcam, DVD, AudioCD:
mplayer dvd://1 cdda://0 tv:// -dvd-device /dev/dvd -cdrom-device /dev/cdrom -tv device=/dev/video0
- different inputs in one line if you like
MPlayer for Users - Invocation
Play in fullscreen, start playback at 1 hour, 22 minutes
mplayer -fs movie.mp4 -ss 4920
MPlayer for Users - Output Drivers
Video Output
mplayer -novideo
mplayer -vo matrixview:cols=48:rows=32
- null - Decode video, but do not display
- xv, x11 - Accelerated and unaccelerated X11 output
- fbdev, fbdev2 - Framebuffer output (works on linux text terminals)
- directx, quartz - MS Windows and Mac OS X video systems
- vdpau - Hardware accellerated decoding
- gif89a - Animated gif
- png, jpeg, pnm, … - Image Sequence
MPlayer for Users - Output Drivers
Audio Output
mplayer -nosound
mplayer -ao pulse:example.com
- null - Decode audio, but do not play
- alsa - Standard Linux sound system
- pulse - Use pulseaudio service
- pcm - PCM/WAVE file
MPlayer for Users - Video Filters
mplayer -vf scale=1280:600,crop=400:200,mirror video.mpeg
mplayer -vf-add scale=1280:600 -vf-add crop=400:200 -vf-add mirror video.mpeg
- lots of filters for postprocessing, color adjustment, resizing, etc…
MPlayer for Users - Additional Codecs
- support for binary codecs taken from QuickTime, RealPlayer, Windows Media Player, etc…
- just put the codecs into /usr/lib/codecs
MPlayer for Users - Config Files
~/.mplayer/config
cache=8192
cache-min=2
fs=yes
vf=scale=-2:600
vo=x11
ao=pulse:Jupiter
hardframedrop=yes
subfont-osd-scale=2
osdlevel=3
heartbeat-cmd="xscreensaver-command -deactivate >/dev/null 2>/dev/null &"
MEncoder for Users - Invocation
mencoder -oac lavc -ovc lavc -of avi -o Out.avi In1.mpg In2.mkv
mencoder -vf mirror In1.avi In2.avi -o Out.avi
mencoder In1.avi -vf mirror In2.avi -o Out.avi
MEncoder for Users - Output Container
mencoder -of avi
mencoder -of mpeg
mencoder -of lavf -lavfopts format=...
MEncoder for Users - Video Codec
mencoder -ovc help
mencoder -ovc lavc -lavcopts vcodec=...
mencoder -ovc x264enc
MEncoder for Users - Audio Codec
mencoder -nosound
mencoder -oac help
mencoder -oac lavc
mencoder -oac twolame
mencoder -oac mp3lame
…
For Developers - Slave Mode
mplayer -slave
For Developers - Status Line
Future Development
- new video standards
- MPlayer2 fork