Mencoder options

Convert Command used in vShare

$cmd_mencoder = "$config[mencoder] '$video_src' -o $video_flv\
-of lavf -oac mp3lame -lameopts abr:br=56\
-ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3
-srate 22050 -ofps 24 -vf harddup";

mencoder -vf help

MEncoder general options

  • '''-ovc lavc''': uses libavcodec for encoding the video
  • '''-srate 22050''': selects the correct output sample rate to be used (22050Hz)
  • '''-ofps ''<fps>''''': specifies a frames per second (fps) value for the output file.
  • '''-oac mp3lame''': uses mp3lame for encoding the audio

libavcodec options

  • '''-lavcopts''': libavcodec options must be specified after this
  • '''vcodec=flv''': use flv video codec
  • '''vbitrate=''<vbitrate>''''': specifies the video bitrate in kbit/s (any value up to 9800)
  • '''aspect=''<ar>''''': specifies movie aspect (either '''4/3''' or '''16/9''')

video filters options

  • '''-vf''': video filters options must be specified after this
  • '''harddup''': "In order to maintain audio/video synchronization throughout the encode, MEncoder has to drop or duplicate frames. This works rather well when muxing into an AVI file, but is almost guaranteed to fail to maintain A/V sync with other muxers such as MPEG. This is why it is necessary to append the harddup video filter at the end of the filter chain to avoid this kind of problem."

For more information on using mencoder, check