1

This is what I have so far. It runs, but throws an error.

I have come up with the following below.

for %%a in ("*.mp4") do ffmpeg -i "%%a" -t 3 -vf "fps=10, scale=320, flags=lanczos, split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 copy "__newfiles\%%~na.gif"
1
  • 3
    “…but throwing an error.” What error? Feb 25, 2021 at 22:12

1 Answer 1

1

Unable to find a suitable output format for 'copy'

Remove copy. That's not an actual option. ffmpeg is assuming you want the output to be named copy, but it doesn't know what container format (GIF, MP4, AVI, MKV, MOV, etc) copy is supposed to be.

Invalid size '320'

Change scale=320 to scale=320:-1. You need to provide both width and height. The -1 means to automatically choose the correct height. See the scale filter documentation.

No such filter: 'flags'

flags is not a standalone filter. It is an option for the scale filter. Change scale=320:-1, flags=lanczos to scale=320:-1:flags=lanczos. See the scale filter documentation.


Fixed command

for %%a in ("*.mp4") do ffmpeg -i "%%a" -t 3 -vf "fps=10, scale=320:-1:flags=lanczos, split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 "__newfiles\%%~na.gif"
2
  • You're awesome thank you! Feb 26, 2021 at 0:19
  • 1
    @ChristopherShaw Feel free to say thanks in the way that the platform operates, I mean, applying your "accepted" in this answer. See the tour
    – Io-oI
    Feb 26, 2021 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .