Convert a .GIF into a 10 Second .mp4 - Paying $10 in BTC.

Status
Not open for further replies.
FFMPEG can do it..

HbWsr.gif


This example will skip the first 30 seconds of the input and create a 3 second output. It will scale the output to be 320 pixels wide and automatically determine the height while preserving the aspect ratio. The https://www.ffmpeg.org/ffmpeg-filters.html#palettegen-1 and https://www.ffmpeg.org/ffmpeg-filters.html#paletteuse-1 filters will generate and use a custom palette generated from your source.

  1. Generate a palette:

    Code:
    ffmpeg -y -ss 30 -t 3 -i input.flv \
    -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png

  2. Output the GIF using the palette:

    Code:
    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

Source -
Code:
https://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top