Tag Archives: mencoder

How to convert video using MEncoder

MEncoder is a free command line video decoding, encoding, and filtering tool. As a by-product of MPlayer, it can convert all formats that Mplayer can understand.

install mencoder

sudo apt-get install mencode

avi → mp4

mencoder 1.avi -o 1.mp4 -oac copy -ovc lavc -lavcopts vcodec=mpeg1video -of mpeg

  • o: output file name.
  • oac: audio codecs for encoding. copy does not reencode but just copy compressed frames.
  • ovc: video codecs for encoding. lavc means using one of libavcodec’s video codecs.
  • lavcopts: libavcodec’s video codecs. Here we choose MPEG-1 video.
  • of: output container formats. mpeg means MPEG-1 and MPEG-2 PS.
  • read more