Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Dec 21 '11 at 14:43

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

3  
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

2 Answers 2

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 \
300x300-ignoring-aspect.png
share|improve this answer

Video command line and scripting/macros: Consider avidemux: http://www.avidemux.org/admWiki/doku.php and avisynth (also discussed there).

Audio command line: http://www.netwaysglobal.com/mpegrec/ and http://sourceforge.net/projects/mp3record/

Also:

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.