How do I create a GIF image from a part of a video? [closed]

Closed. This question is off-topic. Answers to it are not accepted at the moment.

Want to improve this question? Update the question so that it it fit into the theme of Stack Overflow in Russian.

Closed 5 years ago.

Improve the question

I want to create a generator gif - ok from a video (both a local video, and from a link to youtube), with the ability to set a part of the video from which you will need to do gifku found several js libraries, but they can only create from a local video file and cannot cut a part.

Please tell me, maybe there are some ready-made libraries/solutions ( php, javascript) or the solution principle itself.

Author: Nicolas Chabanovsky, 2015-10-13

2 answers

  1. Making a palette:

    ffmpeg -y -ss 30 -t 3 -i input.flv \
    -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png
    
  2. Creating a gif with the use of the palette:

    ffmpeg -ss 30 -t 3 -i input.flv -i palette.png -filter_complex \
    "fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
    

More examples can be found here: http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html

 1
Author: Мстислав Павлов, 2015-10-13 15:33:36
 0
Author: redL1ne, 2017-05-23 12:39:00