IT/Software/Command Line Applications/ffmpeg: Difference between revisions
Access restrictions were established for this page. If you see this message, you have no access to this page.
Walttheboss (talk | contribs) No edit summary |
Walttheboss (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
We will only attempt to show a few of its key features. | We will only attempt to show a few of its key features. | ||
== Reduce Video size and maintain some quality. == | ==Reduce Video size and maintain some quality.== | ||
<code>ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4</code> | <code>ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4</code> | ||
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. == | |||
<code>for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done</code> | |||
You can add your parameters there like crf and -vcodec | |||
<br /> | |||
==Extract audio from video== | ==Extract audio from video== | ||
Revision as of 15:32, 9 May 2020
_
_
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