IT/Software/Command Line Applications/ffmpeg

From msgwiki
Jump to navigation Jump to search

_

_

This tool is amazingly broad.

We will only attempt to show a few of its key features.

Reduce Video size and maintain some quality.

ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4

crf should vary between 18 and 24. The higher the number the higher the compression and lower the quality

Convert a whole directory.

for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done

You can add your parameters there like crf and -vcodec

Extract audio from video

  • Change extension and names as needed.
  • Path is relative unless noted.
  • Single quotes are needed if you have spaces or any special character

ffmpeg -i '20150125 Word Blesses Us'.mp4 '20150125 Word Blesses Us'.mp3