user6186: I am converting .mp4 files to .flv using ffmpeg in centos. But the conversion time is extremely too slow! It takes about 1.5 hours to convert 500MB .mp4 file into .flv. I am using a linux vps with 2 GBs dedicated RAM.
I am using the following code:
ffmpeg -i source.mp4 -c:v libx264 -ar 22050 -crf 28 destination.flv

Is there any way I can fasten the conversion time? Any help/suggestions will be appreciated.

user2836: RAM is not the critical part of a transcode, CPU is.  Since it is working stream to stream, fairly minimal memory actually has to be required if the encoder is operating efficiently.  The memory speed does matter for scratch space for the processor, but not so much the quantity.
The CPU (or GPU if using GPU optimized encoding) is what does all the work and most likely your VPS has insufficient processing power.  Video encoding is extremely intensive.  It is one of the primary reasons that video editing workstations tend to be large powerful computers, often with multiple graphics cards to spread the load to GPU processing or dedicated hardware encoding peripherals.
Depending on the length of video represented by that 500mb file, this isn't at all surprising.   Even on my 2.9ghz quad core i7, it still takes roughly 2 to 3 times the length of the original video to complete a high quality 2 pass VBR encoding (and all 8 virtual cores are at 99% non-stop the entire time).  You may not be doing two pass, but you also likely don't have nearly as much processing power being thrown at it.

user3295: Given your are using a VPS this is no suprise (guessing you only have a single core with 1-3GHz) and you won't be able to crunch the conversion down to a few minutes. You can try using -c:v libx264 -presets ultrafast but I'd guess it will still take you about 45-60 minutes to encode.
Also remove the -crf option when using a preset (they choose a default that produces a very good balance between speed and quality, I only recommend to modify that value when you know what it really does)
Be advised that the quality you get from that preset is not exactly great. If you NEED fast encoding speed over everything then go for it, if it's not THAT important I'd suggest using fast oder faster instead of the ultrafast preset.

user3476: An MP4 file normally contains H.264 video and AAC audio, both of which are compatible with the FLV container. You could simply copy over the streams:
ffmpeg -i input.mp4 -c copy output.flv

Since you're copying the streams, this will be as close to instantaneous as you're going to get and will not result in any loss of quality.

6186: <p>I am converting .mp4 files to .flv using ffmpeg in centos. But the conversion time is extremely too slow! It takes about 1.5 hours to convert 500MB .mp4 file into .flv. I am using a linux vps with 2 GBs dedicated RAM.</p>

<p>I am using the following code:</p>

<pre><code>ffmpeg -i source.mp4 -c:v libx264 -ar 22050 -crf 28 destination.flv
</code></pre>

<p>Is there any way I can fasten the conversion time? Any help/suggestions will be appreciated.</p>
 2836: <p>RAM is not the critical part of a transcode, CPU is.  Since it is working stream to stream, fairly minimal memory actually has to be required if the encoder is operating efficiently.  The memory speed does matter for scratch space for the processor, but not so much the quantity.</p>

<p>The CPU (or GPU if using GPU optimized encoding) is what does all the work and most likely your VPS has insufficient processing power.  Video encoding is <em>extremely</em> intensive.  It is one of the primary reasons that video editing workstations tend to be large powerful computers, often with multiple graphics cards to spread the load to GPU processing or dedicated hardware encoding peripherals.</p>

<p>Depending on the length of video represented by that 500mb file, this isn't at all surprising.   Even on my 2.9ghz quad core i7, it still takes roughly 2 to 3 times the length of the original video to complete a high quality 2 pass VBR encoding (and all 8 virtual cores are at 99% non-stop the entire time).  You may not be doing two pass, but you also likely don't have nearly as much processing power being thrown at it.</p>
 3295: <p>Given your are using a VPS this is no suprise (guessing you only have a single core with 1-3GHz) and you won't be able to crunch the conversion down to a few minutes. You can try using <code>-c:v libx264 -presets ultrafast</code> but I'd guess it will still take you about 45-60 minutes to encode.</p>

<p>Also remove the <code>-crf</code> option when using a preset (they choose a default that produces a very good balance between speed and quality, I only recommend to modify that value when you know what it really does)</p>

<p>Be advised that the quality you get from that preset is not exactly great. If you NEED fast encoding speed over everything then go for it, if it's not THAT important I'd suggest using <code>fast</code> oder <code>faster</code> instead of the <code>ultrafast</code> preset.</p>
 3476: <p>An MP4 file normally contains H.264 video and AAC audio, both of which are compatible with the FLV container. You could simply copy over the streams:</p>

<pre><code>ffmpeg -i input.mp4 -c copy output.flv
</code></pre>

<p>Since you're copying the streams, this will be as close to instantaneous as you're going to get and will not result in any loss of quality.</p>
