Something like the following mencoder line should do the trick for mpeg4 video with mp3 audio. Note that it is very basic and you probably want to do some more tweaking like specifying audio/video -bitrate, video resolution, etc. But luckily the mencoder manpage has all this stuff documented pretty well
Code:
mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 -o output.avi input.flv
YOu might want to take a look at clive
Description: Video extraction utility for YouTube, Google Video and others
clive is a command line utility for extracting videos from Youtube and other
video sharing Web sites. It was originally written to bypass the Adobe Flash
requirement needed to view the hosted videos. It is non- interactive, meaning
it can work in the background while the user is not logged on. This allows the
user to start an extraction and disconnect from the system, letting clive
finish the work.
Homepage:
http://clive.sourceforge.net/
There is also acidrip
Description: ripping and encoding DVD tool using mplayer and mencoder
AcidRip is a Gtk::Perl application for ripping and encoding DVD's. It
neatly wraps MPlayer and MEncoder, which I think is pretty handy, seeing as
MPlayer is by far the best bit of video playing kit around for Linux. As
well as creating a simple Graphical Interface for those scared of getting
down and dirty with MEncoders command line interface, It also automates the
process in a number of ways:
Homepage:
http://untrepid.com/acidrip/