Video/audio encoding using mencoder and ffmpeg

mencoder originalfile.mkv -oac mp3lame -lameopts abr:br=128 -ovc xvid -xvidencopts bitrate=1000:pass=2 -vf pp=de,scale=480:-2 -o "newfile.avi"

mencoder input_file.rm -ovc frameno -oac mp3lame -of rawaudio -lameopts cbr:br=128 -o output_file.mp3

Convert video to different standards: vcd, svcd, dvd, dv, pal-vcd, ntsc-svcd, ntsc-vcd, ntsc-dvd, etc... ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg

Video to mp3 ffmpeg -i video.mpg -f mp3 audio_track.mp3 ffmpeg -i video.flv -ab 64k -ar 22050 videosound.mp3 -i is to specified input file, -ab audio bitrate, -ar audio sampling frequency mplayer -dumpaudio -dumpfile audio_file.mp3 video.flv

Dump audio as wav mplayer -vc null -vo null -ao pcm -benchmark video.flv

http://en.gentoo-wiki.com/wiki/Mencoder

REM mencoder %1 -vf scale=320:240 -oac lavc -ovc lavc -lavcopts acodec=aac:abitrate=48:vcodec=mpeg4:vbitrate=600:mbd=2:cmp=2:subcmp=2:trell=yes:v4mv=yes:aic=2:vglobal=1:aglobal=1 -ffourcc mp4v -of lavf -lavfopts format=mp4:i_certify_that_my_video_stream_does_not_use_b_frames -o %2
REM mencoder %1 -vf scale=320:240 -oac lavc -ovc lavc -lavcopts acodec=aac:abitrate=48:vcodec=mpeg4:vbitrate=600:mbd=2:cmp=2:subcmp=2:trell=yes:v4mv=yes:aic=2:vglobal=1:aglobal=1 -ffourcc mp4v -of lavf -lavfopts -o %2
 
REM ffmpeg -i source_video.avi input -acodec aac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320x180 -title X final_video.mp4
REM ffmpeg -i %1 -acodec aac -ab 128kb -vcodec mpeg4 -mbd 2 -flags +4mv+trell -cmp 2 -subcmp 2 -s 320x180 %1.mp4
 
REM ffmpeg -i %1 -vcodec libx264 -bt 50k -acodec libfaac -ab 56k -ac 2 -s 480x320 %1.mp4
 
 
REM ffmpeg -i %1 -vcodec libx264 -crf 25 -acodec libfaac %1.mp4
 
REM ffmpeg -i %1 -f mp4 -vcodec mpeg4 -maxrate 2000 -b 1500 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ar 44100 -ab 128 -s 320x240 -aspect 4:3 %1.mp4
 
REM mencoder %1 -oac mp3lame -lameopts abr:br=48 -ovc xvid -xvidencopts bitrate=500:pass=2 -vf pp=de,scale=480:-2 -o %1.mp4
 
REM mencoder %1 -oac mp3lame -lameopts abr:br=48 -ovc x264 -x264encopts bitrate=500:pass=2 -vf pp=de,scale=480:-2 -o %1.x264.mp4
 
REM mencoder %1 -oac mp3lame -lameopts abr:br=48 -ovc x264 -x264encopts bitrate=500 pass=2 nr=2000 -o %1.x264.480..mp4
 
REM ffmpeg -i %1 -vcodec libx264 -acodec aac -b:5M -ab:41k %1.mp4
 
REM ffmpeg -y -i %1 -acodec libfaac -ar 44100 -ab 96k -coder ac -me full -me_range 16 -subq 5 -sc_threshold 40 -vcodec libx264 -s 1280x544" -b 1600k -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -i_qfactor 0.71 -keyint_min 25 -b_strategy 1 -g 250 -r 20 %1.mp4;
 
 
REM ffmpeg -i %1 -vcodec libx264 -b 500 -g 3 -bf 3 -b_strategy 1 -coder 1 -qmin 10 -qmax 51 -sc_threshold 40 -flags +loop -cmp +chroma -me_range 16 -me_method hex -subq 5 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -directpred 1 -flags2 +fastpskip -dts_delta_threshold 1 -acodec libfaac -ab 41 %1.mp4 
 
REM ffmpeg -i %1 %1.mp4
 
REM ffmpeg -i %1 -f ipod -vcodec libx264 -s 320x240 -ab 96k %1.mp4
 
REM ffmpeg -y -i %1 -vcodec libx264 -r 25 -b 516k -bt 516k -crf 22  %1.mp4
 
mencoder %1 -oac mp3lame -lameopts abr:br=48 -ovc x264 -x264encopts bitrate=500 pass=2 nr=2000 -o %1.mp4