LinuxCommandLibrary

mencoder

encodes video from MPlayer

TLDR

Convert video

$ mencoder [input.avi] -o [output.mp4] -ovc lavc -oac mp3lame
copy
Extract audio
$ mencoder [video.avi] -o [audio.mp3] -ovc copy -oac mp3lame
copy
Resize video
$ mencoder [input.avi] -o [output.avi] -vf scale=[640:480] -ovc lavc -oac copy
copy
Two-pass encoding
$ mencoder [input.avi] -o /dev/null -ovc lavc -lavcopts vpass=1 && mencoder [input.avi] -o [output.avi] -ovc lavc -lavcopts vpass=2
copy
Join videos
$ mencoder -ovc copy -oac copy -o [joined.avi] [file1.avi] [file2.avi]
copy

SYNOPSIS

mencoder [options] input -o output

DESCRIPTION

mencoder encodes video from MPlayer. It converts between formats and applies filters.
The tool is part of MPlayer project. Superseded by FFmpeg in many cases.

PARAMETERS

INPUT

Input media file.
-o FILE
Output file.
-ovc CODEC
Video codec.
-oac CODEC
Audio codec.
-vf FILTERS
Video filters.
--help
Display help information.

CAVEATS

MPlayer project (legacy). FFmpeg often preferred. Complex options.

HISTORY

mencoder was the encoding companion to MPlayer, providing video conversion capabilities.

SEE ALSO

ffmpeg(1), mplayer(1), handbrake(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community