Skip to content

ffmpeg

Created: 2016-02-04 17:20:21 -0800 Modified: 2020-01-13 14:22:15 -0800

I had to use a filter in order to normalize audio, but the first time I ran it, I got this error:

ffmpeg -i builder.wav -filter:a loudnorm output.wav

[AVFilterGraph @ 001e9e40] No such filter: ‘loudnorm’

Error opening filters!

That error is a result of using an old version of ffmpeg (perhaps because some other program (cough ImageMagick) is in your PATH and has an outdated version). Just download a new one and it has the filters built-in.

Sun 10/18/2015 - 01:15 PM

https://www.reddit.com/r/gamedev/comments/3ou9u6/what_lightweight_tools_does_everyone_use_to/

ffmpeg -i input.mp4 -ss 00:00:10 -c copy -t 00:00:20 output.mp4

This will crop off the first 10 seconds, then keep the next 20 seconds and crop the rest.

I can just do ffmpeg -i input.flv -c copy output.mp4

Then load it in MovieMaker.

The reference link says how to make a palette so that the resulting GIF is less grainy. Here’s what I did to turn an entire video into a gif:

Pick a final width. Here, I’ve chosen 500. If you want something different, customize both instances of “500” below.

  • ffmpeg -y -i “Artillery Explosion.mp4” -vf fps=30,scale=500:-1:flags =lanczos,palettegen palette.png
  • ffmpeg -i “Artillery Explosion.mp4” -i palette.png -filter_complex “fps=30,scale=500:-1:flags =lanczos[x];[x][1:v ]paletteuse” output.gif

ffmpeg -i input.mp4 -filter:v “crop=WIDTH:HEIGHT:X:Y ” output.mp4

For example: ffmpeg -i testrun.mp4 -filter:v “crop=1356:850:123:116” out.mp4

Here’s a sample of when I used this:

ffmpeg -i “C:Usersagd13 _000Desktopdelgifscosmetics.mp4” -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis “C:Usersagd13 _000Desktopdelgifscosmetics.webm”