3

I'm using the command below to create gif thumbnails from my videos. However the "speeding up" part doesn't work - so I'm wondering if there is something I don't know? Like combining certain flags doesn't work?

ffmpeg -i input.mp4 -filter:v "setpts=PTS/20" -t 60 -vf scale=160:-1 output.gif
1
  • Next time asking about ffmpeg please include the full, uncut command line output.
    – slhck
    Oct 20, 2014 at 7:30

1 Answer 1

4

You're specifying two filters – vf is the same as filter:v:

The latter will overwrite the former, so you end up just scaling the video. Use this instead:

ffmpeg -i input.mp4 -filter:v "setpts=PTS/20,scale=160:-1" -t 60 output.gif

Here you specify the filter chain entries separated by a ,.

9
  • This gives me an error: [NULL @ 0x7fd694035200] Unable to find a suitable output format for 'scale=160:-1”' scale=160:-1”: Invalid argument
    – Taapo
    Oct 20, 2014 at 7:43
  • You should just replace the filter expression with the one I gave you. The output filename still needs to be there. I included the full command you need to use – maybe should have been more specific.
    – slhck
    Oct 20, 2014 at 7:47
  • I used this command-line: ffmpeg -i input.mp4 -filter:v “setpts=PTS/20, scale=160:-1” -t 60 output.gif -- still getting the error
    – Taapo
    Oct 20, 2014 at 7:51
  • Ok, apparently the space after the , made it go wrong - so this is the correct filter syntax: “setpts=PTS/20,scale=160:-1”
    – Taapo
    Oct 20, 2014 at 8:23
  • 1
    @Taapo Weird, I couldn't reproduce this on OS X with both Bash and Zsh. If you're double-quoting the filter expression, then the space will not be interpreted as an argument separator.
    – slhck
    Oct 26, 2014 at 9:11

You must log in to answer this question.

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