NAME mencoder - movie encoder DECODING/FILTERING OPTIONS -ac <[-|+]codec1,[-|+]codec2,...[,]> Specify a priority list of audio codecs to be used, according to their codec name in codecs.conf. Use a '-' before the codec name to omit it. Use a '+' before the codec name to force it, this will likely crash! If the list has a trailing ',' MPlayer will fall back on codecs not contained in the list. NOTE: See -ac help for a full list of available codecs. EXAMPLE: -ac mp3acm Force the l3codeca.acm MP3 codec. -ac mad, Try libmad first, then fall back on others. -ac hwac3,a52, Try hardware AC3 passthrough, software AC3, then others. -ac -ffmp3, Skip FFmpeg's MP3 decoder. -af-adv (also see -af) Specify advanced audio filter options: force=<0-7> Forces the insertion of audio filters to one of the fol- lowing: 0: Use completely automatic filter insertion. 1: Optimize for accuracy (default). 2: Optimize for speed. Warning: Some features in the audio filters may silently fail, and the sound quali- ty may drop. 3: Use no automatic insertion of filters and no opti- mization. Warning: It may be possible to crash MPlayer using this setting. 4: Use automatic insertion of filters according to 0 above, but use floating point processing when possi- ble. 5: Use automatic insertion of filters according to 1 above, but use floating point processing when possi- ble. 6: Use automatic insertion of filters according to 2 above, but use floating point processing when possi- ble. 7: Use no automatic insertion of filters according to 3 above, and use floating point processing when pos- sible. list= Same as -af. -afm Specify a priority list of audio codec families to be used, ac- cording to their codec name in codecs.conf. Falls back on the default codecs if none of the given codec families work. NOTE: See -afm help for a full list of available codec families. EXAMPLE: -afm ffmpeg Try FFmpeg's libavcodec codecs first. -afm acm,dshow Try Win32 codecs first. -aspect (also see -zoom) Override movie aspect ratio, in case aspect information is in- correct 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. -flip Flip image upside-down. -lavdopts (DEBUG CODE) Specify libavcodec decoding parameters. Separate multiple op- tions with a colon. EXAMPLE: -lavdopts gray:skiploopfilter=all:skipframe=nonref Available options are: bitexact Only use bit-exact algorithms in all decoding steps (for codec testing). bug= Manually work around encoder bugs. 0: nothing 1: autodetect bugs (default) 2 (msmpeg4v3): some old lavc generated msmpeg4v3 files (no autodetection) 4 (mpeg4): XviD interlacing bug (autodetected if fourcc==XVIX) 8 (mpeg4): UMP4 (autodetected if fourcc==UMP4) 16 (mpeg4): padding bug (autodetected) 32 (mpeg4): illegal vlc bug (autodetected per fourcc) 64 (mpeg4): XviD and DivX qpel bug (autodetected per fourcc/version) 128 (mpeg4): old standard qpel (autodetected per fourcc/version) 256 (mpeg4): another qpel bug (autodetected per four- cc/version) 512 (mpeg4): direct-qpel-blocksize bug (autodetected per fourcc/version) 1024 (mpeg4): edge padding bug (autodetected per fourcc/version) debug= Display debugging information. 0: disabled 1: picture info 2: rate control 4: bitstream 8: macroblock (MB) type 16: per-block quantization parameter (QP) 32: motion vector 0x0040: motion vector visualization (use -noslices) 0x0080: macroblock (MB) skip 0x0100: startcode 0x0200: PTS 0x0400: error resilience 0x0800: memory management control operations (H.264) 0x1000: bugs 0x2000: Visualize quantization parameter (QP), lower QP are tinted greener. 0x4000: Visualize block types. ec= Set error concealment strategy. 1: Use strong deblock filter for damaged MBs. 2: iterative motion vector (MV) search (slow) 3: all (default) er= Set error resilience strategy. 0: disabled 1: careful (Should work with broken encoders.) 2: normal (default) (Works with compliant encoders.) 3: aggressive (More checks, but might cause problems even for valid bitstreams.) 4: very aggressive fast (MPEG-2 only) Enable optimizations which do not comply to the specifi- cation and might potentially cause problems, like sim- pler dequantization, assuming use of the default quanti- zation matrix, assuming YUV 4:2:0 and skipping a few checks to detect damaged bitstreams. gray grayscale only decoding (a bit faster than with color) idct=<0-99> (see -lavcopts) For best decoding quality use the same IDCT algorithm for decoding and encoding. This may come at a price in accuracy, though. lowres=[,] Decode at lower resolutions. Low resolution decoding is not supported by all codecs, and it will often result in ugly artifacts. This is not a bug, but a side effect of not decoding at full resolution. 0: disabled 1: 1/2 resolution 2: 1/4 resolution 3: 1/8 resolution If is specified lowres decoding will be used only if the width of the video is major than or equal to . sb= (MPEG-2 only) Skip the given number of macroblock rows at the bottom. st= (MPEG-2 only) Skip the given number of macroblock rows at the top. skiploopfilter= Skips the loop filter (AKA deblocking) during H.264 de- coding. Since the filtered frame is supposed to be used as reference for decoding dependant frames this has a worse effect on quality than not doing deblocking on e.g. MPEG-2 video. But at least for high bitrate HDTV this provides a big speedup with no visible quality loss. can be either one of the following: none: Never skip. default: Skip useless processing steps (e.g. 0 size packets in AVI). nonref: Skip frames that are not referenced (i.e. not used for decoding other frames, the error cannot "build up"). bidir: Skip B-Frames. nonkey: Skip all frames except keyframes. all: Skip all frames. skipidct= Skips the IDCT step. This degrades quality a lot of in almost all cases (see skiploopfilter for available skip values). skipframe= Skips decoding of frames completely. Big speedup, but jerky motion and sometimes bad artifacts (see skiploop- filter for available skip values). threads=<1-8> number of threads to use for decoding (default: 1) vismv= Visualize motion vectors. 0: disabled 1: Visualize forward predicted MVs of P-frames. 2: Visualize forward predicted MVs of B-frames. 4: Visualize backward predicted MVs of B-frames. vstats Prints some statistics and stores them in ./vs- tats_*.log. -noslices Disable drawing video by 16-pixel height slices/bands, instead draws the whole frame in a single run. May be faster or slower, depending on video card and available cache. It has effect only with libmpeg2 and libavcodec codecs. -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. -oldpp (OpenDivX only) (OBSOLETE) Use the OpenDivX postprocessing code instead of the internal one. Superseded by -pp, the internal postprocessing offers bet- ter quality and performance. The valid range of -oldpp values varies by codec, it is mostly 0-6, where 0=disable, 6=slowest/ best. -pp (also see -vf pp) Set the DLL postprocess level. This option is no longer usable with -vf pp. It only works with Win32 DirectShow DLLs with in- ternal postprocessing routines. The valid range of -pp values varies by codec, it is mostly 0-6, where 0=disable, 6=slowest/ best. -pphelp (also see -vf pp) Show a summary about the available postprocess filters and their usage. -ssf Specifies software scaler parameters. EXAMPLE: -vf scale -ssf lgb=3.0 lgb=<0-100> gaussian blur filter (luma) cgb=<0-100> gaussian blur filter (chroma) ls=<-100-100> sharpen filter (luma) cs=<-100-100> sharpen filter (chroma) chs= chroma horizontal shifting cvs= chroma vertical shifting -stereo Select type of MP2/MP3 stereo output. 0 stereo 1 left channel 2 right channel -sws (also see -vf scale and -zoom) Specify the software scaler algorithm to be used with the -zoom option. This affects video output drivers which lack hardware acceleration, e.g. x11. Available types are: 0 fast bilinear 1 bilinear 2 bicubic (good quality) (default) 3 experimental 4 nearest neighbor (bad quality) 5 area 6 luma bicubic / chroma bilinear 7 gauss 8 sincR 9 lanczos 10 natural bicubic spline NOTE: Some -sws options are tunable. The description of the scale video filter has further information. -vc <[-|+]codec1,[-|+]codec2,...[,]> Specify a priority list of video codecs to be used, according to their codec name in codecs.conf. Use a '-' before the codec name to omit it. Use a '+' before the codec name to force it, this will likely crash! If the list has a trailing ',' MPlayer will fall back on codecs not contained in the list. NOTE: See -vc help for a full list of available codecs. EXAMPLE: -vc divx Force Win32/VfW DivX codec, no fallback. -vc divx4, Try divx4linux codec first, then fall back on others. -vc -divxds,-divx, Skip Win32 DivX codecs. -vc ffmpeg12,mpeg12, Try libavcodec's MPEG-1/2 codec, then libmpeg2, then others. -vfm Specify a priority list of video codec families to be used, ac- cording to their names in codecs.conf. Falls back on the de- fault codecs if none of the given codec families work. NOTE: See -vfm help for a full list of available codec families. EXAMPLE: -vfm ffmpeg,dshow,vfw Try the libavcodec, then Directshow, then VfW codecs and fall back on others, if they do not work. -vfm xanim Try XAnim codecs first. -x (also see -zoom) (MPlayer only) Scale image to width (if software/hardware scaling is avail- able). Disables aspect calculations. -xvidopts Specify additional parameters when decoding with XviD. NOTE: Since libavcodec is faster than XviD you might want to use the libavcodec postprocessing filter (-vf pp) and decoder (-vfm ffmpeg) instead. XviD's internal postprocessing filters: deblock-chroma chroma deblock filter deblock-luma luma deblock filter dering-luma luma deringing filter dering-chroma chroma deringing filter filmeffect Adds artificial film grain to the video. May increase perceived quality, while lowering true quality. rendering methods: dr2 Activate direct rendering method 2. nodr2 Deactivate direct rendering method 2. -xy (also see -zoom) value<=8 Scale image by factor . value>8 Set width to value and calculate height to keep correct aspect ratio. -y (also see -zoom) (MPlayer only) Scale image to height (if software/hardware scaling is available). Disables aspect calculations. -zoom Allow software scaling, where available. This will allow scal- ing with output drivers (like x11, fbdev) that do not support hardware scaling where MPlayer disables scaling by default for performance reasons. AUDIO FILTERS Audio filters allow you to modify the audio stream and its properties. The syntax is: -af Setup a chain of audio filters. NOTE: To get a full list of available audio filters, see -af help. Available filters are: resample[=srate[:sloppy[:type]]] Changes the sample rate of the audio stream. Can be used if you have a fixed frequency sound card or if you are stuck with an old sound card that is only capable of max 44.1kHz. This filter is automatically enabled if necessary. It only supports 16-bit integer and float in native-endian format as input. NOTE: With MEncoder, you need to also use -srate . output sample frequency in Hz. The valid range for this parameter is 8000 to 192000. If the input and output sample frequency are the same or if this parameter is omitted the filter is automatically unloaded. A high sample frequency normally improves the audio quality, especially when used in combination with other filters. Allow (1) or disallow (0) the output frequency to differ slightly from the frequency given by (default: 1). Can be used if the startup of the playback is ex- tremely slow. Selects which resampling method to use. 0: linear interpolation (fast, poor quality especial- ly when upsampling) 1: polyphase filterbank and integer processing 2: polyphase filterbank and floating point processing (slow, best quality) EXAMPLE: mplayer -af resample=44100:0:0 would set the output frequency of the resample filter to 44100Hz using exact output frequency scaling and linear interpolation. lavcresample[=srate[:length[:linear[:count[:cutoff]]]]] Changes the sample rate of the audio stream to an integer in Hz. It only supports the 16-bit native-endian for- mat. NOTE: With MEncoder, you need to also use -srate . the output sample rate length of the filter with respect to the lower sampling rate (default: 16) if 1 then filters will be linearly interpolated between polyphase entries log2 of the number of polyphase entries (..., 10->1024, 11->2048, 12->4096, ...) (default: 10->1024) cutoff frequency (0.0-1.0), default set depending upon filter length sweep[=speed] Produces a sine sweep. <0.0-1.0> Sine function delta, use very low values to hear the sweep. sinesupress[=freq:delay] Remove a sine at the specified frequency. Useful to get rid of the 50/60hz noise on low quality audio equipment. It probably only works on mono input. The frequency of the sine which should be removed (in Hz) (default: 50) Controls the adaptivity (a larger value will make the filter adapt to amplitude and phase changes quicker, a smaller value will make the adaptation slower) (default: 0.0001). Reasonable values are around 0.001. hrtf[=flag] Head-related transfer function: Converts multichannel audio to 2 channel output for headphones, preserving the spatiality of the sound. Flag Meaning m matrix decoding of the rear channel s 2-channel matrix decoding 0 no matrix decoding (default) equalizer=[g1:g2:g3:...:g10] 10 octave band graphic equalizer, implemented using 10 IIR band pass filters. This means that it works regardless of what type of audio is being played back. The center frequencies for the 10 bands are: No. frequency 0 31.25 Hz 1 62.50 Hz 2 125.00 Hz 3 250.00 Hz 4 500.00 Hz 5 1.00 kHz 6 2.00 kHz 7 4.00 kHz 8 8.00 kHz 9 16.00 kHz If the sample rate of the sound being played is lower than the center frequency for a frequency band, then that band will be disabled. A known bug with this filter is that the characteris- tics for the uppermost band are not completely symmetric if the sample rate is close to the center frequency of that band. This problem can be worked around by upsampling the sound using the resample filter before it reaches this filter. :::...: floating point numbers representing the gain in dB for each frequency band (-12-12) EXAMPLE: mplayer -af equalizer=11:11:10:5:0:-12:0:5:12:12 media.avi Would amplify the sound in the upper and lower frequency region while canceling it almost completely around 1kHz. channels=nch[:nr:from1:to1:from2:to2:from3:to3:...] Can be used for adding, removing, routing and copying audio channels. If only is given the default routing is used, it works as follows: If the number of output channels is bigger than the number of input channels empty channels are inserted (except mixing from mono to stereo, then the mono channel is re- peated in both of the output channels). If the number of output channels is smaller than the number of input channels the ex- ceeding channels are truncated. number of output channels (1-6) number of routes (1-6) Pairs of numbers between 0 and 5 that define where to route each channel. EXAMPLE: mplayer -af channels=4:4:0:1:1:0:2:2:3:3 media.avi Would change the number of channels to 4 and set up 4 routes that swap channel 0 and channel 1 and leave chan- nel 2 and 3 intact. Observe that if media containing two channels was played back, channels 2 and 3 would contain silence but 0 and 1 would still be swapped. mplayer -af channels=6:4:0:0:0:1:0:2:0:3 media.avi Would change the number of channels to 6 and set up 4 routes that copy channel 0 to channels 0 to 3. Channel 4 and 5 will contain silence. format[=format] (also see -format) Convert between different sample formats. Automatically enabled when needed by the sound card or another filter. Sets the desired format. The general form is 'sbe', where 's' denotes the sign (either 's' for signed or 'u' for unsigned), 'b' denotes the number of bits per sample (16, 24 or 32) and 'e' denotes the endianness ('le' means little-endian, 'be' big-endian and 'ne' the endi- anness of the computer MPlayer is running on). Valid values (amongst others) are: 's16le', 'u32be' and 'u24ne'. Exceptions to this rule that are also valid format specifiers: u8, s8, floatle, floatbe, floatne, mulaw, alaw, mpeg2, ac3 and imaadpcm. volume[=v[:sc]] Implements software volume control. Use this filter with cau- tion since it can reduce the signal to noise ratio of the sound. In most cases it is best to set the level for the PCM sound to max, leave this filter out and control the output level to your speakers with the master volume control of the mixer. In case your sound card has a digital PCM mixer instead of an analog one, and you hear distortion, use the MASTER mixer instead. If there is an external amplifier connected to the computer (this is almost always the case), the noise level can be minimized by adjusting the master level and the volume knob on the amplifier until the hissing noise in the background is gone. This filter has a second feature: It measures the overall maxi- mum sound level and prints out that level when MPlayer exits. This volume estimate can be used for setting the sound level in MEncoder such that the maximum dynamic range is utilized. NOTE: This filter is not reentrant and can therefore only be en- abled once for every audio stream. Sets the desired gain in dB for all channels in the stream from -200dB to +60dB, where -200dB mutes the sound completely and +60dB equals a gain of 1000 (de- fault: 0). Turns soft clipping on (1) or off (0). Soft-clipping can make the sound more smooth if very high volume lev- els are used. Enable this option if the dynamic range of the loudspeakers is very low. WARNING: This feature creates distortion and should be considered a last resort. EXAMPLE: mplayer -af volume=10.1:0 media.avi Would amplify the sound by 10.1dB and hard-clip if the sound level is too high. pan=n[:l01:l02:...l10:l11:l12:...ln0:ln1:ln2:...] Mixes channels arbitrarily. Basically a combination of the vol- ume and the channels filter that can be used to down-mix many channels to only a few, e.g. stereo to mono or vary the "width" of the center speaker in a surround sound system. This filter is hard to use, and will require some tinkering before the de- sired result is obtained. The number of options for this filter depends on the number of output channels. An example how to downmix a six-channel file to two channels with this filter can be found in the examples section near the end. number of output channels (1-6) How much of input channel i is mixed into output channel j (0-1). So in principle you first have n numbers say- ing what to do with the first input channel, then n num- bers that act on the second input channel etc. If you do not specify any numbers for some input channels, 0 is assumed. EXAMPLE: mplayer -af pan=1:0.5:0.5 media.avi Would down-mix from stereo to mono. mplayer -af pan=3:1:0:0.5:0:1:0.5 media.avi Would give 3 channel output leaving channels 0 and 1 in- tact, and mix channels 0 and 1 into output channel 2 (which could be sent to a subwoofer for example). sub[=fc:ch] Adds a subwoofer channel to the audio stream. The audio data used for creating the subwoofer channel is an average of the sound in channel 0 and channel 1. The resulting sound is then low-pass filtered by a 4th order Butterworth filter with a de- fault cutoff frequency of 60Hz and added to a separate channel in the audio stream. Warning: Disable this filter when you are playing DVDs with Dol- by Digital 5.1 sound, otherwise this filter will disrupt the sound to the subwoofer. cutoff frequency in Hz for the low-pass filter (20Hz to 300Hz) (default: 60Hz) For the best result try setting the cutoff frequency as low as possible. This will im- prove the stereo or surround sound experience. Determines the channel number in which to insert the sub-channel audio. Channel number can be between 0 and 5 (default: 5). Observe that the number of channels will automatically be increased to if necessary. EXAMPLE: mplayer -af sub=100:4 -channels 5 media.avi Would add a sub-woofer channel with a cutoff frequency of 100Hz to output channel 4. center Creates a center channel from the front channels. May currently be low quality as it does not implement a high-pass filter for proper extraction yet, but averages and halves the channels in- stead. Determines the channel number in which to insert the center channel. Channel number can be between 0 and 5 (default: 5). Observe that the number of channels will automatically be increased to if necessary. surround[=delay] Decoder for matrix encoded surround sound like Dolby Surround. Many files with 2 channel audio actually contain matrixed sur- round sound. Requires a sound card supporting at least 4 chan- nels. delay time in ms for the rear speakers (0 to 1000) (de- fault: 20) This delay should be set as follows: If d1 is the distance from the listening position to the front speakers and d2 is the distance from the listening posi- tion to the rear speakers, then the delay should be set to 15ms if d1 <= d2 and to 15 + 5*(d1-d2) if d1 > d2. EXAMPLE: mplayer -af surround=15 -channels 4 media.avi Would add surround sound decoding with 15ms delay for the sound to the rear speakers. delay[=ch1:ch2:...] Delays the sound to the loudspeakers such that the sound from the different channels arrives at the listening position simul- taneously. It is only useful if you have more than 2 loudspeak- ers. ch1,ch2,... The delay in ms that should be imposed on each channel (floating point number between 0 and 1000). To calculate the required delay for the different channels do as follows: 1. Measure the distance to the loudspeakers in meters in rela- tion to your listening position, giving you the distances s1 to s5 (for a 5.1 system). There is no point in compensating for the subwoofer (you will not hear the difference anyway). 2. Subtract the distances s1 to s5 from the maximum distance, i.e. s[i] = max(s) - s[i]; i = 1...5. 3. Calculate the required delays in ms as d[i] = 1000*s[i]/342; i = 1...5. EXAMPLE: mplayer -af delay=10.5:10.5:0:0:7:0 media.avi Would delay front left and right by 10.5ms, the two rear channels and the sub by 0ms and the center channel by 7ms. export[=mmapped_file[:nsamples]] Exports the incoming signal to other processes using memory map- ping (mmap()). Memory mapped areas contain a header: int nch /*number of channels*/ int size /*buffer size*/ unsigned long long counter /*Used to keep sync, updated every time new data is exported.*/ The rest is payload (non-interleaved) 16 bit data. file to map data to (default: ~/.mplayer/mplayer-af_ex- port) number of samples per channel (default: 512) EXAMPLE: mplayer -af export=/tmp/mplayer-af_export:1024 media.avi Would export 1024 samples per channel to '/tmp/mplayer- af_export'. extrastereo[=mul] (Linearly) increases the difference between left and right chan- nels which adds some sort of "live" effect to playback. Sets the difference coefficient (default: 2.5). 0.0 means mono sound (average of both channels), with 1.0 sound will be unchanged, with -1.0 left and right chan- nels will be swapped. volnorm[=method:target] Maximizes the volume without distorting the sound. Sets the used method. 1: Use a single sample to smooth the variations via the standard weighted mean over past samples (de- fault). 2: Use several samples to smooth the variations via the standard weighted mean over past samples. Sets the target amplitude as a fraction of the maximum for the sample type (default: 0.25). ladspa=file:label[:controls...] Load a LADSPA (Linux Audio Developer's Simple Plugin API) plug- in. This filter is reentrant, so multiple LADSPA plugins can be used at once. Specifies the LADSPA plugin library file. If LADSPA_PATH is set, it searches for the specified file. If it is not set, you must supply a fully specified pathname.