mplayer
mencoder / encoding
-o <filename>
Outputs to the given filename.
If you want a default output filename, you can put this option in the MEncoder config file.
-oac <codec name>
Encode with the given audio codec (no default set).
NOTE: Use -oac help to get a list of available audio codecs.
EXAMPLE:
-oac copy
no encoding, just streamcopy
-oac pcm
Encode to uncompressed PCM.
-oac mp3lame
Encode to MP3 (using LAME).
-oac lavc
Encode with a libavcodec codec.
-ovc <codec name>
Encode with the given video codec (no default set).
NOTE: Use -ovc help to get a list of available video codecs.
EXAMPLE:
-ovc copy
no encoding, just streamcopy
-ovc divx4
Encode to DivX4/DivX5.
-ovc raw
Encode to an arbitrary uncompressed format (use '-vf
format' to select).
-ovc lavc
Encode with a libavcodec codec.
-ofps <fps>
Specify a frames per second (fps) value for the output file, which can be different from that of the source materi-
al. Must be set for variable fps (ASF, some MOV) and progressive (30000/1001 fps telecined MPEG) files.
-lavcopts
vcodec=<value>
Employ the specified codec (default: mpeg4).
mjpeg
Motion JPEG
ljpeg
Lossless JPEG
h261
H.261
h263
H.263
h263p
H.263+
mpeg4
MPEG-4 (DivX 4/5)
msmpeg4
DivX 3
msmpeg4v2
MS MPEG4v2
wmv1
Windows Media Video, version 1 (AKA WMV7)
wmv2
Windows Media Video, version 2 (AKA WMV8)
mpeg1video
MPEG-1 video
mpeg2video
MPEG-2 video
ffv1 (also see: vstrict)
FFmpeg's lossless video codec
flv
Sorenson H.263 used in Flash Video
dvvideo
Sony Digital Video
svq1
Apple Sorenson Video 1
vbitrate=<value>
Specify bitrate (pass 1/2) (default: 800).
WARNING: 1kbit = 1000 bits
4-16000
(in kbit)
16001-24000000
(in bit)
keyint=<0-300>
maximum interval between keyframes in frames (default: 250 or
one keyframe every ten seconds in a 25fps movie. This is the
recommended default for MPEG-4). Most codecs require regular
keyframes in order to limit the accumulation of mismatch error.
Keyframes are also needed for seeking, as seeking is only possi-
ble to a keyframe - but keyframes need more space than other
frames, so larger numbers here mean slightly smaller files but
less precise seeking. 0 is equivalent to 1, which makes every
frame a keyframe. Values >300 are not recommended as the quali-
ty might be bad depending upon decoder, encoder and luck. It is
a common for MPEG-1/2 to use values <=30.
-loop <number>
Loops movie playback <number> times. 0 means forever.
-playlist <filename>
Play files according to a playlist file (ASX, Winamp, SMIL, or one-file-per-line format).
NOTE: This option is considered an entry so options found after it will apply only to the elements of this playlist.
FIXME: This needs to be clarified and documented thoroughly.
-shuffle
Play files in random order.
-slave (also see -input)
Switches on slave mode, in which MPlayer works as a backend for other programs. Instead of intercepting keyboard
events, MPlayer will read commands separated by a newline (\n) from stdin.
NOTE: See -input cmdlist for a list of slave commands and DOCS/tech/slave.txt for their description.
-audiofile <filename>
Play audio from an external file (WAV, MP3 or Ogg Vorbis) while viewing a movie.
DUMPING
-dumpaudio (MPlayer only)
Dumps raw compressed audio stream to ./stream.dump (useful with MPEG/AC-3, in most other cases the resulting file
will not be playable). If you give more than one of -dumpaudio, -dumpvideo, -dumpstream on the command line only
the last one will work.
-dumpfile <filename> (MPlayer only)
Specify which file MPlayer should dump to. Should be used together with -dumpaudio / -dumpvideo / -dumpstream.
-dumpstream (MPlayer only)
Dumps the raw stream to ./stream.dump. Useful when ripping from DVD or network. If you give more than one of
-dumpaudio, -dumpvideo, -dumpstream on the command line only the last one will work.
-dumpvideo (MPlayer only)
Dump raw compressed video stream to ./stream.dump (not very usable). If you give more than one of -dumpaudio,
-dumpvideo, -dumpstream on the command line only the last one will work.
EDL
-edl <filename>
Enables edit decision list (EDL) actions during playback. Video will be skipped over and audio will be muted and
unmuted according to the entries in the given file. See http://www.mplayerhq.hu/DOCS/HTML/en/edl.html for details
on how to use this.
-edlout <filename>
Creates a new file and writes edit decision list (EDL) records to it. During playback, the user hits 'i' to mark
the start or end of a skip block. This provides a starting point from which the user can fine-tune EDL entries lat-
er. See http://www.mplayerhq.hu/DOCS/HTML/en/edl.html for details.
POSITION / SEEKING
-sstep <sec>
Skip <sec> seconds after every frame. The normal framerate of the movie is kept, so play-
back is accelerated. Since MPlayer can only seek to the next keyframe this may be inex-
act.
-sb <byte position> (also see -ss)
Seek to byte position. Useful for playback from CD-ROM images or VOB files with junk at the beginning.
-ss <time> (also see -sb)
Seek to given time position.
EXAMPLE:
-ss 56
Seeks to 56 seconds.
-ss 01:10:00
Seeks to 1 hour 10 min.
-endpos <[[hh:]mm:]ss[.ms]|size[b|kb|mb]> (also see -ss and -sb)
Stop at given time or byte position.
NOTE: Byte position is enabled only for MEncoder and will not be accurate, as it can only stop at a frame boundary.
When used in conjunction with -ss option, -endpos time will shift forward by seconds specified with -ss.
EXAMPLE:
-endpos 56
Stop at 56 seconds.
-endpos 01:10:00
Stop at 1 hour 10 minutes.
-ss 10 -endpos 56
Stop at 1 minute 6 seconds.
-endpos 100mb
Encode only 100 MB.
-frames <number>
Play/convert only first <number> frames, then quit.
-nosound
Do not play/encode sound. Useful for benchmarking.
-novideo
Do not play/encode video. In many cases this will not work, use -vc null -vo null instead.
TROUBLESHOOTING
-delay <sec>
audio delay in seconds (positive or negative float value)
Negative values delay the audio, and positive values delay the video. Note that this is the exact opposite of the
-audio-delay MEncoder option.
NOTE: When used with MEncoder, this is not guaranteed to work correctly with -ovc copy; use -audio-delay instead.
-forceidx
Force index rebuilding. Useful for files with broken index (A/V desync, etc). This will enable seeking in files
where seeking was not possible. You can fix the index permanently with MEncoder (see the documentation).
NOTE: This option only works if the underlying media supports seeking (i.e. not with stdin, pipe, etc).
-fps <float value>
Override video framerate. Useful if the original value is wrong or missing.
-aspect <ratio> (also see -zoom)
Override movie aspect ratio, in case aspect information is incorrect or missing in the file being played.
EXAMPLE:
-aspect 4:3 or -aspect 1.3333
-aspect 16:9 or -aspect 1.7777
-noaspect
Disable automatic movie aspect ratio compensation.
MANIPULATION / FILTERS
-speed <0.01-100>
Slow down or speed up playback by the factor given as parameter. Not guaranteed to work correctly with -oac copy.
TRANSLATIONS
-mf <option1:option2:...>
Used when decoding from multiple PNG or JPEG files.
Available options are:
w=<value>
input file width (default: autodetect)
h=<value>
input file height (default: autodetect)
fps=<value>
output fps (default: 25)
type=<value>
input file type (available: jpeg, png, tga, sgi)
VIDEO FILTERS
Video filters allow you to modify the video stream and its properties. The syntax is:
-vf <filter1[=parameter1:parameter2:...],filter2,...>
Setup a chain of video filters.
Available filters are:
crop[=w:h:x:y]
Crops the given part of the image and discards the rest. Useful to remove black bands from widescreen movies.
<w>,<h>
Cropped width and height, defaults to original width and height.
<x>,<y>
Position of the cropped picture, defaults to center.
cropdetect[=limit:round]
Calculates necessary cropping parameters and prints the recommended parameters to stdout.
<limit>
Threshold, which can be optionally specified from nothing (0) to everything (255) (default: 24).
<round>
Value which the width/height should be divisible by (default: 16). The offset is automatically adjusted to
center the video. Use 2 to get only even dimensions (needed for 4:2:2 video). 16 is best when encoding to
most video codecs.
flip (also see -flip)
Flips the image upside down.
mirror
Mirrors the image on the Y axis.
rotate[=<0-7>]
Rotates the image by 90 degrees and optionally flips it. For values between 4-7 rotation is only done if the movie
geometry is portrait and not landscape.
0 Rotate by 90 degrees clockwise and flip (default).
1 Rotate by 90 degrees clockwise.
2 Rotate by 90 degrees counterclockwise.
3 Rotate by 90 degrees counterclockwise and flip.
scale[=w:h[:ilaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
Scales the image with the software scaler (slow) and performs a YUV<->RGB colorspace conversion (also see -sws).
<w>,<h>
scaled width/height (default: original width/height)
NOTE: If -zoom is used, and underlying filters (including libvo) are incapable of scaling, it defaults to
d_width/d_height!
0: scaled d_width/d_height
-1: original width/height
-2: Calculate w/h using the other dimension and the prescaled aspect ratio.
-3: Calculate w/h using the other dimension and the original aspect ratio.
-(n+8): Like -n above, but rounding the dimension to the closest multiple of 16.
<ilaced>
Toggle interlaced scaling.
0: off (default)
1: on
noise[=luma[u][t|a][h][p]:chroma[u][t|a][h][p]]
Adds noise.
<0-100>
luma noise
<0-100>
chroma noise
u uniform noise (gaussian otherwise)
t temporal noise (noise pattern changes between frames)
a averaged temporal noise (smoother, but a lot slower)
h high quality (slightly better looking, slightly slower)
p mix random noise with a (semi)regular pattern
hue[=hue:saturation]
Software equalizer with interactive controls just like the hardware equalizer, for cards/drivers that do not support
hue and saturation controls in hardware.
<-180-180>
initial hue (default: 0.0)
<-100-100>
initial saturation, where negative values result in a negative chroma (default: 1.0)
unsharp[=l|cWxH:amount[:l|cWxH:amount]]
unsharp mask / gaussian blur
l
Apply effect on luma component.
c
Apply effect on chroma components.
<width>x<height>
width and height of the matrix, odd sized in both directions (min = 3x3, max = 13x11 or 11x13, usually some-
thing between 3x3 and 7x7)
amount
Relative amount of sharpness/blur to add to the image (a sane range should be -1.5-1.5).
<0: blur
>0: sharpen
perspective=x0:y0:x1:y1:x2:y2:x3:y3:t
Correct the perspective of movies not filmed perpendicular to the screen.
<x0>,<y0>,...
coordinates of the top left, top right, bottom left, bottom right corners
<t>
linear (0) or cubic resampling (1)
MENCODER SPECIFIC
-audio-delay <any floating-point number>
Delays either audio or video by setting a delay field in the header (default: 0.0). This does not delay either
stream while encoding, but the player will see the delay field and compensate accordingly. Positive values delay
the audio, and negative values delay the video. Note that this is the exact opposite of the -delay option. For ex-
ample, if a video plays correctly with -delay 0.2, you can fix the video with MEncoder by using -audio-delay -0.2.
Currently, this option only works with the default muxer (-of avi). If you are using a different muxer, then you
must use -delay instead.
-force-avi-aspect <0.2-3.0>
Override the aspect stored in the AVI OpenDML vprp header. This can be used to change the aspect ratio with '-ovc
copy'.
-hr-edl-seek
Use a more precise, but much slower method for skipping areas. Areas marked for skipping are not seeked over, in-
stead all frames are decoded, but only the necessary frames are encoded. This allows starting at non-keyframe
boundaries.
NOTE: Not guaranteed to work right with '-ovc copy'.