0

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? :)

udo
  • 8,061
Jimmery
  • 630

2 Answers2

2

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
llogan
  • 63,280
1

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: https://video.stackexchange.com/ (Audio Video Production Q&A) and photo.stackexchange.com for more ideas.