I keep a list of all the FFmpeg / Mencoder command that I come across on the Internet and add it to my Knotes for future refernce, Today I am sharing the list. The credit goes to all the website and forums which I have come across to build this nice little list of FFmpeg / Mencoder commands.
Capture video of a linux desktop
$ ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out
Convert other video to FLV
$ ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320×240 video
Download YouTube videos as .flv and convert them to .3gp for your mobile phone.
$ ffmpeg -i file.flv -r 15 -b 128k -s qcif -acodec amr_nb -ar 8000 -ac 1 -ab 13 -f 3gp -y out.3gp
Extract audio and video from a file
$ ffmpeg -i source_movie.flv -vcodec mpeg2video target_video.m2v -acodec copy target_audio.mp3
Convert bunch off oggs to mp3
$ for x in *.ogg; do ffmpeg -i “$x” “`basename “$x” .ogg`.mp3″
AAC conversion
$ ffmpeg -i source.mp3 -acodec libfaac -ab 128k dest.aac
iPod / iPhone
$ ffmpeg -i input -acodec libfaac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320×180 -title X output.mp4
convert-almost-any-image-into-a-video
$ ffmpeg -loop_input -f image2 -r 30000/1001 -t $seconds -i frame/$num.ppm -y frame/%02d.mpeg 2>/dev/null
Record MP3 audio via ALSA using ffmpeg
$ ffmpeg -f alsa -ac 2 -i hw:1,0 -acodec libmp3lame -ab 96k output.mp3
Convert files to xvid
$ mencoder “$1″ -ofps 23.976 -ovc lavc -oac copy -o “$1″.avi
Covert wmv to avi
$ mencoder “/path/to/file.wmv” -ofps 23.976 -ovc lavc -oac copy -o “/path/to/file.avi”
Merge video files together using mencoder (part of mplayer)
$ mencoder -oac copy -ovc copy part1.avi part2.avi part3.avi -o full_movie.avi
Encode a file to MPEG4 format
$ mencoder video.avi lavc -lavcopts vcodec=mpeg4:vbitrate=800 newvideo.avi
Convert mp3/wav file to asterisk ulaw for music on hold (moh)
$ sox -v 0.125 -V <mp3.mp3> -t au -r 8000 -U -b -c 1 <ulaw.ulaw> resample -ql
Recent Comments