IT/Software/Command Line Applications/ffmpeg: Difference between revisions

From msgwiki
Jump to navigation Jump to search
Access restrictions were established for this page. If you see this message, you have no access to this page.
No edit summary
No edit summary
Line 1: Line 1:
___TOC___
___TOC___


==This tool is amazingly broad.==
This tool is amazingly broad.
 
We will only attempt to show a few of its key features.  
We will only attempt to show a few of its key features.  


Line 9: Line 10:
crf should vary between 18 and 24.  The higher the number the higher the compression and lower the quality
crf should vary between 18 and 24.  The higher the number the higher the compression and lower the quality


== Convert a whole directory. ==
==Convert a whole directory.==
<code>for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done</code>
<code>for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done</code>



Revision as of 15:03, 1 February 2021

_

_

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