Posts

Showing posts with the label ffmpeg

Mass resize photos in Linux with ffmpeg

To resize multiple photos at once, you can run this command line: + Resize To 1/10 its original size: $ for filename in /path/to/*.jpg; do ffmpeg -i "$filename" -y -vf scale=iw*.1:ih*.1 "$filename";done with: iw: input width ih: input height + Keep the aspect ratio, we need to specify only one component, either width or height, and set the other component to -1: $ for filename in /path/to/*.jpg; do ffmpeg -i "$filename" -y -vf scale=250:-1 "$filename";done

Another great tool to convert mp4 to mp3

It is ffmpeg. In Ubuntu 14.04, you can install ffmpeg as following: $ sudo apt-get install ffmpeg libavcodec-extra-53 Then, you can convert your mp4 videos to mp3: $ ffmpeg -i source.mp4 -b:a 320K -vn dest.mp3 For more information about ffmpeg, please follow its repository:  https://github.com/FFmpeg/FFmpeg