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

Im running a website on Linux/Apache and I need to install software that does the following:

  • Converts audio files into MP3 and find the length of the file.
  • Converts video files into FLV.
  • Create several different sized images from one image.

Obviously I need to be able to run all this from a command line. So far the best solutions Ive found are SoX (for the audio), FFMPEG (for the video) and ImageMagick (for the images). Is there anything else that is better than these pieces of software?

Is there one piece of software that does all of these things? Or am I hoping for too much? :)

share|improve this question

migrated from Dec 21 '11 at 14:43

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

Why would you like to have all-in-one tool here? In my opinion, having 3 different tools is an advantage and I don't know any other tools which would beat those three same time! – Alexander Galkin Dec 21 '11 at 15:53
+1 @Alexander Galkin agree, there is not a reason to require all 3 tasks in one program, unless there is a requirement that the 3 types of content are all derived from one source and that there is some sort of complex interdependency between the sources that would make conversion indvidually highly manual. – therobyouknow Dec 21 '11 at 16:37
up vote 2 down vote accepted

You have made good choices, although FFmpeg can also:

Convert audio files into MP3:

ffmpeg -i input -c:a libmp3lame -q:a 4 output.mp3

or pipe to LAME:

ffmpeg -i input -f wav - | lame -V4 - output.mp3

Find the length of the MP3 file:

ffmpeg -i input 2>&1 | awk '/Duration/{print $2}' | sed 's/,//g'

Convert video files into FLV:

ffmpeg -i input -c:v libx264 -preset medium -crf 24 -c:a libmp3lame \
-ar 44100 -q:a 4 output.flv

Create several different sized images from a video from 5 seconds in:

ffmpeg -i input -ss 5 -vframes 1 -vf scale=iw/2:-1 half.png -ss 5 -vframes 1 \
-vf scale=600:-1 600pxwide.png -ss 5 -vframes 1 -vf scale=300:300 \
share|improve this answer

Video command line and scripting/macros: Consider avidemux: and avisynth (also discussed there).

Audio command line: and


Head on over to related sites in the stackexchange family: (Audio Video Production Q&A) and for more ideas.

share|improve this answer

You must log in to answer this question.

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