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

Can someone give me the command line parameters for FFmpeg to convert MP4 video to an Adobe Flash SWF file?

share|improve this question

Basically, like this:

ffmpeg -i in.mp4 out.swf

This will default to converting the video to Sorenson Spark (H.263, or known as flv1) and the audio to MP3, using whatever MP3 encoder your FFmpeg has—probably libmp3lame.

If you need to change the video quality, you have two options:

  • add the -qscale:v option after -i in.mp4 with a value from 1 to 31, where higher means lower quality (try with 2 or 3 first). This is a VBR setting.

  • add the -b:v option with a bitrate, e.g. 1M or 500K. This is a CBR setting, of course, and might result in lower visual quality per file size.

For audio:

  • add the -q:a option for VBR MP3, with values between 0 and 7, 0 being the best quality.

  • add the -b:a option for CBR MP3, e.g. with 192K.

Consider converting your video to an FLV container instead, which will handle a larger variety of codecs than SWF (which only supports H.263, VP6 or Motion JPEG).

This would allow you to use H.264 video and AAC audio, which provide you with better quality at smaller file sizes when compared to the H.263 / MP3 variant in SWF files. You might even have a chance to copy the bitstreams, which would mean no quality reduction at all.

ffmpeg -i in.mp4 -c copy out.flv

If that doesn't work, re-encode:

ffmpeg -i in.mp4 -c:v libx264 -c:a aac -strict experimental -b:a 192K out.flv

This would use the x264 encoder. To change the video quality here, you have the following options:

  • add the -crf option after -i in.mp4 with a value between 0 and 51, where lower means better quality. Default is 23, and sane values are from 18–28.

  • add the -b:v option, similar to above for constant bitrate mode.

See the x264 encoding guide on the FFmpeg wiki for more info.

share|improve this answer
Do you know if the smoothing property of the video display object is, - or can be set? (normally it's a property you set to the videodisplay by using it's instance name, like videoObj.smoothing = true) – Jakob Sternberg May 6 '14 at 19:16

You must log in to answer this question.

protected by Community Apr 24 '15 at 4:08

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .