Improve FFmpeg time ? conversion takes very long

3

I have several rules to convert a movie to several formats and create a preview image. Problem is the execution of these takes very long. Also the outputted quality is very low. I harvested these examples from several sources.

What could be done to * improve speed * improve quality?

 ffmpeg -y -i /file/$1.flv -acodec libmp3lame -ar 44100 -ac 1 -vcodec libx264 /file/$1.mp4
 ffmpeg -i /file/$1.mp4 -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 /file/$1.webm
 ffmpeg -r 30 -i /file/$1.mp4  -vcodec libtheora -acodec libvorbis /file/$1.ogv
 ffmpeg -i /file/$1.mp4 -ss 3 -f image2 -vframes 1 -s 600x480 /file/$1.png

Rubytastic

Posted 2015-04-12T20:50:34.473

Reputation: 131

Why the downvotes?! – None – 2015-04-13T07:08:55.003

3Presumably because the question is not a programming question and belongs to SuperUser. – Roman R. – 2015-04-15T18:26:53.297

2I would suggest reading through the documentation for ffmpeg to understand what all those options are - don't just "harvest examples"; understand them. Many of those options affect the quality of your output and the speed at which it is accomplished. But, do keep in mind that good quality video conversion is always going to be a relatively long CPU-intensive process. There's not much to be done about that beyond faster CPUs and more of them... – twalberg – 2015-04-15T19:21:38.053

You should provide the complete console output from each command; this contains important information. One way to save time is to omit the ogv encode since you're already encoding a webm output. – llogan – 2015-04-16T01:21:19.073

Care to specify why you think it is "slow" and "low-quality"? Both depend heavily on what you are encoding, what machine you are using to do so, and what software you are using. ffmpeg can be optimized to a particular machine's hardware - what version of ffmpeg are you using? do you know the compilation flags used to build it?. It may be that your machine is not capable of faster encoding with the given settings, but this is impossible to answer with the question as-is. – tucuxi – 2015-04-22T12:32:21.923

No answers