4
2
Can someone give me the command line parameters for FFmpeg to convert MP4 video to an Adobe Flash SWF file?
4
2
Can someone give me the command line parameters for FFmpeg to convert MP4 video to an Adobe Flash SWF file?
6
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.
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 – 2014-05-06T19:16:47.810