Mostly just used for moderation.
Main account is https://piefed.social/u/andrew_s

  • 20 Posts
  • 31 Comments
Joined 2 years ago
cake
Cake day: July 24th, 2023

help-circle



























  • freamon@lemmy.worldOPMtoGifs@lemmy.world*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    I’ll try to add comments here about how GIFs and WEBP files I make are done
    Required software is ffmpeg and gifski
    An image viewer (like irfanview) that can loop through a directory’s image is really useful too


    How the fight club gif was made

    Cut a 10 second clip from the full movie
    ffmpeg -i fight.club.mkv -ss 32:40 -to 32:50 -c copy clip.mkv

    Convert into frames, drop resolution to 576x324 and framerate to 10 to reduce final file size
    ffmpeg -i clip.mkv -vf scale=576:324,fps=10 frame%3d.png

    Remove unwanted frames (frame001.png => frame048.png from the start; frame082.png => frame100.png from the end)
    e.g. for i in {01..48}; do rm frame0${i}.png; done
    This just leaves frames 049 to 081 left

    Add frames in reverse to smooth out the loop a bit
    j=82; for i in {80..50}; do cp frame0${i}.png frame0${j}.png; j=$(( j+1 )); done

    Create gif (70% quality, 10 fps)
    gifski -Q 70 -r 10 -o upload.gif *.png