Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Sep 12 '11 at 21:17

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

add comment

1 Answer

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
480p
AAC audio
2 channels (stereo)
44100 Hz audio sample rate
128 kbit/s audio bitrate (FFmpeg default)

http://svnpenn.blogspot.com/search/label/FFmpeg

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.