Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating a video sharing/tube site and I'm in need of a single good general purpose ffmpeg command to use to transcode any video that's uploaded by my users.

I'm surprised more people haven't published good examples of a good general ffmpeg command for converting to flv format. By general, I mean being able to specify an input file in any format (wmv, avi, webm, etc.) and produce an FLV file that has great quality.

I am looking for a single ffmpeg command that can:

  • Produce great looking video for the web (no artifacts, maintain original quality etc.)
  • But also reduce file size to make it web friendly

I realize these are competing requirements and I would consider video quality to be the priority when it comes to a tradeoff but at the same time, I know you can have great quality and still reduce the file size of the original file dramatically.

I would have used MP4 with H264 but the patent stuff scares me and I don't want to pay for that so I'm stuck with FLV.

share|improve this question

migrated from Sep 12 '11 at 21:17

This question came from our site for professional and enthusiast programmers.

ffmpeg -i in.avi -c:v libx264 -vprofile main -vf scale=-1:480 -c:a libvo_aacenc -ac 2 -ar 44100 out.flv

This should result in
FLV container
H.264 video
Main Profile
AAC audio
2 channels (stereo)
44100 Hz audio sample rate
128 kbit/s audio bitrate (FFmpeg default)

share|improve this answer

You must log in to answer this question.